Repository navigation
fix(plugin-security): permission refusals speak the caller's language, falling back to the workspace default (#32656, 2/2) - #33290
Conversation
Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM Co-authored-by: Claude <noreply@anthropic.com>
…aller's language (#32656) Doors state userTextLocales (request locale, then workspace default) read off the execution context, which now carries workspaceLocale unfolded. Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM Co-Authored-By: Claude <noreply@anthropic.com>
…, falling back to the workspace default (#32656) Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 25 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 2987fb0cecac3eefc48c2d8ce813d8352fb2ba9f && git checkout 2987fb0cecac3eefc48c2d8ce813d8352fb2ba9f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d683e6f3af5633a5c4a13ead523e06fbeb36db75 24f2148f6bc4845bde87f441164c52c71eb8f35b && git checkout -B drift-repro d683e6f3af5633a5c4a13ead523e06fbeb36db75 && git merge --no-ff 24f2148f6bc4845bde87f441164c52c71eb8f35b
node scripts/docs-audit/affected-docs.mjs --json d683e6f3af5633a5c4a13ead523e06fbeb36db75
|
…d locales on the doors' exact request pins The batch publish body schema is the body parser, so userTextLocales stays a protocol-call member there, never a body key. Exact request and execution-context key pins now name the new server-stated members. Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM Co-Authored-By: Claude <noreply@anthropic.com>
…h pin Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM Co-Authored-By: Claude <noreply@anthropic.com>
|
Contract-review-claim: session_016WV4d1PGptBW3QRQNmy5e6 · head fa8f2f5 · 2026-11-14T16:24:02Z review#3. |
Review — PASSHead:
CI was not complete when read (16:24Z); the ACCEPT re-reads every check at the landing head. |
… request pin Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM Co-Authored-By: Claude <noreply@anthropic.com>
Review carry — PASS standsHead: The delta from my PASS at |
…rd on the merged tree Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM Co-Authored-By: Claude <noreply@anthropic.com>
…refusals # Conflicts: # packages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts # packages/runtime/src/domains/meta-save-user-text-locale.test.ts
… merged tree Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
|
domain:server#5 · os-elon-musk · session_016WV4cz2MxDkQYCC4U8indM ACCEPT — area A2 (permissions / audit / messaging / settings), area-lease pilot #33059.
Marking ready and enabling auto-merge. |
Requested by Elon · project thread
Fixes #32656
Stacked on #33276 (PR 1 of 2, base branch). Retarget to
mainonce #33276 merges. The claim on #32656 names this branch.Maintainer quick read
The refusals a permission admin or end user reads now come back in their language: request language, else workspace default, else English (ruling C on #32440). Codes, statuses and the diagnostic
messageare unchanged.What changes
PackagedPermissionSetLockedErrorandPackagedPermissionSetProvenanceUnknownErrorcomposeuserMessagefrom an 11-language text table on the caller's ladder (each code matched byresolveBundleLocale, the platform's one locale ladder), instead of static English. The gate reads the ladder from its context;assertPermissionSetNotPackageDeclaredand both constructors take it as an optional last argument (no locales ⇒ the English text, byte-identical to before).userFacingDenialMessage/fieldEditDenialMessagetake[ctx.locale, ctx.workspaceLocale]and render in the first that has text (a deploymenterrors.<key>override, else the built-in operation-message catalog); none ⇒enas before. Field labels are translated in the language the sentence resolves to.MetadataAuthoringGateContextgains optionaluserTextLocales;runAuthoringGateforwards the save request'suserTextLocales(from feat(metadata-protocol): a metadata write's advisories and refusals come back in the caller's language (#32656, 1/2) #33276) to the type's gate. Checked: E1's open PR fix(metadata-protocol)!: an App pair row declared for a package that still ships the name is never served at a bundle addition's address (ADR-0150 D4) #33251 touches none of these files.Why
#32656 asks every
userMessageproducer to compose in the request locale with the declared fallback. #33276 did the save door's advisories and authoring-rule refusals; these are the remaining server producers that composed English only, or that read only the foldedlocale.Verification
packaged-permission-set-lock.test.ts: zh-CN, ja-JP (request wins over workspace),tlh→zh-TW workspace fallback,tlh/tlh= unstated = English; code/status/diagnostic identical in every language; the provenance-unknown refusal in de-DE.permission-denied-user-copy.test.ts: de-DE request with zh-CN workspace ⇒ zh-CN sentence; ja-JP request wins; de-DE/de-DE ⇒ en.mutation-listeners.test.ts: the gate receives the stated locales (empty entries dropped) and no key when none are stated.meta-save-user-text-locale.test.ts(runtime, both/metadoors): the permission gate receives['zh-CN','de'], and[]with none.@objectstack/plugin-securityfull suite 6610 passed; metadata-protocol / runtime targeted tests green; typecheck clean; test-source alias gate clean.Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM