Repository navigation
feat(plugin-security): the upgrade reports' notification topics read in 11 languages and declare their payload variables - #39964
objectstack-fleet[bot] wants to merge 5 commits into
Conversation
… in 11 languages and their payload variables Claude-Session: https://claude.ai/code/session_01ADHkmSMxfgfe1pFqKZjtXk Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmSMxfgfe1pFqKZjtXk Co-authored-by: Claude <noreply@anthropic.com>
…ts test, importing no devDependency Claude-Session: https://claude.ai/code/session_01ADHkmSMxfgfe1pFqKZjtXk Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check74 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 — 18 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 d28d8c64514375005caea713edd4d3bbe32b377f && git checkout d28d8c64514375005caea713edd4d3bbe32b377f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e8b5040ce46794aba041f53f67780536cee758a9 8522b3ae025b78273581aa00524baa7289be0b40 && git checkout -B drift-repro e8b5040ce46794aba041f53f67780536cee758a9 && git merge --no-ff 8522b3ae025b78273581aa00524baa7289be0b40
node scripts/docs-audit/affected-docs.mjs --json e8b5040ce46794aba041f53f67780536cee758a9 |
|
repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N 席位核对REWORK · head L1 of PR #39964 ( Verdict: REWORK on two sentences, the changeset headline and the first 速读 line. The code holds.
Everything else holds:
No L2 owed: no contract face, not governed. After the rework: a delta L1 here. |
…nce the preference-options door passes the locale Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSMxfgfe1pFqKZjtXk
|
repo:objectstack@os-steve · os-steve · session_01ADHkmQSafnPd7PALMEwPEP 席位核对ACCEPT · head L1-b prose delta of PR #39964 (Fixes #39646), zone ost-N, over REWORK-7462140759 at
|
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSMxfgfe1pFqKZjtXk
|
repo:objectstack@os-steve · os-steve · session_01ADHkmSMxfgfe1pFqKZjtXk Landing · zone ost-N · 2026-12-06T21:05Z · head 8522b3a
|
Requested by Steve · project thread
Fixes #39646
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
@objectstack/plugin-securityemits exactly two notification topics:security.access_upgrade(access-upgrade-report.ts) andsystem.upgrade_impact(upgrade-impact-report.ts), both throughupgrade-report-delivery.ts. Enumerated by grepping the package for everytopic:handed tomessaging.emitand every*_TOPICconstant: the only emit sites are the two inupgrade-report-delivery.ts, and both takenotice.topicfrom these two reports.Premise check: #39641 already registered both topics at
kernel:ready(insecurity-plugin-start-hooks.ts), with English fallbacks only and novariables. This PR adds what was missing:upgrade-report-notification-topics.ts. Each text is now{ key: 'messages.IDENT', fallback }, with the key in this package's own bundle.title,bodyand eachcounts.KEY(5 for access, 10 for impact).findingsis structured (lists of records) and a template hole renders it as nothing usable, so it is not declared.translations/upgrade-report-topics.tsis themessagesgroup, hand-written in all 11 locales (21 ids each). The English record is the single source: each descriptor's fallback is read from it.translations/index.tsadds the group to every locale,enincluded.security-plugin-start-hooks.tsis unchanged apart from its import.Tests
upgrade-report-notification-topics.test.ts(new): a realMessagingServiceregistry accepts both descriptors; every locale carries exactly the English ids; every descriptor key resolves to its English entry; and in each of the 11 locales a realFileI18nAdapter, loaded withSecurityTranslationsthe way the plugin loads it, renders every label, description and variable description from the catalog.access-upgrade-report.wiring.test.tsandupgrade-impact-report.wiring.test.ts: one new test each boots the real plugin on a real SQL engine, takes the payload the report really emitted, and renders each declared variable through service-messaging'sinterpolate, as both{{ name }}and{{ payload.name }}, over the renderer's context. It also asserts that the declared set equals the payload's scalar members, so a count added later turns the pin red. The existing registration test now expects the variables.counts.settingOrphansfrom the impact descriptor and renaming one zh-CN id turned both new pins red (2 failed / 18 passed); restoring them turned both green.Readings (head e122cdd)
pnpm --filter @objectstack/plugin-security test(head 8f5943f, before a test-only change): 297 files, 7539 passed, 52 skippedpnpm --filter @objectstack/plugin-security typecheck: exit 0, test layer 0 errorspnpm check:i18n: exit 0, all bundles in syncpnpm check:undeclared-dep-imports: exit 0 (it was red on an earlier head: the testkit imported a devDependency; fixed by passinginterpolatein from the test)dispatch-gates --ran: 72 derived, 69 run at exit 0, 3 NOT MEASURED locally (check-plugin-teardown-shape --self-test: shallow clone;check:dual-build-cjs-loads: no full dist;check:query-options-erasure: repo-wide eslint over 280s on a shared box). CI runs all three.Acceptance notes
Clause-②: nomeasured: the new module and the catalog are not reachable from the package entry (src/index.tsexports neither, andSecurityTranslationsis loaded only by dynamic import inside the plugin).securitybecause every bundle loaded into onei18nservice shares themessagesgroup.Verification
Read first:
packages/plugins/plugin-security/src/upgrade-report-notification-topics.ts: the descriptors and variables.packages/plugins/plugin-security/src/translations/upgrade-report-topics.ts: the 11-locale catalog.packages/plugins/plugin-security/src/upgrade-report-topic-variables.testkit.ts: what the payload pins assert.Two-minute check:
pnpm --filter @objectstack/plugin-security exec vitest run src/upgrade-report-notification-topics.test.ts. Expect 14 passing tests: one rendering test per locale, plus parity, keys and registration.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmSMxfgfe1pFqKZjtXk