Repository navigation
feat(s07): wire plan grounding into the plan park, advisory and default off - #59
Merged
Merged
Conversation
…t off The plan-grounding check (PR #53) now has its caller: when a run parks on plan approval and SHIP_PLAN_GROUNDING=on, the report is computed inside the existing plan-think step and rides additively on its recorded result -- no new durable step, so the step sequence stays a function of the run input and a replay reads the report back without re-running git. Flag off records the exact pre-wiring {text, usage} bytes. The run page's plan-review card renders the advisory block (ungrounded first) with the caveat that grounded means the name exists, not that the plan is right. A workspace with no git repository omits the field; grounding never blocks and never edits the plan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
S07's first wiring: the plan-grounding check (PR #53, previously "no caller yet") now runs at the plan-park point, observe-only, behind the existing
SHIP_PLAN_GROUNDINGflag (default off).plan-thinkstep innativeAdapter(src/durable.ts) — the step that immediately precedes thePLAN_EVENTpark. With the flag on, the grounding report (files/symbols/commands the plan names, checked against the committed tree at the checkout's HEAD via read-only git queries) is computed there and attached as an additivegroundingfield on the step's recorded result. No new durable step, so the step sequence stays a function of the run input regardless of a worker's env, and a replay reads the report back from the log without re-running git (pinned by a replay test).web/src/routes/runs/[id].tsx) gains an advisory block — headline counts + revision, ungrounded refs first with reasons, revision-mismatch line when present — projected shape-checked byweb/src/lib/plan-grounding-view.ts(the S09finding-continuity-viewpattern). No new routes.plan-grounding.ts: "grounded" only means the name exists in the committed tree at that revision — not that the plan is right. It never blocks and never edits the plan; the operator's approve/deny is the only authority.Tests (mandatory discipline)
offrecord byte-identicalplan-thinkresults, exactly the pre-wiring{text, usage}shape (src/plan-grounding-wiring.test.ts).durableAgent+executeRun+ the actualPLAN_EVENTpark, on a real git workspace read through a realLocalExecutor— grounded/ungrounded statuses and revision asserted; step sequence identical to a flag-off run of the same script; approve completes; replay re-runs no git and no model calls.plan-grounding-view.test.ts— absent field projects to undefined (page unchanged), ungrounded-first projection with counts/revision/caveat, revision mismatch surfaced, malformed input ignored, listing bounded.Verification:
pnpm run lint,pnpm run build, fullnode --test dist/**/*.test.js(2165 pass), scripts/swebench suites (143 pass, 1 pre-existing env skip;grader-sensitivityskipped locally per the standing rule — CI runs it),cd web && pnpm test(173 pass) andcd web && pnpm run build.Status rows updated in
docs/SHIP_RELEASE_PROGRAMME_2026-09-21.md(wave-4 table, S07) andAUDIT_OPEN.md.Not done (deliberately): no durable step, no notify/webhook/inbox surfaces, nothing beyond the park point — the rest of S07 stays open.