Repository navigation
fix(platform-objects,metadata-core,service-messaging): Setup descriptions are plain admin sentences; ADR references move to the docblocks - #23845
Conversation
…escriptions read as plain admin sentences; ADR references move to the docblocks Claude-Session: https://claude.ai/code/session_01TQLy3Yq6vF4SDpTXdr3Uwi Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TQLy3Yq6vF4SDpTXdr3Uwi Co-authored-by: Claude <noreply@anthropic.com>
…o design-record vocabulary Claude-Session: https://claude.ai/code/session_01TQLy3Yq6vF4SDpTXdr3Uwi Co-authored-by: Claude <noreply@anthropic.com>
…ct via check-i18n-bundles --write) Claude-Session: https://claude.ai/code/session_01TQLy3Yq6vF4SDpTXdr3Uwi Co-authored-by: Claude <noreply@anthropic.com>
… before reading names Claude-Session: https://claude.ai/code/session_01TQLy3Yq6vF4SDpTXdr3Uwi Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TQLy3Yq6vF4SDpTXdr3Uwi Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 31 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 11 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 9 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 21912479c47bf389cbda1a22bd2451fbea188f47 && git checkout 21912479c47bf389cbda1a22bd2451fbea188f47
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0cfd0c49bd2635da048fae96b35a38448141fa9d a6586f72adbb6bbc55192f35fe92885dc1cc8e73 && git checkout -B drift-repro 0cfd0c49bd2635da048fae96b35a38448141fa9d && git merge --no-ff a6586f72adbb6bbc55192f35fe92885dc1cc8e73
node scripts/docs-audit/affected-docs.mjs --json 0cfd0c49bd2635da048fae96b35a38448141fa9d
|
席位核对 · ✅ ACCEPT: PR #23845 at
|
Fixes #23802
Clause-②: no
What changed
The sentence an administrator reads under a Setup page title is the object's
description; a field's help tooltip is the field'sdescription. Both reach every locale through the generated translation bundles. This PR rewrites the Setup-visible object descriptions in the admin's words and moves every ADR number, decision id and API call out of the strings in this lane's packages and into the docblock or a comment beside the string (the card's constraint: docblocks and ADR links in code stay, only user-facing strings move). Wording only: no field, index, permission or behaviour change.Scope at the claim:
packages/platform-objects,packages/metadata-core/src/objects/sys-metadata*.object.tsandpackages/services/service-messaging/src/objects/*.object.ts. The descriptions produced inplugin-approvals,plugin-security,service-automation,plugin-sharingandpackages/spec/src/ui/view.form.ts(the permission setorganization_admin_no_bypass, Record Shares, Approval Delegations) belong to #23829, which remains open and is untouched here.Before / after
Measured by loading the BUILT object definitions of the three packages (61 objects; multi-line values included) and matching the card's patterns (
ADR-followed by a digit, a decision id such as D2,finding F,emit(),kernel). Before, at base1ecb08a1c: 15 distinct strings matched (17 rows; two metadata-core strings appear twice because platform-objects re-exports them). After, ata6586f72a: 0.Object descriptions on a Setup page, rewritten (the last two carried schema vocabulary and no pattern):
sys_business_unit(People and Organization, Business Units)sys_notification(Diagnostics, Notification Events)sys_http_delivery(Integrations, HTTP Deliveries)sys_notification_preference(Configuration, Notification Preferences)sys_notification_template(Configuration, Notification Templates)Field help on Setup forms: the ADR reference is removed and the rest of the help text is unchanged, because it is operational detail an admin acts on.
sys_user.role: "(ADR-0068 D2)" removedsys_user.manager_id: "(ADR-0057 / @objectstack/security-enterprise)" removedsys_user.primary_business_unit_id: "(ADR-0057 addendum D12)" removedsys_organization.parent_organization_id: "(ADR-0105 D6)" removedsys_invitation.business_unit_idandsys_invitation.positions: "(ADR-0105 D8)" removedsys_sso_provider.domain_verified(Access Control, SSO Providers): "(ADR-0135 D6)" removedJudged NOT Setup-visible (no Setup nav entry in any of the 12 contributors that declare
app: 'setup', and not the subject of a Setup record page); the ADR reference is removed and the wording is otherwise kept:sys_metadata_audit(metadata-core): "(ADR-0010)" removedsys_metadata_commit(metadata-core; in no translation bundle): "(ADR-0067)" removedsys_metadata.environment_id(metadata-core): "(ADR-0131 D6)" removedsys_metadata_activation(platform-objects; in no translation bundle): "(ADR-0126 §4)" removed. It backs the Packaged Automation page, which renders its own copy rather than this description.sys_notification_delivery(service-messaging): "(ADR-0030 Layer 4)" removedThey are edited anyway because they sit in the claimed file surface, three of them ship in the platform-objects bundles to every locale, and the test below then pins every object a package ships. No hand-kept Setup roster is needed, so it cannot go stale when a plugin adds a nav entry.
Setup nav labels and the
SETUP_APPdescription carried none of the patterns. No nav string changed.Translations: what the generator required
os i18n extract(run for all nine bundle sets bynode scripts/check-i18n-bundles.mjs --write, which reads each package's documented command) rewrites theenbundle from source on every run. It keeps any non-empty translated-locale value (merge mode). A translated leaf whose source moved is therefore NOT updated by the generator. Its own generated header says to re-translate it by hand. So the order was:objectsbundles: the 11 affected leaves re-translated in place (leaf values only, no key added or removed). None of them had a recorded source hash, so the provenance tables did not move.ja-JP/es-ES.source-hashes.generated.tsitself. If they had been left alone, both locales would have kept a byte-identical superseded draft, whichcheck:i18n-stale-fillexists to catch.check-i18n-bundles --writeregenerated theenbundles and the hash tables.pnpm check:i18nandpnpm check:i18n-stale-fillare green after it.Acceptance 1: tests in the packages' own suites
No new
check:*script, lint rule or CI wiring.packages/platform-objects/src/apps/setup-copy-vocabulary.test.tscovers four populations: every object this package and@objectstack/metadata-coreexport (eachlabel/pluralLabel/descriptionanywhere in the definition); every leaf of the fourobjectsbundles; the type-levellabel/descriptionof the fourmetadataFormsbundles (the sentence a Setup metadata page such as Capabilities shows); andSETUP_APPplusSETUP_NAV_CONTRIBUTIONSplus each locale'sapps.setupsubtree. It also has a positive control showing the matcher recognises each kind of vocabulary.packages/services/service-messaging/src/objects/admin-copy-vocabulary.test.tsapplies the same rule to every messaging object and its four bundles. platform-objects cannot import service-messaging, and no dependency was added for a test.kernel. The decision-id pattern uses word boundaries and matched no legitimate text in any population. The one lower-case hit in the instrument run,adr-0104-file-references(a migration id insidesys_migration.id's help), is a machine id; the case-sensitive pattern does not match it.Ablation: four legs through
scripts/ablation-replace.mjs, each restored with blob hash equal to HEAD and an emptygit diff HEAD.sys_business_unit.description.emit()/ ADR sentence put back into the zh-CN bundle turned the zh-CN bundle test red.sys_metadata_commit, with metadata-core rebuilt, turned the object test red.ablation-dist-preflightconfirmed the marker was present in 4 dist files. Restore leg: rebuild, then--absentconfirmed the marker gone from all 12 dist files with a clean tree, and the suite was green again.Local verification (HEAD
a6586f72a)pnpm --filter @objectstack/platform-objects test: 71 files, 1103 tests passed.pnpm --filter @objectstack/service-messaging test: 51 files, 574 passed.pnpm --filter @objectstack/metadata-core test: 18 files, 733 passed (run at3b5ffa17f; nothing in metadata-core changed after it).typecheckfor all three packages: exit 0. Both new test files are in their tsc programs (counted with--listFiles).pnpm check:i18n,pnpm check:i18n-stale-fillandpnpm check:i18n-coverage: exit 0.dispatch-gates --commands, 66 families): 65 exit 0.check:dual-build-cjs-loadsprinted PREREQUISITE NOT MET (exit 3, it reads every package's dist and this worktree built only the CLI closure); that is NOT MEASURED locally and left to CI.--ranreconciliation: 66 derived, 65 run, 1 NOT-MEASURED, 0 UNRUN.Acceptance notes
sys_notification_subscriptionkeeps its description ("Standing subscription of a principal (role/team/user) to a notification topic."). Its docblock records that the subscription-to-recipient expansion is not wired, so the Setup grid is admin-authored data, not routing. Any user-voice sentence of the "who receives this topic" kind would advertise behaviour the runtime does not deliver.sys_inbox_message,sys_notification_receipt("Per-recipient × channel receipt …") andsys_business_unit_member(shown only as a related list, which renders the label).SETUP_APP.protection.reason("… see ADR-0010.") is a lock reason, not a nav label or description. Not edited.packages/spec/src/security/permission.form.ts(isDefault,managedBy,packageId,adminScope) andpackages/spec/src/identity/position.form.ts(delegatable).packages/i18n/src/locales/*.ts, keyinstalledAdditiveNote, rendered byInstalledListWidget.tsx), not bycloud-connection.Generated by Claude Code