Skip to content

fix: an operator-supplied value reaches the wire - #125

Merged
ShocOne merged 1 commit into
mainfrom
fix/an-operator-supplied-value-reaches-the-wire
Aug 26, 2026
Merged

fix: an operator-supplied value reaches the wire#125
ShocOne merged 1 commit into
mainfrom
fix/an-operator-supplied-value-reaches-the-wire

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 26, 2026

Copy link
Copy Markdown
Member

The defect

audit/inputs.json declares three keys — values, parentRefs, skip — and only two of them affected a live run.

plan.Derive applies parentRefs (which survive in PathValues) and skip (applied at derive time). But Run unconditionally strategizes when the document and config are present, and strategize replaces every entity's Steps with translateProgram(...), whose bodies come from synthSkeletonBody/synthValue — schema hints only. Options had no Inputs field at all, so values reached the wire on no path a real run takes.

handoff.md ranks "populate audit/inputs.json" as its second-highest next step. As things stood, the values half of that would have had no effect.

The change

Options carries *plan.Inputs; strategize hands each entity its own; and both places a value enters a body read them first:

  • synthSkeletonBody — the body the translator sends.
  • synthField — the field the adjustment loop is forced to add live. A field the API demands mid-loop is the same field the operator supplied a value for, and synthesising a different one there would send two values for one field across a single run.

An operator value outranks the variant gate as well as the example: a discriminator is one of the things an operator supplies when the document does not say which shape is valid.

It substitutes rather than adds, scoped to the body's own fields — the same contract synth.value already has in the plan package. plan.ValuesFor is exported for the run to read.

Verification

make check (90.7% total; audit/plan 93.0%, audit/run 90.6%, cli 88.1%) and golangci-lint run (0 issues).

Both paths are covered by a test confirmed to fail with that path's override removed — the integration test through synthField, and a direct test of synthSkeletonBody.

Writing those tests corrected two assumptions worth recording. The first target field was optional, so it was absent from the minimal skeleton and the value legitimately never appeared; the second was in a different variant from the one the run recorded. Both were found by dumping the recorded bodies rather than by reading the code again.

What this does not do

No benchmark movement on its own — the pilot has no audit/inputs.json yet. This is what makes authoring one work.

🤖 Generated with Claude Code

audit/inputs.json declares three keys and only two of them did anything to a
live run. Derive resolves parentRefs and skip at plan time, but Run replaces
every entity's steps with the program its compiled strategy describes, and
those bodies are synthesised from schema hints alone: the values key never
left the plan.

Options carries the inputs, strategize hands each entity its own, and both
paths that put a value in a body now read them first — the skeleton the
translator sends, and the field the adjustment loop is forced to add live. A
field the API demands mid-loop is the same field the operator supplied a value
for, and synthesising a different one there would send two values for one
field across a single run.

An operator value outranks the variant gate as well as the example: a
discriminator is one of the things an operator has to supply when the document
does not say which shape is valid. It substitutes rather than adds, scoped to
the body's own fields, exactly as the plan's own synthesis does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ShocOne
ShocOne merged commit ba9d75a into main Aug 26, 2026
2 checks passed
@ShocOne
ShocOne deleted the fix/an-operator-supplied-value-reaches-the-wire branch August 26, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant