Repository navigation
feat(spec): ApprovalRequestRow declares current_step_label, the sys_approval_request column's own name for the step label - #24329
Conversation
…p_label The declared sys_approval_request column's own name for the step's label, so a page bound to sys_approval_request can list the step by its label instead of by current_step, the node's machine id. step_label stays, so no reader moves. Optional member of a TypeScript interface: no runtime accept set changes. Claude-Session: https://claude.ai/code/session_019oFY6Hi35J7atvgVFnmoaK Co-authored-by: Claude <noreply@anthropic.com>
…proval-current-step-label
📓 Docs Drift Check2 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 — 143 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 3d7cd6fa1b24b99ffa7a35bb0bb6bf470d443d11 && git checkout 3d7cd6fa1b24b99ffa7a35bb0bb6bf470d443d11
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1ef0ee89d490bd243a78d370a8b464dd00778844 11acbc4350ea7f70eb912d7b02d6716e3f42f9ad && git checkout -B drift-repro 1ef0ee89d490bd243a78d370a8b464dd00778844 && git merge --no-ff 11acbc4350ea7f70eb912d7b02d6716e3f42f9ad
node scripts/docs-audit/affected-docs.mjs --json 1ef0ee89d490bd243a78d370a8b464dd00778844 |
席位核对 (seat check) · PR #24329 ·
|
| item | reading |
|---|---|
| Shape | Draft, base main, assignee zhuangjianguo. The body's line 1 is Fixes #24309, line 3 is Clause-②: yes; no other closing keyword, and #24281 stays open. 3 files, +78/-0: the contract, its pin test, and the changeset (minor on @objectstack/spec, Clause-②: yes (widening)). Two commits over merge base 2ce2e36998: ef7bb1a93 and a merge of main. |
| The member, against the card's "Done when" | ApprovalRequestRow.current_step_label?: string sits beside step_label in the display-enrichment block (approval-service.ts:224–:237). step_label is unchanged. The seat re-read the cited code on origin/main: the column is a readonly Field.text at sys-approval-request.object.ts:330; the engine writes it at request open (approval-service.ts:3568, labelOrMachineName(nodeLabel, nodeId)); rowFromRequest serves it only as step_label (:1183). |
| Pins | Three compile-time aliases (optional, exactly string | undefined, the same shape as step_label) and one runtime read-back. The dev's ablation (the member deleted) turned check:test-typecheck red with 7 errors, and the restore was proven by blob hash. |
| Accepted deviation | Declared ahead of its producer. Until #24281 lands, no door serves the member. This is triage's split (option A on #24281, which is Blocked-by: #24309), and the docblock says so. It is not a key without a planned writer: the writer is a named, queued card. |
| Local runs (dev) | spec build, check:generated (14/14 up to date), typecheck, and 694 test files passed. The consumers plugin-approvals and client were built and typechecked green. Gates: 86 derived, 86 run with exit 0, reconciled with --ran. |
| Out of scope | None reported. objectui typecheck is NOT MEASURED locally (it resolves the published spec): Acceptance notes. |
| Landing | After the contract review PASS and a fully green head: pr_ready then automerge_enable. The merge closes #24309 and unblocks #24281 (domain:services). |
Generated by Claude Code
Contract reviewServed-tier: Inputs: card #24309 (body and every comment), PR #24329 (body, file list, the net diff of 3 files, +78/-0, against the merge base 2ce2e36), and the check-runs on the head. Every cited line below was read at that merge base with git show. The seat's ACCEPT comment on the PR was not weighed. This record is adversarial to the dispatch by design. ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
|
Contract review adopted ·
Generated by Claude Code |
Fixes #24309
Clause-②: yes
What this changes
ApprovalRequestRow(packages/spec/src/contracts/approval-service.ts) now declares an optionalcurrent_step_label?: stringin its display-enrichment block, besidestep_label. Its docblock says what it is: the declaredsys_approval_request.current_step_labelcolumn under its own name, served so that a page bound tosys_approval_requestcan list the step by its label. Such a page names the object's declared fields, andstep_labelis not one of them, so today the request page's strip can list onlycurrent_step, the node's machine id.step_labelstays, so no reader moves.This is the spec half of the split that triage took on the consumer card (option A). The services half serves the member from plugin-approvals'
rowFromRequestand lists it on the strip. That half is the consumer card's own work: #24281 remains open, and this PR does not touchpackages/plugins/plugin-approvals/**or the request page.Files
packages/spec/src/contracts/approval-service.ts: the member and its docblock.packages/spec/src/contracts/approval-service.test.ts: four pins beside the existingacted_asandorganization_idpins:{} extends Pickalias that turns red on a required member;string | undefinedalias;step_labelat the same shape;.changeset/24309-approval-current-step-label.md:minoron@objectstack/spec,Clause-②: yes (widening).No generated artefact moved. After a rebuild,
check:generatedreports all 14 artefacts up to date.api-surface/records that the interface exists, not its members.Premise, re-read on
origin/main52ff308b8ApprovalRequestRowis atapproval-service.ts:138, andstep_label?: stringis at:223, with nocurrent_step_label.sys_approval_requestdeclares the columncurrent_step_label(sys-approval-request.object.ts:330, a readonlyField.text).rowFromRequestserves the label only asstep_label(approval-service.ts:1183).Who reads the type
This repo (
git grep ApprovalRequestRow):@objectstack/spec: the contract and its test;@objectstack/client;@objectstack/plugin-approvals: the producer,action-link-pages.ts, and seven test files.No
keyof ApprovalRequestRowmap or exhaustiveRecordover its keys exists, so an optional member breaks no reader.objectui, read at both its pin before the merge (
5e15928b4631) and its pin after it (0707b4ae3712):packages/app-shell/src/views/approval-decision/ApprovalDecisionPanel.tsximports the spec type, and only through aPickofpayloadandpayload_display;apps/console/src/services/approvalsApi.ts) declares its own localApprovalRequestRowand readsstep_labelfrom it.Neither is affected.
Verification
Final head
11acbc435(the claim's commitef7bb1a93, plus a merge oforigin/main2ce2e3699made withos-regen-merge.sh). Every build and test ran throughos-verify-lock.sh, except the one-file probetscbelow.pnpm --filter @objectstack/spec build: VERDICT command-exit 0. The member reaches onlydist/contracts/index.d.tsandindex.d.mts; no emitted JS carries it.pnpm --filter @objectstack/spec check:generated: exit 0, "All 14 generated artifacts are up to date". Nothing was regenerated.pnpm --filter @objectstack/spec typecheck: VERDICT command-exit 0. This includescheck:test-typecheck, which compiles the new pin file (counted with--listFiles): "52 file(s) / 242 error(s) / 132 pinned signature(s) held", unchanged from the ledger.pnpm --filter @objectstack/spec test: VERDICT command-exit 0. "Test Files 694 passed (694)", "Tests 21042 passed, 1 todo". The pin file alone: 9 of 9 passed (8 before this PR).turbo run build --filter='@objectstack/plugin-approvals^...' --filter='@objectstack/client^...' --concurrency=2: "34 successful, 34 total". Thenpnpm --filter @objectstack/plugin-approvals --filter @objectstack/client typecheck: VERDICT command-exit 0,tsc --noEmitpluscheck:test-typecheckOK for both. The build filter is the two consumers' dependency closure,@objectstack/specincluded.ef7bb1a93: a probe file in plugin-approvals typed two rows asApprovalRequestRow. Withcurrent_step_label: 'Manager Review'the row compiled clean. Withcurrent_step_label: 42,tscprinted exactly one error, TS2322 "Type 'number' is not assignable to type 'string'". A stale.d.tswould have answered TS2353 on both rows, so the consumer reads the rebuilt declaration. The probe was deleted, andgit statusis clean.11acbc435, throughscripts/ablation-replace.mjs: the anchor went from 1 hit to 0 and the blob frome1e2e927to9515560b. The member deleted,check:test-typecheckwent red: "src/contracts/approval-service.test.ts: 7 type error(s)". Restored: the blob equals the HEAD blobe1e2e927, andgit diff HEADis empty. The pin is a compile-time pin: its teeth arecheck:test-typecheck, inside the spectypecheckthat the requiredTypeScript Type Checkjob runs.dispatch-gates --commands(no paths) derived 86 families at11acbc435. All 86 ran with exit 0.dispatch-gates --ran: "86 derived, 86 run, 0 NOT-MEASURED, 0 UNRUN".Acceptance notes
current_step_label. The member is optional, and its docblock says it is served from plugin-approvals: the approval request page's highlights strip shows the current step's machine id (current_step, such as approve_step) where the approvals get serves the step's label only as step_label #24281 on. That split and its order are triage's ruling on the consumer card.@objectstack/spec, not this worktree, so a local run would measure nothing about this diff. The one spec-type import is aPickof two members this PR does not change. The full battery'sConsole Pin Gatebuilds objectui at its pin againstmain.test:repo(the vitestrepoproject): this diff touches none of its tests. Thecheck:dev-prereqsscan: its self-test is green, but its existence half needs the whole workspace built, which this card does not need.TypeScript Type Check,Test CoreandLint & Repo Gatesrun the full set on this PR.origin/mainmoved three commits after the merge (2b7fc52c3,889bf122e,85be049d5). None of them touchespackages/specor these files, so the branch was not merged again.Generated by Claude Code