Repository navigation
feat(scenarios): a card names the agent action an operation goes through (via) - #36503
Conversation
…ugh (via) The Build grant check leaves a write the persona's set withholds to the run, never a pass, when the operation names the card's agent action as its route and the build declares that action. The loader refuses a via that is not one of the card's agent actions on the operation's object, and a via on a refused write. leave_balances, requisition_to_receipt and travel_expense name decide_approval_step on the manager's approval. PAY-0044 moves off 2026-10-01 so the card's last-30-days window and the platform's preset agree. Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check9 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 54a1b42b0d9830d60758381ecf978b8b6485d29d && git checkout 54a1b42b0d9830d60758381ecf978b8b6485d29d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9abc732132a2f723627d585b049e2cc10869db19 8eb5896ba5786b2c104de77c70291760f5608875 && git checkout -B drift-repro 9abc732132a2f723627d585b049e2cc10869db19 && git merge --no-ff 8eb5896ba5786b2c104de77c70291760f5608875
node scripts/docs-audit/affected-docs.mjs --json 9abc732132a2f723627d585b049e2cc10869db19 |
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY Contract-review-claim: Taking the review (declaration face, TIER_DEFAULT; returned to the lane by l2-review#4). |
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY Contract reviewServed-tier: Face: declaration ( ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY 席位核对L1 verdict: ACCEPT at head
|
Requested by Steve · project thread
Part of #36206 (item 3 and the PAY-0044 position land here; the column-total half of item 2 waits on the eval seat's re-score and stays open on the card).
Clause-②: yes (widening)
Metadata-protocol: none
Ruling-ref: 7077801044 (item 3 C, PAY-0044 folded)
维护者速读
What changes
Against
origin/main59392ed.via: the card's own agent action the write is designed to go through. Optional; a card without it reads exactly as before.viathat is not one of the card'srun.agentActionson the operation's object (the ruled check), and aviaon arefusedoperation (a refused write has no route; without this the key would be accepted and do nothing).gradePersonaGrants)persona-grant:PERSONA:OBJECT:VERBis not measured, never a pass, when the set withholds the verb AND every operation that needs it has a designed route the build declares: itsviaaction, or (unchanged) the card's confirm-gated action for apending_confirmationwrite. A set that grants the verb still passes. An operation withoutviais graded as today, so one unrouted applied write of the same verb keeps the check measured. The existing confirm-gated branch and its detail text are unchanged; theno designed routepin (start_qa, non-confirm action, novia) stays green.via: decide_approval_stepon leave_balancesmanager_approves_step_one, requisition_to_receiptmanager_approves_level_oneand travel_expensemanager_approves_step_one. Not tagged (no measured run yet): asset_lifecyclemanager_approves_scrap, order_to_cashapprove_discount. A library pin lists exactly the three tagged operations.ACH-1002-058), the same one-day move PR #36320 gave TK-0091, and the seed rule names the exception. The library pin of last-N-days truths that change under the platform's preset flips to[].collected_by_team_last_30_dayswest becomes 58300 (was 53500; the payment now falls inside the card's 30-day window too). The only other reader ofpayment_dateis the collection-call automation check (paid by due + 15 days), which reads the same for INV-1058 either way.Clause-②: yes (widening)reading:src/index.tsdoesexport * from './schema.js', soOperationSchemaandScenarioCardSchemaare on the package's.entry (package.jsonexports["."]maps todist/index.*);PersonaGrantNeed(gainsroutedVia) is on./scoreviaexport * from './scenario-tags.js'.Read first (by risk):
packages/qa/scenarios/src/score/scenario-tags.ts:designedRoutesand the new branch at the top ofgradePersonaGrants's needed path; the old confirm branch must read unchanged when no operation namesvia.packages/qa/scenarios/src/loader.ts: theviablock in the operations loop.docs/qa/scenarios/order_to_cash.json: PAY-0044 row and the seed-rule sentence.Two-minute check:
pnpm --filter @objectstack/scenarios exec vitest run test/score/scenario-tags.test.ts test/refusals.test.ts test/library.test.ts, expect all green, including the newan applied write the card routes through its own actioncase.Tests
scenario-tags.test.tscase: with the read-only contractor andstart_qaroutedvia set_task_status, the update check is not measured with the named detail and counts in neither figure; a granting set still passes; a build without the action keeps it measured (fails); the card withoutviafails as before; a second unrouted update keeps it measured.refusals.test.tsrows: an undeclared action, the card's action on another object, aviaon a refused write.library.test.ts: the tagged-operations pin; the last-N-days pin flipped to[].order-to-cash.test.ts: thecollected_by_team_last_30_daystruth updated to west 58300.Package suite and typecheck (head bb187ca, merged main)
The package's
typecheckincludestest/**. The commit after that one adds only the changeset.Ablations (one-time, restored to HEAD; not left in the tree)
Both subjects resolve from
src/(relative imports), so no rebuild sat between mutation and run.Derived gate families (head 8eb5896): 68 derived, 66 exit 0, 2 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commands(merge base 59392ed), each run with its exit captured before any pipe, then--ranwith the codes: "68 derived famil(ies) accounted for — 66 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".pnpm check:dual-build-cjs-loads, reason: PREREQUISITE NOT MET (reads built output of every package; this worktree built only the scenarios closure). CI'sLint & Repo Gatesruns it.pnpm check:type-check-debt, reason: its closure build never got a turn on the shared verify lock (queue-timeout, held by another session's dogfood run). The diff touches no tsconfig or typecheck script; the scenarios package typecheck is green above. CI'sLint & Repo Gatesruns it.check:nul-bytes,check:cross-package-test-inputs,check:published-files,check:doc-authoring,check:issue-citationsandcheck:adr-0087-registration.!in the title, no(narrowing)arm).Acceptance notes
viaon arefusedoperation goes one step past the ruled text (which names only the not-an-action refusal). Reason: grading readsviaonly on writes that need a grant, so on a refused write the key would be accepted and ignored. It is a refusal on a key that is new in this PR; no card writes it.manager_approves_scrap(decide_scrap_request) and order_to_cashapprove_discount(decide_discount_approval) have the same decide-through-action shape, but no measured run shows the grant check failing there yet.september_commission.Verification
Item 3 is graded on the next gallery refresh: leave_balances and requisition_to_receipt Build and Iterate should read
persona-grant:dept_manager:approval_step:updateas not measured when the build routes the decision throughdecide_approval_stepwithout granting the update, and as passed when it grants it.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY