Skip to content

fix(platform-objects): API key Revoke and Restore toasts name the key - #27757

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-y8x8ao
Oct 29, 2026
Merged

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

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

维护者速读

  • 改了什么:API 密钥列表的「吊销」「恢复」两个行操作,成功提示从「API key revoked / restored」改为写出密钥名(如 API key "QA key" revoked),中文、日文、西班牙文译文同步写出密钥名。
  • 为什么改:违反写入反馈约定(qa(checklist): ux-conventions — 5 ledger edits from the 18.2.0 release sweep (#25807) #25849 裁决 C:记录级成功提示要点名记录),QA 在 18.3.0 RC 轮发现。
  • 风险与回滚:只改两条提示文案的元数据,控制台早已按行把 {{ record.name }} 填进提示;回滚即 revert 本 PR,无数据或协议变化。
  • 先看:packages/platform-objects/src/identity/sys-api-key.object.ts(两行 successMessage)、packages/platform-objects/src/identity/sys-api-key-action-copy.test.ts、zh-CN.objects.generated.ts 的两条译文。
  • 两分钟验证:pnpm --filter @objectstack/platform-objects exec vitest run src/identity/sys-api-key-action-copy.test.ts,预期 15 个用例全绿。
  • 需要你做的:无,席位落地。

Fixes #27456

Clause-②: no
Metadata-protocol: none

What changes

  • sys_api_key's revoke_api_key and restore_api_key row actions declare successMessage: 'API key "{{ record.name }}" revoked' / '... restored'. Both are list_item actions; the console's ActionRunner fills a successMessage {{ record.* }} hole from the row the dispatch carries (composeSuccessMessage reads dispatchRecord(action)), already pinned in objectui's ActionRunner.copyTemplate-13367.test.ts, test "the row a dispatch carries is record". record is one of ACTION_SUCCESS_TEMPLATE_ROOTS, so the action-copy publish judge accepts the hole. name is a required field on sys_api_key, so the hole always has a value.
  • The translated bundles (zh-CN, ja-JP, es-ES) carry the same hole, hand-written. Merge mode keeps a translated value forever, so without this a zh-CN viewer would keep the key-less sentence while check:i18n reads "in sync".
  • en.objects.generated.ts regenerated from the source with node scripts/check-i18n-bundles.mjs --write (exit 0; only those two leaves moved).
  • Patch changeset for @objectstack/platform-objects.

Tests

  • New packages/platform-objects/src/identity/sys-api-key-action-copy.test.ts (the shape of invite-user-action-copy.test.ts): the source copy carries {{ record.name }}; the en bundle equals the source; each translated bundle carries the token and is not the English source; the served object metadata (translateMetadataDocument over SetupAppTranslations) gives zh-CN its translated key-naming copy and en the declared copy.
  • Ablation (one-shot, through scripts/ablation-replace.mjs, restored and hash-verified): the revoke line back to 'API key revoked' turns 3 of 15 cases red (declared copy, en bundle, en served); restored, 15/15 green.
  • pnpm --filter @objectstack/platform-objects test: 98 files / 1384 tests passed. pnpm --filter @objectstack/platform-objects typecheck: exit 0.

Acceptance notes

  • The acceptance's rendering layer is the console runner, which this PR does not change; its interpolation of a row's record into successMessage is the existing objectui test named above, so the pin here is the metadata plus that test.
  • The surface was widened, with the seat's approval, from the two source lines to the same two values in the four *.objects.generated.ts bundles.

Verification

On head 6a8ef24c3c: the derived list (node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 59 families) plus node scripts/check-sdui-manifest.mjs, each exit code recorded before any pipe; --ran reconciliation exit 0: 58 run with exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loads, exit 3, needs a whole-workspace build; left to CI). check-plugin-teardown-shape --self-test first exited 3 on the shallow clone, and 0 after git fetch --unshallow. The full readings are in the report comment on #27456.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbBKXqV5ioVksATxTi


Generated by Claude Code

The two row actions' successMessage now carry a `{{ record.name }}` hole,
which the console runner fills from the dispatched row, in the source and in
the zh-CN / ja-JP / es-ES bundles (merge mode keeps a translated value, so the
old object-only sentence would otherwise keep serving).

Claude-Session: https://claude.ai/code/session_01Utp6CbBKXqV5ioVksATxTi
Co-authored-by: Claude <noreply@anthropic.com>
…undles

Regenerates the en bundle from the source (check-i18n-bundles --write) and
adds a patch changeset for @objectstack/platform-objects.

Claude-Session: https://claude.ai/code/session_01Utp6CbBKXqV5ioVksATxTi
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/platform-objects, touching 1 documentable anchor(s).

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

  • content/docs/permissions/authorization.mdx (via sys_api_key (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/permissions/system-context.mdx (via sys_api_key (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/permissions/tenant-audit-census.mdx (via sys_api_key (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))

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

  • content/docs/releases/v17/17-1.mdx (via sys_api_key (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/releases/v17/17-5.mdx (via sys_api_key (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))

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
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 58 of 210 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 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 — 2 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 6d8372a8cd03f31a411a302c1cbb807ad6782d47 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 6d8372a8cd03f31a411a302c1cbb807ad6782d47

⚠️ 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 6d8372a8cd03f31a411a302c1cbb807ad6782d47 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh

席位核对

ACCEPT · head 6a8ef24c3c01135e0028d6a30464c034cc406973 · 2026-10-29T22:51Z

  • Shape: draft → main, Fixes #27456. Clause-②: no and Metadata-protocol: none: the change is metadata copy only. No schema change and no new key. The changeset is a patch on @objectstack/platform-objects.
  • Change, read:
    • sys-api-key.object.ts: the revoke_api_key and restore_api_key successMessage values gain a {{ record.name }} hole: API key "{{ record.name }}" revoked / restored.
    • The en bundle was regenerated with check-i18n-bundles --write. Only these two values moved.
    • zh-CN, ja-JP and es-ES carry the same hole in hand-written copy, e.g. API 密钥「{{ record.name }}」已撤销. Without those three, the merge-mode bundles would keep the old wording.
    • The console needs no change. ActionRunner composeSuccessMessage already fills record.* from the row the dispatch carries, as the existing ActionRunner.copyTemplate-13367.test.ts shows. This is the triage route (6491484916) under ruling C on qa(checklist): ux-conventions — 5 ledger edits from the 18.2.0 release sweep (#25807) #25849.
  • Surface: claim 6509053107, widened with the seat's approval to the four translation bundles and the new sys-api-key-action-copy.test.ts. This is a cross-lane edit in packages/platform-objects, which this project's engine lane owns.
  • Evidence: the new test has 15 cases. Ablation turns 3 red, and the file was restored. platform-objects tests: 98 files, 1384 tests green. Typecheck green.
  • Accepted deviations (report 6509855919): check:dual-build-cjs-loads exited 3 locally and was recorded as NOT MEASURED, handed to CI. CI is green on this head.
  • Gates (check-runs on the head): 35 success, 13 skipped, 0 failure. check-governed-merges --pr 27757: NOT governed, 0 of 7 paths, 127 changed lines.
  • Landing: non-governed, all green, mergeable_state clean, so the seat lands it with pr_ready and automerge_enable.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 29, 2026 22:52
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 29, 2026 22:52
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit ca64f6f Oct 29, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-y8x8ao branch October 29, 2026 23:20
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console: API key Revoke and Restore toasts name no key ("API key revoked")

1 participant