Skip to content

fix(approvals): the no-approver note names its position by its label - #36306

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36035-no-approver-position-label
Nov 22, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36035-no-approver-position-label

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread
repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1

Fixes #36035

Clause-②: no
Metadata-protocol: none

维护者速读

  • 审批动态里「无人可审」那条系统说明不再显示岗位内部名:中文读者看到岗位的中文名(如「销售经理」),没有翻译时用岗位自己的显示名,都没有才退回内部名;英文审计原文不变。
  • 接着上一轮「转交给管理员说明用岗位显示名」的修复,补上它留下的「无人可审」说明,属于控制台核心业务操作体验专题。
  • 只改读取时的显示,库里存的审计原文和旧请求的说明都原样保留,转交规则不动;出问题可直接撤回。
  • 无。

What changes

  1. The note stores its literals as a reference. no-approver-note.ts: a new note stores slots (the slate's type:value literals, noApproverSlots) in the __noApproverNote snapshot entry instead of the pre-composed who string. noApproverWho(slate, positionLabel?) composes type 'value', naming a position by the label positionLabel answers, else by its name. noApproverSentence / noApproverNoteText take an optional positionLabel and compose from slots; a note that stored who (written before this change) is rendered from that string exactly as before. noApproverNoteOf reads either shape.
  2. The read names the position the way fix(approvals): name an unstaffed position by its label on the timeline; system rows read as the system's #36030 does. ApprovalService.localizeRoutingNotes builds the label map for the note's positions through the existing notePositionLabels (reader's pack positions.NAME.label, else the declared label from positionLabelSource, else nothing) and passes it to noApproverNoteText. No second resolver: the position-name extraction is slatePositions, factored out of adminRescuePositions in admin-rescue-note.ts, which now delegates to it.
  3. The stored English is unchanged. The write site (approval-service.ts, one hunk) stores slots; the row's comment is still noApproverNoteText(note) with no render, which composes the same position 'NAME' English as before. The refusal remedy and the submitter's notice still compose from the slate with no labels (see Acceptance notes).
  4. Docs. 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.ts carries three small hunks (import, the write line, the read line); the note module could not carry the write and the read alone. overlap-check is 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 ApprovalService on ObjectQL over 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-memory i18n service, and a positionLabelSource declaring sales_manager as "Sales Manager".

  • the snapshot stores { action_id, slots: ['position:sales_manager'] }; the row stores the English with position 'sales_manager'; a no-locale read is served that English;
  • zh-CN (pack label 销售经理) reads ...担任 position '销售经理' 的成员... and no sales_manager;
  • en and ja-JP (no pack key) read position 'Sales Manager';
  • a position no pack and no declaration knows (treasury) keeps its name;
  • CONTROL: a note rewritten to the old stored shape (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 open helper (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)
  • A1 read site passes no positionLabel: 2 failed (zh-CN pack label, declared label) / 3 passed.
  • A2 write site stores the composed who again: 3 failed (snapshot shape, zh-CN, declared) / 2 passed.
  • A3 an unknown position's name dropped: 3 failed (snapshot English, unlabelled name, legacy row) / 2 passed.
  • A4 a stored who no 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).
  • eslint over the four changed source files: exit 0.

Acceptance notes

Verification

Read first: no-approver-note.ts (noApproverWho, noApproverSentence, noApproverNoteOf — the old/new shape split), the localizeRoutingNotes hunk in approval-service.ts, the write hunk at slateSource = '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:i18n and check: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

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

12 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
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 67 of 249 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 4ab1218901d7c3c757217c099f06d377e04ae452 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from d39bf6673afa0ce21e2985436e2ffdc8acc0818a — the merge of head 8a83eed2d557a0bde918b4d55746ba08f10a7bc6 into base 4ab1218901d7c3c757217c099f06d377e04ae452, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1

Final green head · area a4-D · 2026-11-22T05:43Z
Head: 8a83eed2d557a0bde918b4d55746ba08f10a7bc6
CI: 40 success, 15 skipped, 0 failed; check-expected-skips.mjs --pr 36306 OK; mergeable clean; check-governed-merges: NOT governed, 185 changed lines; l1-face CLEAN.
Declarations: Clause-②: no · Metadata-protocol: none. Fixes #36035.
Owed: L1 (L1-b). Dev report: comment 7074647364 on #36035. Points for L1: approval-service.ts carries three minimal hunks (import, write line, read line); the pins sit in the #35418 shared harness admin-rescue-named-slate.integration.test.ts; a legacy pre-composed who row renders unchanged (control pin). The two doors still composing who without labels, and the English approver-type token, are filed as #36308.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5oVqoTJkrRZcyZS4xd
L1-b · 2026-11-22T05:46Z

席位核对 — REWORK (PR body only) · head 8a83eed

No 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)

  1. "Same family, not in this PR (class a, user-visible): the decision door's refusal remedy and the submitter's approval.comment notice … still name the machine name" and "Observation (class a, user-visible): the {{who}} hole carries the approver type's English machine token in every pack". Both are user-visible residuals, and neither line cites a #N.

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

  • Shape: l1-face.mjs --pr 36306 is clean at 8a83eed, with 40 success, 15 expected skip, 0 failed and mergeable_state clean.
    • Fixes #36035 is right: To-do 1 to 3 and the acceptance line are met, and the type word is outside "label, never the name".
    • The declarations are Clause-②: no · Metadata-protocol: none, and the changeset is a patch on @objectstack/plugin-approvals. Nothing is governed, so the area lands it.
  • Store and read (no-approver-note.ts):
    • Write: a new note stores slots, the slate's type:value literals, with the same filter noApproverWho used: no platform-admin address, and colon-bearing only.
    • Stored audit text is byte-identical: the row's comment is still noApproverNoteText(note) with no render. noApproverWho(slots) with no label composes type 'value' exactly as before.
    • Read: noApproverNoteOf accepts both shapes. A malformed slots (not an array of strings) is rejected whole, and an old who note is rendered as stored. positionLabel is applied only when a render is given, so the English never carries a label.
  • Labels (approval-service.ts): localizeRoutingNotes resolves noApproverPositions(note) through fix(approvals): name an unstaffed position by its label on the timeline; system rows read as the system's #36030's notePositionLabels, the same chain the administrators' note uses: pack label positions.<name>.label, then the declared label, then the name. slatePositions is a byte-identical extraction from adminRescuePositions, which now calls it.
  • Pins (审批动态里显示内部岗位名(crm_sales_manager),系统转交的操作人显示为「—」 #35418's shared harness): 5 cases.
    • The snapshot stores the slot while the row stores the English with the name.
    • zh-CN reads the pack label and never the name.
    • A pack with no translation (ja, en) reads the declared label.
    • A position with no label keeps its name.
    • The CONTROL: an old who note renders exactly as before.
    • The report's ablations each turn a case red, and each restore was proven against HEAD.
  • Docs: approvals.mdx gains one sentence (label for a reader, name in the stored text), which is true at this head.
  • Remedy path: the decide-door refusal at approval-service.ts:5886 still composes noApproverWho(pendingApprovers) with no labels. It is not a stored note, and Approvals: the decide refusal and the submitter notice still name a no-approver position by its internal name, and the approver-type word stays English in every pack #36308 carries it (item 1).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5oVqoTJkrRZcyZS4xd
L1-b · 2026-11-22T05:59Z

席位核对 — ACCEPT (body) · head 8a83eed

I read the body alone, after REWORK 7074948179. The head is unchanged, so everything checked in that record stands.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1

席位核对

Landing · area a4-D · 2026-11-22T06:09Z · head 8a83eed2d557a0bde918b4d55746ba08f10a7bc6

Reading Value
L1 ACCEPT 7075146645 (L1-b, body read after the body-only REWORK 7074948179; head unchanged, so the earlier code reading stands)
Contract none owed: Clause-②: no, no narrowing, no packages/spec/src/**, no governed path
Check-runs 42 success, 17 expected skip (check-expected-skips.mjs OK), 0 failed, 0 pending; mergeable clean; PR-body guards and Check Changeset re-ran green after the body edit
Governed check-governed-merges --pr 36306: NOT governed, 185 changed lines
Main landing-k: K = 5 < 15; git merge-tree against origin/main clean
Overlap overlap-check: merges cleanly with origin/main; shares files with #36295, #36247, #36144, #36135 and merges cleanly with each

Ready + auto-merge now. Residuals (decide-door refusal remedy and submitter notice; the English type word in the notice) are carried by #36308.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 06:13
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 83e545a Nov 22, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36035-no-approver-position-label branch November 22, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Approvals: the note for a position with no approver still shows the position's internal name

1 participant