Repository navigation
spec: the flows.approvals translation rows read live, and ApprovalRequestRow's label docblocks name the reader's-locale label - #25103
Conversation
…Row's label docblocks name the reader's-locale label plugin-approvals now serves a request's flow, step and object labels in the reader's locale (reader-locale-labels.ts, commit ba69b16). Flip the `flows.approvals` translation ledger row and its `label` child from planned to live citing that reader, and say in the ApprovalRequestRow docblocks that process_label / step_label / current_step_label / object_label are the reader's-locale label falling back to the stored or schema label. Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude <noreply@anthropic.com>
…vals flip in the ledger README Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude <noreply@anthropic.com>
…ocblocks Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 144 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 14c93525ac630f2e6c44650fd15e7c6757bfb712 && git checkout 14c93525ac630f2e6c44650fd15e7c6757bfb712
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8f59304ddc45825f1f4d63f6956e07a75df68c9d da0364f8253b920b3ad6075405c9f380a302b8c7 && git checkout -B drift-repro 8f59304ddc45825f1f4d63f6956e07a75df68c9d && git merge --no-ff da0364f8253b920b3ad6075405c9f380a302b8c7
node scripts/docs-audit/affected-docs.mjs --json 8f59304ddc45825f1f4d63f6956e07a75df68c9d |
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Seat re-read of the check-runs at landing: all 42 runs on |
Closes #24979
Clause-②: no (ledger and docblock text only: no shape, key, default, accepted value or export moves)
What
The follow-up owed by #24863's landing (PR #24977, commit ba69b16). plugin-approvals now serves an approval request's flow, step and object labels in the reader's locale (
packages/plugins/plugin-approvals/src/reader-locale-labels.ts). The spec side still said otherwise in two places. This PR fixes both:packages/spec/liveness/translation.json:flows.approvalsand its one drilled childflows.approvals.labelflipplannedtolive. This is the step the row's own planned note asked for ("Flip toliveon the commit that cites that reader"). Both rows now cite the reader byfile#symbolanchors. The child also cites its producer chain. The generated count shardliveness/state-counts/translation.mdwas regenerated withgen:liveness-counts(live 29 to 30, planned 1 to 0). ThetranslationNotes cell inliveness/README.mdgains one sentence for the flip, as the gate's stale-count message asks.packages/spec/src/contracts/approval-service.ts: theApprovalRequestRowdocblocks forprocess_label,step_label,current_step_labelandobject_labelnow say what is served. Each is the reader's-locale label, falling back to the stored snapshot (forobject_label, the object's schema label). The stored columns are never rewritten by a read.Text only: no type, key, default, accepted value or export moves. The docblocks ship in
dist/contracts/index.d.ts, so this carries a@objectstack/specpatchchangeset (.changeset/24979-approvals-label-live.md).Each docblock statement, verified against plugin-approvals at origin/main a39389e
None of these files is touched by this diff, so the line numbers hold at this PR's head too.
flows.FLOW.label, the step label fromflows.FLOW.approvals.NODE.label, the object label fromobjects.OBJECT.labelreader-locale-labels.ts:73flowLabelKey,:78approvalStepLabelKey,:153objectLabelKeyExecutionContext.locale, negotiated byresolveBundleLocalereader-locale-labels.ts:128-155readerLabelsFor(:134negotiation,:140service.t(key, locale));approval-service.ts:8250-8259readerLabels;approvals-plugin.ts:273wiresi18nServiceSourcereader-locale-labels.ts:132-133(no locale or no service givesundefined),:142(a miss echoes the key and picks nothing),:178,:181,:188(overlay only when picked)listRequests,getRequestand a write's echoed requestapproval-service.ts:8229-8230(listRequests),:8371-8372(loadRequest);getRequest(:8337-8338) andreadBackRequest(:8326, every decision or write echo) go throughloadRequeststep_labelandcurrent_step_labelare always the same valueapproval-service.ts:1270,:1275(both from onerequestDisplayLabelsvalue);reader-locale-labels.ts:182-183(both overlaid together)display-labels.ts:79-80requestDisplayLabels(column, else the node-config snapshot, else the humanized name)reader-locale-labels.ts:56-59(header, "What stays"); the overlay mutates only the served row object (:174-189)object_labelfalls back to the object's schema labelapproval-service.ts:7429-7433objectLabelOf(schema.label), set at:7378and:7574-7575before the overlayDeferred, not in this PR
The optional
flowLabelKey/flowApprovalLabelKeyhelper besideflowRefusalMessageKey(issue body, "Optional") is not added. A new@objectstack/specexport is a widening, which the claim's Clause-②noexcludes.reader-locale-labels.tskeeps spelling both keys locally, held toTranslationDataSchemabyreader-locale-labels.test.ts.Verification (head da0364f)
All runs below were taken on this head (no commit after them). The spec build and tests ran under the shared verify lock on a shared box.
pnpm --filter @objectstack/spec build:VERDICT command-exit 0. The edited docblocks are indist/contracts/index.d.ts(one hit for the new text), so the published artifact moves and the changeset is apatch.pnpm --filter @objectstack/spec typecheck(tsc, scripts and test typecheck) followed byvitest run:Test Files 778 passed (778),Tests 22683 passed, 1 todo;VERDICT command-exit 0.pnpm --filter @objectstack/spec test:repo:Test Files 72 passed (72),Tests 1237 passed (1237);VERDICT command-exit 0.pnpm --filter @objectstack/spec check:liveness: red before regeneration, as it should be (state-counts/translation.md is STALE: live 29 to 30, planned 1 to 0). Aftergen:liveness-countsit is green: everypath#symbolanchor resolves (976 of 976), key-mention 747 anchored plus 1 exempt, andstate-counts/ is current.pnpm --filter @objectstack/spec check:generated:All 14 generated artifacts are up to date, against the dist this branch built.node scripts/pm/dispatch-gates.mjs --commandsderived 84 families for this diff, and all 84 were run. 81 exited 0.--ranwith recorded exit codes:84 derived, 81 run, 3 NOT-MEASURED, 0 UNRUN. Three were NOT MEASURED. Each exited 3 because a build it needs was missing, so it checked nothing:@objectstack/lint check:doc-formula-expressions(needs formula and lint dist),check:dual-build-cjs-loads(needs every package's dist), andcheck:lean-entry-closure(needs objectql dist). They are left to CI. The changeset gates (check-changeset-no-major,check-adr-0087-registration,check-empty-changeset,check:changeset-gate-self-tests),check:nul-bytes,check-spec-docblock-symbol-anchors,check:api-surfaceandcheck:docsare among the 81 that exited 0.pnpm lint(repo-wide) was not run locally. It belongs to CI.Acceptance notes
packages/spec(all 14 open PRs' file lists scanned before opening).flow_steps[].labelhas no docblock that names the authored label (its member docblock is silent on the label's source), so it is left unchanged, althoughattachFlowSteps(approval-service.ts:8501) names steps by the same pick.Generated by Claude Code