Repository navigation
fix(approvals): the no-approver note names its position by its label - #36306
Conversation
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1
…abel Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1
📓 Docs Drift Check12 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 — 6 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 d39bf6673afa0ce21e2985436e2ffdc8acc0818a && git checkout d39bf6673afa0ce21e2985436e2ffdc8acc0818a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4ab1218901d7c3c757217c099f06d377e04ae452 8a83eed2d557a0bde918b4d55746ba08f10a7bc6 && git checkout -B drift-repro 4ab1218901d7c3c757217c099f06d377e04ae452 && git merge --no-ff 8a83eed2d557a0bde918b4d55746ba08f10a7bc6
node scripts/docs-audit/affected-docs.mjs --json 4ab1218901d7c3c757217c099f06d377e04ae452 |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1 Final green head · area a4-D · 2026-11-22T05:43Z |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5oVqoTJkrRZcyZS4xd 席位核对 — REWORK (PR body only) · head 8a83eedNo code change is asked for. The code, pins and gates hold, as listed below. Two Acceptance-notes residuals name no carrier, although one exists. To fix (body edit; the head stays 8a83eed)
A body edit re-runs the PR-body guards. Tell me when they are green, and I will read the body alone. Checked and holding
|
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5oVqoTJkrRZcyZS4xd 席位核对 — ACCEPT (body) · head 8a83eedI read the body alone, after REWORK 7074948179. The head is unchanged, so everything checked in that record stands.
|
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1 席位核对Landing · area a4-D · 2026-11-22T06:09Z · head
Ready + auto-merge now. Residuals (decide-door refusal remedy and submitter notice; the English type word in the notice) are carried by #36308. |
Requested by Leehom · project thread
repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1
Fixes #36035
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
no-approver-note.ts: a new note storesslots(the slate'stype:valueliterals,noApproverSlots) in the__noApproverNotesnapshot entry instead of the pre-composedwhostring.noApproverWho(slate, positionLabel?)composestype 'value', naming a position by the labelpositionLabelanswers, else by its name.noApproverSentence/noApproverNoteTexttake an optionalpositionLabeland compose fromslots; a note that storedwho(written before this change) is rendered from that string exactly as before.noApproverNoteOfreads either shape.ApprovalService.localizeRoutingNotesbuilds the label map for the note's positions through the existingnotePositionLabels(reader's packpositions.NAME.label, else the declaredlabelfrompositionLabelSource, else nothing) and passes it tonoApproverNoteText. No second resolver: the position-name extraction isslatePositions, factored out ofadminRescuePositionsinadmin-rescue-note.ts, which now delegates to it.approval-service.ts, one hunk) storesslots; the row'scommentis stillnoApproverNoteText(note)with no render, which composes the sameposition 'NAME'English as before. The refusal remedy and the submitter's notice still compose from the slate with no labels (see Acceptance notes).content/docs/automation/approvals.mdx, the no-approver paragraph: the note names the position by its label for a reader and by its name in the stored text.approval-service.tscarries three small hunks (import, the write line, the read line); the note module could not carry the write and the read alone.overlap-checkis clean against #36295, #36247, #36144 and #36135, which share that file.Tests
Pins: admin-rescue-named-slate.integration.test.ts, new describe "[#36035] the no-approver note names its position by its label"
The suite's real
ApprovalServiceonObjectQLover in-memory SQLite, an organization with no administrator (so the request opens on the slate that names no one), the plugin catalog plus an app pack in a real in-memoryi18nservice, and apositionLabelSourcedeclaringsales_manageras "Sales Manager".{ action_id, slots: ['position:sales_manager'] }; the row stores the English withposition 'sales_manager'; a no-locale read is served that English;...担任 position '销售经理' 的成员...and nosales_manager;position 'Sales Manager';treasury) keeps its name;who: "position 'sales_manager'") renders exactly as before in zh-CN, en and with no locale.The pin went into the existing harness file as a sibling of the #35418 describe rather than a new file: it reuses that file's engine, organizations and
openhelper (AGENTS.md: a new pin for a component with a shared harness goes into that file).Ablations at 8a83eed (scripts/ablation-replace.mjs, each restored to the HEAD blob with an empty git diff HEAD)
positionLabel: 2 failed (zh-CN pack label, declared label) / 3 passed.whoagain: 3 failed (snapshot shape, zh-CN, declared) / 2 passed.whono longer read: 1 failed (legacy CONTROL) / 4 passed.Runs at 8a83eed
pnpm --filter @objectstack/plugin-approvals test: Test Files 126 passed (126), Tests 1813 passed (1813).pnpm --filter @objectstack/plugin-approvals typecheck: exit 0 (test layer held at its ledgered debt).Acceptance notes
__noApproverNotesnapshot entry is internal to@objectstack/plugin-approvals(nothing inpackages/spec,ui/or the package index reads it); new notes carryslots, older ones keepwho, and the read accepts both.approval.commentnotice compose the no-approver sentence from the slate with no labels, so they still name the machine name (...holds position 'legal'..., pinned inexclude-submitter.integration.test.ts). The notice is rendered per recipient at delivery, so labelling it needs the recipient's locale, not the reader's.{{who}}hole carries the approver type's English machine token in every pack, so a zh-CN reader now reads担任 position '销售经理' 的成员, where the administrators' note translates the type (岗位「销售经理」). Translating the type needs a per-type clause in all eleven catalogs; out of this card's scope.Verification
Read first:
no-approver-note.ts(noApproverWho,noApproverSentence,noApproverNoteOf— the old/new shape split), thelocalizeRoutingNoteshunk inapproval-service.ts, the write hunk atslateSource = 'no_one'.Two-minute check:
pnpm --filter @objectstack/plugin-approvals exec vitest run src/admin-rescue-named-slate.integration.test.ts -t 36035— expect 5 passed.Local gates at 8a83eed
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran: 103 derived families accounted for, 103 run, 0 NOT-MEASURED (a derived zero: every family recorded an exit code, all 0). Four first answered exit 3 (prerequisite) and were rerun after it was met:check-plugin-teardown-shape --self-test(pinned fixture commit fetched),check:skill-examples,check:i18nandcheck:dual-build-cjs-loads(after the build closure finished).overlap-check: clean against origin/main and 4 open PRs. CI families: not yet reported at open.Generated by Claude Code