fix(preflight-shape): contract start graph-body repair fields#4
Conversation
|
Thanks for splitting this out. The direction is right, but I want to fix the root shape here rather than keep tuning legacy-field repair behavior.
Please rework this as a contraction:
So: keep “move current graph fields under |
a717555 to
fb85e50
Compare
fb85e50 to
4e081b7
Compare
|
Thanks — I reworked this as a current-contract contraction and rebased it onto current Current state:
What changed:
const START_GRAPH_BODY_REPAIR_FIELDS = new Set<PreflightField>([
"objective",
"steps",
"limits",
"authority",
]);
Validation after rebasing onto current Scope check: git diff upstream/main..pr3-pre-graph-body-fields -- \
extensions/multiagent/src/preflight-shape.ts CHANGELOG.md tests/preflight-schema-drift.test.ts \
| grep -E 'scheduleId|reattach|^\+.*\blist\b'
# no output
I reproduced that baseline gate failure on current Repro commands: # PR branch
cd /tmp/pi-multiagent-upstream
git checkout pr3-pre-graph-body-fields
node --no-warnings --experimental-strip-types --loader ./tests/pi-peer-loader.mjs --test tests/preflight-schema-drift.test.ts
pnpm run typecheck
pnpm test
git diff --check
pnpm run gate # expected in this env: tests pass, then baseline smoke:fake-pi /tmp assertion fails
# Baseline comparison
git checkout --detach upstream/main
pnpm run gate # expected in this env: 244/244 tests pass, then same smoke:fake-pi /tmp assertion failsI also ran independent local read-only reviews against the final branch state; no blockers were found. |
tiziano-contorno
left a comment
There was a problem hiding this comment.
Thanks — this revision matches the contraction request. I verified the retired fields are no longer preflight-known, mixed malformed start repair only mentions current graph body fields, useful current repairs still work, and focused/full validation passes. I’ll tighten the changelog wording while resolving the merge conflict with #3.
Second of three focused PRs splitting out the usable parts of #2 against current
main, as requested in your review.What
GRAPH_BODY_FIELDSinpreflight-shape.tswas suggesting users relocateagents/synthesis/outputContract/callerSkillsundergraphvia the "move under graph" repair hint. ButGraphSchemarejects all four underadditionalProperties: false— following the hint just produced a second failure.Trimmed to what
GraphSchemaactually accepts:objective,steps,limits,authority.libraryis intentionally excluded because it has a more specific repair branch later inrepairFor; the broad "move under graph" hint would clobber that better message.The diff
Why
User experience bug: a model passing
agents: [...]at top level got told "Move graph body fields undergraph", then received a schema rejection when it tried. The trim eliminates this double-error flow.Discipline
PreflightFieldandKNOWN_FIELDSare unchanged — misplaced-field detection still works foragents/synthesis/outputContract/callerSkills.libraryis intentionally excluded.planning.test.tscovers all 4 removed fields (asserts each triggersstart-control-fields-deniedAND does NOT matchMove graph body fields under graph).Required checks against this branch
npx tsc --noEmitnode --test tests/*.test.tsnode tests/check-source-size.tsnode tests/check-public-docs.tsgit diff --check HEAD~1..HEADDiscipline notes
## Unreleasedonly (1 sentence)Related
Closes a portion of #2 (separately scoped). Companion PRs:
outputLimitknobs as a small feature