Skip to content

fix(approvals): name an unstaffed position by its label on the timeline; system rows read as the system's - #36030

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-nhcent
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-nhcent

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgT9mNgD8oKM93bFzg5

Fixes #35418

Clause-②: yes (widening) — @objectstack/plugin-approvals adds the optional ApprovalServiceOptions.positionLabelSource; @object-ui/i18n adds approvalsInbox.systemActor and approvalsInbox.actSystemNote; nothing removed
Metadata-protocol: none

维护者速读

  • 审批动态里「转交给管理员」那条说明不再出现内部岗位名:中文读者看到「岗位「销售经理」无人任职」,没有翻译时用岗位自己的显示名,都没有才退回内部名。
  • 系统自动写的条目(转交说明、排除提交人、无人可审、自动撤销等)操作人显示「系统」,说明类条目类型显示「系统说明」,不再是「评论 · —」;真人评论照旧是「评论 · 某人」。
  • 属于「控制台核心业务操作体验」专题;只改显示,库里存的审计原文、转交规则都不动,出问题可直接撤回。
  • 已知没做:「无人可审」说明里的「担任 position 'x' 的成员」也带内部岗位名(存的是拼好的整句),列为后续,不在本 PR。

What changes

  1. The routing note names a position by its label. admin-rescue-note.ts: adminRescueNoteText(note, render, positionLabel?) maps each unheld-position clause's value through positionLabel before rendering; adminRescuePositions lists the note's position names. ApprovalService.localizeRoutingNotes builds the map per read (notePositionLabels): the reader's pack positions.<name>.label (new ReaderLabels.positionLabel, key spelled by positionLabelKey beside the flow keys), else the declared label from the new optional ApprovalServiceOptions.positionLabelSource, else nothing (the name stands). ApprovalsServicePlugin wires that source to the metadata service's get('position', name), resolved lazily like the i18n source. A throwing source is caught: the read never fails on a label. The row's stored English comment (the audit text, and what a read with no locale is served) is unchanged and keeps the name.
  2. The timeline names the platform's rows. ApprovalActionTimeline.tsx: a row with no actor_id reads its actor as approvalsInbox.systemActor ("System" / 系统) instead of "—"; a comment row with no actor (isSystemNote, new utils/approvalSystemNote.ts) reads its kind as approvalsInbox.actSystemNote ("System note" / 系统说明) instead of "Commented". system:sla keeps "System (SLA)". New keys in all eleven packs, translated.
  3. Docs. content/docs/automation/approvals.mdx, "When a slate names no one": the stored note keeps the English with the position's name; a reader is served it in their language with the position's label, shown as a system note (the Docs Drift Check listed this page).

The card allowed 「转交」 or 「系统」 for the kind. The three no-actor comment notes are not all hand-offs (admin routing, submitter exclusion, no approver), and telling them apart on the client would need a new field on the actions contract, so they share "System note" and the sentence itself says what happened. This reading was stated in the claim.

Tests

Approvals plugin
  • admin-rescue-note.test.ts: a position clause takes the label it is given and only a position does (team literal and an unknown position keep their names); a clause the pack lacks falls back to English with the label; the stored English keeps the name; adminRescuePositions dedupes and skips non-position and empty slots.
  • reader-locale-labels.test.ts: positionLabelKey spelling, held to TranslationDataSchema by the existing round trip; the pick reads positions.<name>.label in the negotiated locale.
  • admin-rescue-named-slate.integration.test.ts, new describe [#35418] the note names an unheld position by its label (real in-memory i18n with the plugin's catalog plus an app pack): zh-CN reads 「岗位「销售经理」无人任职」 and no sales_manager; en reads the declared label "position 'Sales Manager' has no holder"; ja-JP with no translation reads the declared label; CONTROL the stored row and a no-locale read keep the name; a throwing source keeps the name and does not fail the read.
  • Run: those three files 45 passed; approval-service.test.ts + submitter-exclusion-note.test.ts 486 passed. pnpm --filter @objectstack/plugin-approvals typecheck exit 0.
Console and i18n
  • ApprovalActionTimeline.systemNote-35418.test.tsx: en "System note · System" with no "Commented" and no "—"; a person's comment keeps "Commented · Bob" (live control in the same DOM); a no-actor cancel row names "System"; zh 「系统说明 · 系统」 and 「评论 · Bob」. 3 passed.
  • pnpm --dir ui exec vitest run packages/i18n/ (includes all-locale key parity): 105 files passed, 1957 passed, 13 skipped.
  • eslint over the changed files: 0 errors (one pre-existing no-explicit-any warning in ApprovalActionTimeline.tsx, not on a changed line).

Follow-ups (not in this PR)

  • The no-approver note's {{who}} ("…a member who holds position 'crm_sales_manager'…") is stored pre-composed (noApproverWho), so it still names the machine name; labelling it means storing the slots instead of the joined string.

Verification

Read first: admin-rescue-note.ts (labelledPosition), ApprovalService.localizeRoutingNotes and notePositionLabels, the positionLabelSource wiring in approvals-plugin.ts, ApprovalActionTimeline.tsx (actionText, actorName).

Two-minute check: cd packages/plugins/plugin-approvals && pnpm exec vitest run src/admin-rescue-named-slate.integration.test.ts; expect the [#35418] describe green.

Local gates at 064e714

node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran: 109 derived families accounted for, 109 run, 0 NOT-MEASURED (all with exit 0; the 28 families the docs commit added were run on 064e714, the other 81 on cfacf20, which differs from it only by that docs page). Four first answered on a shallow, partly built clone and were rerun after the prerequisite: check-plugin-teardown-shape --self-test (pinned fixture commit fetched), pnpm --dir ui exec vitest run scripts/ (needed the @objectstack/client dist; then 172 files passed, 2 skipped), check:dual-build-cjs-loads and check:i18n (after a full pnpm build). node scripts/pm/overlap-check.mjs: clean against origin/main 9b3227f and 4 open PRs sharing the locale packs or approval-service.ts (#36018, #35994, #35969, #35968). CI families: not yet reported at open.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgT9mNgD8oKM93bFzg5

…ne; system rows read as the system's

The admin_rescue note a reader is served names an unheld position by the
reader's pack label (positions.<name>.label), else its declared label
(new optional ApprovalServiceOptions.positionLabelSource, wired to the
metadata service), else its name. The stored English keeps the name.

The console timeline names a row with no actor "System", and a comment
row with no actor "System note" instead of "Commented · —".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgT9mNgD8oKM93bFzg5
@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 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-approvals, touching 14 documentable anchor(s).

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/approvals.mdx (via ApprovalService (symbol, a top-level class))
  • content/docs/automation/flows.mdx (via ApprovalService (symbol, a top-level class))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-6.mdx (via ApprovalService (symbol, a top-level class))
  • content/docs/releases/v18/18-1.mdx (via ApprovalService (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 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 9a98a4675683a405aa911cd6c3e31f88bfe24151 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from bc6aafdbc8f7ff0972552bb7c924149e0b5c6eef — the merge of head 064e714dfb19a7caed674bab07df13922349bf53 into base 9a98a4675683a405aa911cd6c3e31f88bfe24151, 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 bc6aafdbc8f7ff0972552bb7c924149e0b5c6eef && git checkout bc6aafdbc8f7ff0972552bb7c924149e0b5c6eef
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9a98a4675683a405aa911cd6c3e31f88bfe24151 064e714dfb19a7caed674bab07df13922349bf53 && git checkout -B drift-repro 9a98a4675683a405aa911cd6c3e31f88bfe24151 && git merge --no-ff 064e714dfb19a7caed674bab07df13922349bf53

node scripts/docs-audit/affected-docs.mjs --json 9a98a4675683a405aa911cd6c3e31f88bfe24151

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 9a98a4675683a405aa911cd6c3e31f88bfe24151 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…aming the position by its label

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgT9mNgD8oKM93bFzg5
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T09:10Z. The brief handed to the isolated declaration-face reviewer for PR #36030 (owed by the changeset's Clause-②: yes (widening) line). The record follows as its own comment.

Contract review brief — PR #36030 @ 064e714dfb19a7caed674bab07df13922349bf53 (card #35418)

You review at TIER_DEFAULT. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --face declaration — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #35418: its body and EVERY comment (rulings and earlier records included)
· PR #36030: its body, its file list, and the net diff against main at 064e714dfb19a7caed674bab07df13922349bf53
· the check-runs on 064e714dfb19a7caed674bab07df13922349bf53: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-36030/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP

维护者速读

  • 记录页审批卡里那条“已转交管理员”的动态,岗位现在显示名称(比如「销售经理」),不再显示 crm_sales_manager 这样的内部名。先找读者语言包里的译名,没有就用岗位声明的名称,都没有才退回内部名。
  • 系统自动写的条目,操作人显示「系统」,类型显示「系统说明」,不再显示「—」和「评论」。真人写的评论不受影响。
  • 数据库里存的英文审计记录不变,改的只是显示给读者的内容。
  • 要你做什么:现在不需要。

席位核对 — ACCEPT (L1-c) · repo:objectstack#1 · head 064e714dfb · 2026-11-21T09:11Z

Read at 064e714dfb: 23 files, +361/−6. The face is Clause-②: yes (widening), Metadata-protocol: none. It does not touch packages/spec/src/** or docs/adr/**, so it is not a contract face and no L2 is owed. Requested by the b1-CX card thread. Card #35418 is outside the record-page epics, and I read it as a peer L1.

Checked and fine

  • Shape. Draft, base main. Fixes #35418 is right: both "to do" items are delivered. The card offered 「转交」 or 「系统」 for the type, and the claim reading puts all three system notes under one name, 「系统说明」. The note names the position by its label, so 「crm_sales_manager」 no longer reaches the page wherever a label is known.
  • Server, plugin-approvals.
    • listActions → localizeRoutingNotes collects the abandoned slate's position:<name> entries once each (adminRescuePositions).
    • notePositionLabels takes the reader's pack (positions.<name>.label, the same pick as the flow, step and object labels) first, then positionLabelSource. A position neither source knows keeps its name.
    • A throwing source is caught, so the read never fails.
    • labelledPosition rewrites only the approvalAdminRescuePositionUnheld clause's value, and only on the render path. The stored English (the audit text) keeps the name, and a reader with no locale is still served it.
  • The plugin wiring. positionLabelSource resolves metadata lazily, guards a missing service or get, and returns a label only when it is a non-blank string. It reads only a label for a position whose name the reader is already served, so no new data is disclosed.
  • Console.
    • isSystemNote means a comment row with no actor_id. ADR-0118 D1 writes actor_id: null exactly on the rows no person took: the rescue, exclusion and no-approver notes, plus cancel, recall and escalate.
    • A row with no actor now reads 「系统」 for its actor. system:sla keeps its own label, and a person's comment keeps 「评论」 and its author.
    • ApprovalActionTimeline is the only renderer of these rows.
  • Locales. approvalsInbox.systemActor / actSystemNote are in all 11 packs, with real text in each.
  • Tests.
    • The integration test covers: zh-CN from the app pack with no machine name, the declared label for en and ja-JP, the CONTROL that the stored row keeps the name, and the unknown position plus a throwing source.
    • The systemNote-35418 timeline test covers the console side.
    • The body reports dispatch-gates --ran 109/109.
  • Docs and changeset. The approvals.mdx sentence and the changeset (four packages, patch, with the widening named) read true against the diff, sentence by sentence.
  • Gates. At 064e714dfb: 63 success, 11 expected skips, 0 failed, 0 pending. mergeable_state is clean and l1-face is CLEAN.

Note (not owed)

  • There is no browser reading on HotCRM, where the card's acceptance line was seen. The console change is two label branches, and both are pinned through the real component, so I do not hold the ACCEPT for one. If the seat wants the card's exact line seen on a page, the reading belongs on the card at close.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 064e714dfb19a7caed674bab07df13922349bf53
Local-runs: none

Inputs read: card #35418 (body, triage comment, claim comment), PR #36030 (body, 23-file list, the net diff origin/main...pr-36030 at this head), and the 74 check-runs on this head. All 74 concluded success or skipped. None is failing, pending or cancelled. That includes Check Changeset, Type Check UI, Test Core 1-10, Test UI 1-16, Lint UI, Lint & Repo Gates, Spec property liveness and the PR-body guards. Those conclusions are the gate verdicts. Nothing was re-run.

① Derived judgments

  1. ApprovalServiceOptions.positionLabelSource (public: ApprovalServiceOptions is exported from @objectstack/plugin-approvals's index). Verdict: RIGHT.
    • The field is optional (positionLabelSource?). It is a function from a position name to a promise of a string or undefined.
    • With no source, notePositionLabels skips the declared-label step. A position with no pack label is left out of the map, and labelledPosition keeps the clause's name, which is the behaviour on main.
    • Failure is safe. The await is in a try with an empty catch. A non-string or whitespace answer is ignored. The integration test "a failing source does not fail the read" pins this.
    • Widening only. Nothing is removed and no existing member changes its type.
  2. Plugin wiring (approvals-plugin.ts). Verdict: RIGHT.
    • The source resolves ctx.getService('metadata') lazily on each call, like the i18n source. A throw on an empty slot answers undefined, and so does a service with no get function.
    • It calls metadata.get('position', positionName) and returns item.label only when that is a non-empty string.
    • A rejection from metadata.get itself is not caught in the wiring, but the service's try catches it.
    • position is not in PACKAGE_SLOTTED_METADATA_TYPES, so MetadataManager.get reads it by name. It cannot raise PackageScopedNameRefusedError here.
  3. Fallback order. Verdict: RIGHT where it applies.
    • In notePositionLabels, the reader's pack comes first: labels.positionLabel(name), which is pick(positionLabelKey(name)). positionLabelKey spells positions.NAME.label.
    • The pack is read in the locale that negotiatedReaderLocale returns. A miss echoes the key, and render treats that echo as undefined.
    • Second comes positionLabelSource, the declared label. Third, the map has no entry, so the internal name stands.
    • The key positions.NAME.label was already declared on main (translation.zod.ts, the positions face, which translatePosition overlays). The new key helper adds no new authorable key, and the existing round-trip test holds it to TranslationDataSchema.
    • The three-step order runs only when readerLabels(context) is defined, i.e. the read has a locale and an i18n service exists. See N1.
  4. The stored English audit comment. Verdict: RIGHT (unchanged).
    • ApprovalService.localizeRoutingNotes builds actions freshly from engine.find('sys_approval_action', …) via rowFromAction. overlay assigns row.comment on that in-memory array only, and the method makes no write.
    • adminRescueNoteText's no-render overload is the stored-English path. It never sees positionLabel, because the label map applies only inside the render branch.
    • The CONTROL test pins both the stored row ('sales_manager') and the served text of a no-locale read.
    • labelledPosition rewrites only approvalAdminRescuePositionUnheld clauses. A team: literal with the same name keeps its name, which the unit test pins. adminRescuePositions de-duplicates names and drops empty or non-position slots.
  5. The ReaderLabels.positionLabel member, the third parameter of adminRescueNoteText, and the PositionLabelOf, adminRescuePositions and positionLabelKey exports. Verdict: RIGHT (internal).
    • None of these is re-exported from the package index, and nothing outside plugin-approvals references ReaderLabels.
    • Adding a required member to that interface therefore narrows no published surface.
  6. Console (ApprovalActionTimeline.tsx, new utils/approvalSystemNote.ts). Verdict: RIGHT.
    • actorName: system:sla is checked first and keeps "System (SLA)". After that, a falsy actor_id gives approvalsInbox.systemActor ("System"). Otherwise the label is actor_name or the formatIdentity output, as before.
    • actor_name is only ever set from a resolved actor_id (the server's resolveUserNames loop). So no person row without an actor_id loses its name.
    • actionText: isSystemNote (a comment row with no actor_id) is tested first and gives approvalsInbox.actSystemNote ("System note"). A person's comment keeps "Commented", which the live control in the same DOM pins. A no-actor cancel keeps its kind and names "System".
    • Both render surfaces use this one component: RecordApprovalsPanel and ApprovalDecisionPanel's thread. DecisionComment renders only approve, reject and revise rows, so it is unaffected.
  7. New i18n keys (public: @object-ui/i18n locale objects). Verdict: RIGHT.
    • approvalsInbox.systemActor and approvalsInbox.actSystemNote are present in all eleven packs: ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans and zh-Hant.
    • Each pack places them beside systemSlaActor and actComment in the approvalsInbox block, which is the prefix tr() reads. The text is translated in every pack, never left in English.
    • The additions are additive only.
  8. Docs (content/docs/automation/approvals.mdx). Verdict: RIGHT.
    • The page says the row stores the English with the name, the reader is served their language with the label (pack, else declared label), and the note shows as a system note by the system. This matches the code.
    • The drift check's other hit, flows.mdx, names ApprovalService only generically and states nothing this diff changes. The release pages it listed are release-owned and were correctly left alone.

② Semver level

  • Changeset: .changeset/35418-approval-timeline-system-notes.md bumps four packages, each as patch: @objectstack/plugin-approvals, @object-ui/app-shell, @object-ui/i18n and @object-ui/console.
  • Clause-② line: Clause-②: yes (widening) is line-initial in both the changeset body and the PR body. It names the optional ApprovalServiceOptions.positionLabelSource and the two new @object-ui/i18n keys, and says nothing is removed. This is RIGHT: the diff publishes exactly those two widenings, plus internal helpers that are not exported.
  • Metadata-protocol line: Metadata-protocol: none is RIGHT. No spec file changes, and positions.NAME.label was already authorable on main. No new key, value or metadata type reaches a metadata author.
  • Level: under AGENTS.md (Post-Task Checklist item 3), kind none takes patch, and a non-protocol widening ships patch. So patch is RIGHT.
  • The console bump: @object-ui/console has no file in the diff. Its bump is harmless because it sits in the changeset fixed group with the other packages, and Check Changeset is green.

③ Boundary flags

  • Permission or visibility effect of reading position labels through the metadata service. Answered; no escalation.
    • ctx.getService('metadata') is the raw MetadataManager (packages/metadata/src/plugin.ts). Its get(type, name, packageId?) takes no caller context, so the read runs as the system.
    • The per-caller gate for /meta documents lives in the REST layer (packages/rest/src/meta-item-read-gate.ts). This server-side read bypasses it.
    • What reaches the reader is one string: the position's label. The wiring reads no grants, holders or description.
    • That label is for a position whose machine name the same note already shows, on main, to every caller who passes listActions' own request-visibility gate. So the reader learns a friendlier name for a fact they could already read, not a new fact.
    • Metadata reads are not organization-partitioned since ADR-0131 D6 (the metaCallerOrganizationId note), and position is not package-slotted. So no other organization's or package's item can be served.
    • No /meta gate is weakened, and the gate's per-caller verdicts are unchanged. Recorded here as instructed. Seat: confirm with the security lane only if a deployment treats position labels as confidential where machine names are not. No such posture exists on main.
  • SQL push-down (Prime Directive 5). No finding. notePositionLabels makes one metadata lookup by name for each position in the note's own abandoned slate. That set is bounded and de-duplicated, it is answered from the in-memory registry first, and it is not a data query. No ids are materialised and no in-app join is made over data rows, so there is nothing SQL could push down.
  • The dev's stated reading of the kind label. Answered and accepted.
    • The card asked for the type to read 「转交」, or 「系统」 instead, and gave 「转交 · 系统 · …」 as its acceptance example.
    • The PR uses 「系统说明」 ("System note") for all three no-actor notes: admin routing, submitter exclusion and no approver. Not every such note is a hand-off, and telling them apart on the client would need a new field on the actions contract.
    • The reading was declared in the claim comment and in the PR body, before the review. No ruling on the card objects to it. 「系统说明」 is within the card's 「系统」 option, and the sentence itself carries the hand-off meaning.
  • Card acceptance: "no crm_sales_manager on the page". Met for the admin_rescue routing note the card observed: the label comes from the pack or the declaration. The integration test asserts that the zh-CN text does not contain the name.
  • Dev follow-up: the no-approver note still names the machine name. Answered as out of scope. That note's who parameter is stored pre-composed, the card's observed case does not include it, and the PR lists it as a follow-up. See N2.
  • The card's "do not change the routing rules" boundary. Held. The diff touches only display paths. __resolvedFrom, slate replacement and admin routing are untouched.
  • Open questions. The claim and the PR carry no open_questions entry.

Graded findings (none is must-fix or should-fix):

Implemented-by: claude/project-thread-nhcent
Reviewed-by: isolated L2 sub-agent of seat session_01L6bhgUkbQqRUUFSiu2HGob

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T09:18Z · The b1-CX thread's PR for #35418: a routing note names an unstaffed position by its label (the reader's pack, then the declared label, then the internal name) without touching the stored audit text, and the console names rows with no actor "System" and actorless comment rows "System note". Clause-②: yes (widening): two new @object-ui/i18n keys in all eleven packs and one optional server option, nothing removed. The seat's declaration-face L2 at TIER_DEFAULT read PASS on 064e714d (this head), record 7060479330, three nits. L1-c ACCEPT 7060412385 on the same head. check-governed-merges --pr 36030 reads NOT governed (+361/−6). landing-k was not needed: the seat read K by hand, 7 since the merge base, under 15, and main since then touches neither translations/ nor skills/. On this head, 63 check-runs are success, 11 are skipped and none failed; mergeable clean. The nits stay unpushed so CI does not run again: the label fallback needs a locale and an i18n service (L2 N1, matches the CONTROL test and the docs page); the no-approver note still shows the internal name because its text is stored finished (L2 N2, the seat files it as a card under #34571); the label lookups run one after another (L2 N3). The seat readies this PR and arms auto-merge in the same step. The PR carries Fixes #35418.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 09:19
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit fe75349 Nov 21, 2026
75 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-nhcent branch November 21, 2026 09:40
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…bjectstack-ai#36306)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XP3RHGWUG7UH3fNa4tBa9UC)_
repo:objectstack#4 · os-project-manager ·
session_01FEkQ5okniknzVVR3KTSVr1

Fixes objectstack-ai#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 objectstack-ai#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 objectstack-ai#36295, objectstack-ai#36247, objectstack-ai#36144 and
objectstack-ai#36135, which share that file.

## Tests

<details><summary>Pins: admin-rescue-named-slate.integration.test.ts,
new describe "[objectstack-ai#36035] the no-approver note names its position by its
label"</summary>

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 objectstack-ai#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).
</details>

<details><summary>Ablations at 8a83eed (scripts/ablation-replace.mjs,
each restored to the HEAD blob with an empty git diff HEAD)</summary>

- 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.
</details>

<details><summary>Runs at 8a83eed</summary>

- `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.
</details>

## Acceptance notes

- The `__noApproverNote` snapshot entry is internal to
`@objectstack/plugin-approvals` (nothing in `packages/spec`, `ui/` or
the package index reads it); new notes carry `slots`, older ones keep
`who`, and the read accepts both.
- Same family, not in this PR, carried by objectstack-ai#36308 (class a,
user-visible): the decision door's refusal remedy and the submitter's
`approval.comment` notice compose the no-approver sentence from the
slate with no labels, so they still name the machine name (`...holds
position 'legal'...`, pinned in
`exclude-submitter.integration.test.ts`). The notice is rendered per
recipient at delivery, so labelling it needs the recipient's locale, not
the reader's.
- Observation, carried by objectstack-ai#36308 (class a, user-visible): the `{{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), 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.

<details><summary>Local gates at 8a83eed</summary>

`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.
</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1)_

<!-- signed: repo:objectstack#4 · os-project-manager ·
session_01FEkQ5okniknzVVR3KTSVr1 -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

审批动态里显示内部岗位名(crm_sales_manager),系统转交的操作人显示为「—」

2 participants