Skip to content

Share one acceptance argv rule and render check argvs as arrays - #2099

Merged
ppXD merged 1 commit into
mainfrom
fix/share-one-argv-normaliser-and-measure-the-floor
Nov 7, 2026
Merged

ppXD merged 1 commit into
mainfrom
fix/share-one-argv-normaliser-and-measure-the-floor

Conversation

@ppXD

@ppXD ppXD commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Floor on a stop-only tape. clean-integration (only right answer: stop) now declares the same ["dotnet","test"] floor as repeat-failure-under-a-declared-check, so the decision eval can see what the floor block does to stopping. The block says "drive the work until it passes before declaring success" over a verdict the model cannot see before it stops; the old carrier accepts retry, stop and ask_human, so a retry caused by the block still passed. Chosen over resolve-cap-spent because the floor cannot change its answer: every unit is green and integrated, where the cap-spent tape records a failing build and accepts ask_human beside stop, so a miss there would not say whether the floor or the judgement was at fault.
  • Check argvs as arrays, one renderer. AcceptanceArgv.AsLine (JSON array of strings on one line, cut with an ellipsis; moved here from the decider) writes the floor block, a unit's acceptance check (…) line and the amendment card's Proposed check:. The grader spawns every acceptance argv with no shell, so a joined line lost element boundaries ([" ","dotnet","test"] read as dotnet test, ["sh"," ","check.sh"] as two arguments) and read a pipe inside an argument as a pipeline. The card sat a few words from the plan block's AMENDED…: ["dotnet","test"] and still joined; it now quotes the array (own 200-char cap kept). For the non-TestsPass kinds the array holds paths, not an argv. Known exceptions, documented on AsLine: the grader's fenced $ cmd evidence line, and RoomNarrative.cs:452 / SupervisorPhaseSource.cs:188, which still join with spaces.
  • One acceptance argv rule, guarded per file. "Blank first element or any NUL makes the whole argv unrunnable; later blanks are kept" was pasted into five readers; AcceptanceArgv.NormalizeOrNull now holds it (Rehydrate x4, both launch builders, InLoopAcceptanceHook, LocalAcceptanceVerifier.ValidArgv) and so do the two spec-preview validators, which restated it with a 256-token bound. No behaviour change. The architecture test matches per file over all of backend/src (a per-line match missed PlannerAcceptanceDraft, which writes the clauses on two lines, and anything outside Core/Services); PlannerAcceptanceDraft is named with its reason (its re-ask needs one message per violated clause) and a count, and every reader pins how many sites ask the helper.

Test plan

Digest. GoldenPromptDigest re-pinned on purpose: 6586d47c358c273cb04fe0b662473382a09fe4058916fb8c96e18c1bcc79a946 (main, the agent-report fence) -> 8082603c53395c055e885c1d03b81d363d768048c41bf5ed4c6759e4b0d9c53e. Four of the 29 prompts move, the other 25 are byte-identical:

scenario what moved
clean-integration gains the operator-floor block
repeat-failure-under-a-declared-check s1's check line is ["dotnet","test"], was dotnet test
amended-oracle-awaiting-retry the co-signed replacement's check line, and its card's Proposed check:
amended-oracle-discarded-by-replan its two cards' Proposed check: (the amendments were discarded, so no check line)

The waive card on waived-unit-cleanly-integrated proposes no check and does not move. Receipts (derived, none restated): Only_the_tapes_that_carry_an_operator_floor_gain_the_floor_block; Only_the_tapes_that_show_a_check_argv_write_it_as_an_array_not_a_joined_line derives the check-line set and the card set separately and requires the corpus with both joined back and the new floor withheld to digest to 6586d47c; A_tape_whose_only_right_answer_is_a_stop_carries_an_operator_floor. clean-integration is inside all four superseded anchors and the two co-sign tapes inside the roster anchor, so neither AddedSince… exclusion set changes; the moves are wound back in AsRenderedBeforeTheTurnRoster and the fence and floor receipts unwind them first. Chain: 6586d47c <- 6b9c621b (#2060) <- 2dafcdc7 (pre-floor) <- the older anchors, all reproduced.

Counts (rebased on b64ca1c; solution builds with 0 errors):

  • Unit, whole project: 13,222 passed, 1 skipped, 0 failed (rebased on 86ab155)
  • Unit classes: AcceptanceArgvTests 13, AcceptanceArgvInventoryTests 3, SupervisorAmendAcceptanceTests 23, SupervisorPriorDecisionLegibilityTests 13, SupervisorDeciderTests 219, SupervisorTurnServiceTests 77, SupervisorDefinitionBuilderTests 30, TaskSpecSourceBoundArgvTests 15, TaskSpecAcceptanceEvidenceTests 23, TaskSpecCompilerTests 25
  • Integration (Postgres): SupervisorGoldenPromptFidelityTests 32, SupervisorDecisionEvalDeciderTests 6, SupervisorDecisionEvalTests 6, SupervisorTrajectoryEvalTests 49, LocalAcceptanceVerifierFlowTests 25, TaskLaunchFlowTests 50, TaskLaunchContractFlowTests 10, SupervisorUnitAcceptanceFoldFlowTests 65; every Supervisor-named class and namespace together: 858 passed / 46 skipped (RealModel lanes) / 0 failed
  • Not run: the live RealModel decision gate (no CODESPACE_LLM_* here). A miss on clean-integration under the floor would mean the floor block suppresses a stop.
  • The two spec-preview folds are behaviour-preserving: the new 256-token-bound tests pass on both the folded and the pre-fold code.

Mutations (each applied, built, run, reverted by copy):

  • Helper rule weakened (whitespace program, NUL, blank later arguments dropped, no copy) -> AcceptanceArgvTests red.
  • A caller keeps a private copy with a different rule (SupervisorDefinitionBuilder, the Rehydrate stop-gate floor, InLoopAcceptanceHook, LocalAcceptanceVerifier, SingleAgentDefinitionBuilder, and now TaskSpecSourceArgv, TaskSpecAcceptanceAssessment) -> AcceptanceArgvTests stays green and Every_reader_that_decides_an_argv_can_run_asks_the_helper_at_every_site goes red.
  • A two-line copy planted in CodeSpace.Messages and another in CodeSpace.Core/Persistence (clauses in both orders, Contains and IndexOf) -> No_other_file_states_the_rule_again red; the previous commit's per-line guard stays green on the same plant. PlannerAcceptanceDraft without its entry, or pinned at the wrong count -> red.
  • The card quoting its check joined again -> the new card tests, the card-vs-plan-line legibility test and four fidelity receipts red; the floor block losing its argv line -> the eval-grain test red; check line joined again / bound removed -> as before.
  • clean-integration loses its floor or accepts retry beside stop; either wind-back step made a no-op -> the pairing guard, the eval-grain test, the anchors and the receipts red.

Follow-ups, deliberately not in this PR (each changes behaviour or evidence bytes, so each gets its own PR):

  • Render the grader's $ cmd evidence line (TestsPassGrader.cs:69) and the two UI labels (RoomNarrative.cs:452, SupervisorPhaseSource.cs:188) through AsLine. This moves evidence bytes, so it re-pins.
  • ValidateAuthored (AgentAcceptanceContract.cs:250) only rejects an all-blank command, so SupervisorAcceptanceOverlay.cs:49 accepts a blank-first TestsPass amendment such as [" ","dotnet","test"], which Rehydrate.cs:806-815 later nulls and never grades. AgentCodeNode.cs:274 has the same gap. Fix: ask NormalizeOrNull, add the sites to AsksTheHelper, add overlay and rehydrate tests.
  • TaskLaunchService.cs:427 (the Delivery/Unattended mandate) only checks Count > 0.
  • The amend card's 200-char cap now counts JSON and can cut mid-escape: cut at an element boundary and say how many elements were left out, and show the check's kind on the card.
  • Inventory guard: false positives (e.g. HarnessDescriptor.cs:188, NativeLaunchProtocol.cs:45/70) and missed spellings (\u0000, char.MinValue, list patterns).
  • PR Apply, clamp or refuse launch controls on every route #2064 carries a sixth copy of the rule (LaunchControlResolver.IsWellFormedFloor); whichever of the two lands second folds the other's copy, and this PR's guard will name it if Apply, clamp or refuse launch controls on every route #2064 lands first.

@ppXD
ppXD force-pushed the fix/share-one-argv-normaliser-and-measure-the-floor branch from 17bd099 to fa80e93 Compare October 12, 2026 01:25
@ppXD ppXD changed the title Show unit checks as argv arrays and share one acceptance argv rule Share one acceptance argv rule and render check argvs as arrays Oct 12, 2026
@ppXD
ppXD force-pushed the fix/share-one-argv-normaliser-and-measure-the-floor branch 2 times, most recently from 0c6f6fc to e3d0e5c Compare November 7, 2026 15:45
The rule for which acceptance argvs can run (a blank first element or a
NUL makes the whole argv unrunnable, later blanks are kept) was pasted
into five readers plus two spec-preview validators that added a
256-token bound. AcceptanceArgv.NormalizeOrNull now holds it, and
SupervisorTurnContext.AcceptanceChecks no longer claims blanks are
dropped. An architecture test matches per file over all of backend/src:
a file that tests a first element for blankness and a NUL states the
rule, wherever the two clauses sit. Every reader pins how many sites
ask the helper (the rehydrate has four), and PlannerAcceptanceDraft is
named with its reason, since its re-ask needs one message per violated
clause, and a count.

The grader spawns every acceptance argv with no shell, so a joined line
lost element boundaries: ["sh"," ","check.sh"] read as two arguments,
[" ","dotnet","test"] as "dotnet test", and a pipe inside an argument as
a pipeline. The supervisor prompt's operator-floor block, each
per-subtask check line and the amendment card's proposed check now all
render through AcceptanceArgv.AsLine: a JSON array on one line, cut
with an ellipsis (the card keeps its own 200-char cap). Known
exceptions, documented on AsLine: the grader's fenced "$ cmd" evidence
line and two UI labels still join with spaces.

clean-integration, whose only right answer is a stop, now declares the
same ["dotnet","test"] floor as repeat-failure-under-a-declared-check,
so the decision eval can see what the floor block does to stopping. The
block tells the model to drive the work until the check passes before
declaring success, over a verdict it cannot see before it stops; the
other carrier accepts retry, stop and ask_human, so a retry caused by
the block still passed. This tape was chosen over resolve-cap-spent
because the floor cannot change its answer: every unit is green and
integrated, where the cap-spent tape records a failing build and
accepts ask_human beside stop. A test requires some floor carrier to
accept nothing but a stop, and an eval test checks the floor and its
argv line reach the model on it.

GoldenPromptDigest is re-pinned on purpose, 6586d47c -> 8082603c. Four
of the 29 prompts move and the other 25 are byte-identical:
clean-integration gains the floor block, repeat-failure-under-a-
declared-check shows its unit's check as an array, amended-oracle-
awaiting-retry does both for its check line and its card, and
amended-oracle-discarded-by-replan shows its two cards' proposed check
as an array. The waive card proposes no check and does not move. The
receipts derive the check-line set and the card set separately and
require the corpus with both joined back and the new floor withheld to
digest to 6586d47c. clean-integration is inside all four superseded
anchors and the two co-sign tapes inside the roster anchor, so neither
exclusion set changes: the moves are wound back in
AsRenderedBeforeTheTurnRoster, and the fence and floor receipts unwind
them first.
@ppXD
ppXD merged commit 978c752 into main Nov 7, 2026
6 of 7 checks passed
@ppXD
ppXD deleted the fix/share-one-argv-normaliser-and-measure-the-floor branch November 7, 2026 17:02
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