fabro/lib/components
Bryan Helmkamp 0e0dfe4f9d
refactor: simplify structured output error rendering
Follow-up review of the repair-error work. Behavior is the same or better;
the machinery is smaller.

Fixes a false "unchanged from your previous repair" nudge. same_problem_as
fell through to `_ => true`, so any two non-Required issues at the same
instance path, schema path and keyword compared equal. A model that removed
one unexpected property and added another was told it had changed nothing.
SchemaValidationIssue already derives PartialEq, so the 17-line comparison
is now `previous.contains(issue)`.

Drops the hand-written Type and Enum rendering. jsonschema already renders
both, and its messages name the offending value, which the hand-written
ones did not. Also switches masked() back to to_string(): masking replaced
the bad value with a placeholder, working against the goal of an actionable
message, and buys no privacy since the full response is already in the
prompt.

Resolves the schema fragment when the issue is captured rather than
threading Option<&OutputSchemaKind> through rendering. That reverts the
command.rs change and drops the test-only messages() shim. The fragment is
now attached only to Other, where it adds information; for required, type,
enum and additionalProperties it just repeated the prose.

Also: caps the model-controlled unexpected-property list so a wide object
cannot turn the repair prompt into megabytes; drops evaluation_path, which
was dead except under $ref, where it printed a pointer that does not
resolve; drops the keyword field, already named by the schema path; and
records the previous error only after the agent session accepted the
repair, since failover rebuilds the session from the original prompt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 09:04:28 -04:00
..
fabro-acp refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-agent Simplify stdin_source plumbing after review 2026-07-29 11:14:48 -04:00
fabro-automation refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-checkpoint refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-dump Add runtime for_each item injection 2026-07-27 11:55:55 -04:00
fabro-environment refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-github Stop requesting workflow write permission 2026-07-29 13:19:55 -04:00
fabro-graphviz Merge pull request #686 from fabro-sh/fix/space-separated-node-classes 2026-07-29 22:31:48 -04:00
fabro-hooks fix: address env interpolation review findings 2026-07-28 17:30:50 -04:00
fabro-install refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-interview refactor: remove duplicated review target rendering and validation 2026-07-28 15:14:23 -04:00
fabro-llm feat: add model-keyed fallback policies 2026-07-30 12:02:41 -04:00
fabro-manifest feat: add model-keyed fallback policies 2026-07-30 12:02:41 -04:00
fabro-mcp refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-mcp-store refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-sandbox Simplify stdin_source plumbing after review 2026-07-29 11:14:48 -04:00
fabro-slack fix: stop a pipe in a link label from splitting Slack link markup 2026-07-28 15:31:20 -04:00
fabro-store Merge remote-tracking branch 'origin/main' into feat/for-each-item-injection 2026-07-28 20:03:25 -04:00
fabro-tool refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-tracker refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-validate Merge remote-tracking branch 'origin/main' into feat/command-stdin-source 2026-07-29 11:37:27 -04:00
fabro-variable refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-workflow refactor: simplify structured output error rendering 2026-08-01 09:04:28 -04:00