Repository navigation
Commit ee63b47
fix(platform-objects, plugin-security, plugin-approvals, service-messaging, objectql): Setup field help is written for administrators, and the inert access-review fields are hidden (#25377)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao79xdvASVbExtbmLctNuuEG)_
Fixes #25331
Clause-②: no
Metadata-protocol: none
Ruling carried: objectstack-ai/hotcrm#2194, record `6354968262`:
> 25251 B hotcrm B
It adopts T2-U02. The card's *Done when* is the acceptance.
## What changes
Each developer string the Setup pass met is replaced by help an
administrator can act on: what the field means and what to do with it.
Where the old text held a fact a developer needs, that fact moved into
the code comment beside the field.
| Field | Was | Now says |
|:---|:---|:---|
| `sys_user_permission_set.user_id`, `sys_user_position.user_id` |
"Foreign key to sys_user." | the user who receives the set / holds the
position |
| `sys_user_permission_set.permission_set` | "… NULL only on a grant
written before the column existed." | pick a permission set defined in
Setup; an unknown name is rejected |
| `last_certified_at`, `certified_by` (both objects) | "Reserved for a
future access-recertification workflow … Inert today: no platform code
writes this column …" | not in use yet, kept for a future access-review
feature; **and `hidden: true`** |
| `sys_approval_delegation.valid_from` | "Enforced at resolution time
via isGrantActive …" | checked each time an approval is routed, no
scheduled job |
| `sys_notification_preference.digest` | "Batch cadence (P3 digest
middleware)." | what none / daily / weekly do, critical notifications
are never batched, set it on a `*` channel row |
| `sys_notification_preference.quiet_hours` | "Optional { tz, start, end
} window (P3 quiet-hours middleware)." | an example value, HH:MM in the
time zone, may wrap midnight, critical not held, `*` channel row |
| `sys_user.ai_access`, `sys_user.locale` | "… plugin-hono-server
resolveCtx … AiSeatPlugin … Owned by objectql (better-auth is oblivious
to this column)." | what the seat gives and that the license caps it;
the language tag and its fallback |
| `sys_oauth_access_token` / `_refresh_token` / `_consent` /
`_client_resource` reference fields | "Foreign key to sys_user.id" (and
to `sys_oauth_application.client_id`, `sys_session.id`,
`sys_oauth_refresh_token.id`, `sys_oauth_resource.identifier`) | which
user, application, session, refresh token or resource it is |
| `sys_metadata.package_version_id` | "Foreign key to
sys_package_version (UUID). …" | the package release the metadata came
from, empty for built-in and local changes |
| Data Lifecycle settings page and its Retention overrides help |
"Governance for ADR-0057 … LifecycleService (Reaper / Rotator /
Archiver)", "(ADR-0057 §3.2)" | what the page controls and that the
periodic cleanup sweep applies it |
The behaviour claims in the new digest and quiet-hours help were read
from `service-messaging/src/preference-resolver.ts` (`resolveDigest` /
`resolveQuietHours` read only the channel `*` row; `critical` bypasses
both; `digestDeferral` flushes at local midnight and Monday 00:00).
**Hidden, not deleted.** `last_certified_at` and `certified_by` on
`sys_user_permission_set` and `sys_user_position` now carry `hidden:
true`, the field's own "Hidden from default UI" flag. objectui's form
auto-layout (`plugin-form/src/autoLayout.ts`) and the record detail
panel (`plugin-detail/src/RecordDetailPanel.tsx`) both skip a `hidden`
field. The columns, their stored values and the API are unchanged. No
other field's help says it is inert.
**Bundles.** `en` regenerated from the sources (`node
scripts/check-i18n-bundles.mjs --write`). The `zh-CN`, `ja-JP` and
`es-ES` values of every rewritten leaf were translated by hand (they
were translations of the old developer text, or for the `ja-JP` /
`es-ES` approvals and messaging leaves, byte copies of it). The
generator then dropped the four `source-hashes.generated.ts` entries
that recorded those byte copies, which is its documented behaviour once
a leaf is translated. The AI Access help keeps the word "capability"
(`ai_seat` capability, 能力 / ケイパビリティ): two translation-decision tests
derive the capability wording from that leaf.
**Pin.** The four existing admin-copy vocabulary tests
(`platform-objects` `setup-copy-vocabulary.test.ts`, `plugin-security`,
`plugin-approvals`, `service-messaging` `admin-copy-vocabulary.test.ts`)
gain five entries: a foreign-key note, the `isGrantActive` function
name, an internal component (`middleware`, "better-auth is oblivious",
`Reaper`), the "NULL only on" storage note and the "Inert today" notice,
each with a positive control. They walk every object this package ships
and every leaf of all four locale bundles. `plugin-security`'s test also
asserts the four access-review fields are `hidden`. The settings
manifest had no copy test, so
`objectql/src/lifecycle/lifecycle-settings.test.ts` is new (ADR number,
section reference, internal component names).
## Surface note: one string outside the declared surface
`packages/metadata-core/src/objects/sys-metadata.object.ts`
(`package_version_id` help) is outside the claim's file surface. It is
the same defect class, a one-line mechanical rewrite, and it is in the
population `platform-objects`' vocabulary test already walks (that test
reads metadata-core's objects, and the help lands in the
`platform-objects` bundle), so the new "foreign key" entry could not go
green without it. Taken under os-dev's bounded in-place fix; the seat
amends the file surface.
## Verification (head `ee5da23123`)
- `pnpm turbo run test --only --continue` on the six packages:
metadata-core 19/19 files, platform-objects 88/88, plugin-security
212/212, plugin-approvals 94/94, service-messaging 60/60, objectql
465/465 (lock VERDICT command-exit 0). A first run went red in two
`platform-objects` translation-decision tests that read
`sys_user.fields.ai_access.help` as evidence for the capability wording;
fixed by keeping the capability in that help.
- `pnpm turbo run typecheck --only` on the six packages: 6/6 (VERDICT
command-exit 0).
- `node scripts/check-i18n-bundles.mjs`: all ten packages in sync.
- `dispatch-gates --commands`: 71 families, 70 exit 0, 1 NOT MEASURED
(`check:dual-build-cjs-loads` exit 3, PREREQUISITE NOT MET: this
worktree has no full workspace build). `--ran` reconciles 71/71. CI runs
the rest of the farm.
- No ablation: the change is copy and a declared flag; each new
vocabulary entry carries a positive-control assertion that it matches
the old string.
## Acceptance notes
- `better-auth` still appears in 34 `platform-objects` `en` field-help
leaves (for example "Managed by better-auth"), and a few helps name code
identifiers (`resolveCtx`-style names,
`sys_business_unit_member.is_primary`, `sys_file.name`). They are
outside this card's list and on surfaces the pass did not report; noted,
not filed. Carrier: none.
- `[ADR-0086 D3]` from the card has 0 hits in any object or
metadata-forms bundle on `origin/main`. It survives in `packages/spec`
schema `.describe()` text (`security/capabilities.ts` `packageId`,
`permission.zod.ts` `packageId`). Whether the Capabilities detail page
the tester saw renders that `.describe()` text is NOT MEASURED here (no
running console); if it does, the fix is in `packages/spec`, outside
this card's surface.
- `sys_approval_delegation.organization_id` help is untouched (#25280
owns it).
- #25332 regenerates the same `platform-objects` bundles; whichever
lands second merges `main` and re-runs the generator.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01RsXNmkeex9WY5XsjNwtRYv
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c898bd8 commit ee63b47
37 files changed
Lines changed: 292 additions & 148 deletions
File tree
- .changeset
- packages
- metadata-core/src/objects
- objectql/src/lifecycle
- platform-objects/src
- apps
- translations
- identity
- plugins
- plugin-approvals/src
- translations
- plugin-security/src
- objects
- translations
- services/service-messaging/src
- objects
- translations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
64 | 73 | | |
65 | 74 | | |
66 | 75 | | |
| |||
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
136 | 150 | | |
137 | 151 | | |
138 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
1591 | | - | |
| 1591 | + | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | 1594 | | |
1595 | | - | |
| 1595 | + | |
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
| 1599 | + | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | | - | |
| 1603 | + | |
1604 | 1604 | | |
1605 | 1605 | | |
1606 | 1606 | | |
| |||
1652 | 1652 | | |
1653 | 1653 | | |
1654 | 1654 | | |
1655 | | - | |
| 1655 | + | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | 1658 | | |
1659 | | - | |
| 1659 | + | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
1663 | | - | |
| 1663 | + | |
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
| |||
1724 | 1724 | | |
1725 | 1725 | | |
1726 | 1726 | | |
1727 | | - | |
| 1727 | + | |
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
1731 | | - | |
| 1731 | + | |
1732 | 1732 | | |
1733 | 1733 | | |
1734 | 1734 | | |
| |||
1826 | 1826 | | |
1827 | 1827 | | |
1828 | 1828 | | |
1829 | | - | |
| 1829 | + | |
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
1833 | | - | |
| 1833 | + | |
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| |||
3048 | 3048 | | |
3049 | 3049 | | |
3050 | 3050 | | |
3051 | | - | |
| 3051 | + | |
3052 | 3052 | | |
3053 | 3053 | | |
3054 | 3054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
1591 | | - | |
| 1591 | + | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | 1594 | | |
1595 | | - | |
| 1595 | + | |
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
| 1599 | + | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | | - | |
| 1603 | + | |
1604 | 1604 | | |
1605 | 1605 | | |
1606 | 1606 | | |
| |||
1652 | 1652 | | |
1653 | 1653 | | |
1654 | 1654 | | |
1655 | | - | |
| 1655 | + | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | 1658 | | |
1659 | | - | |
| 1659 | + | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
1663 | | - | |
| 1663 | + | |
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
| |||
1724 | 1724 | | |
1725 | 1725 | | |
1726 | 1726 | | |
1727 | | - | |
| 1727 | + | |
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
1731 | | - | |
| 1731 | + | |
1732 | 1732 | | |
1733 | 1733 | | |
1734 | 1734 | | |
| |||
1826 | 1826 | | |
1827 | 1827 | | |
1828 | 1828 | | |
1829 | | - | |
| 1829 | + | |
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
1833 | | - | |
| 1833 | + | |
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| |||
3048 | 3048 | | |
3049 | 3049 | | |
3050 | 3050 | | |
3051 | | - | |
| 3051 | + | |
3052 | 3052 | | |
3053 | 3053 | | |
3054 | 3054 | | |
| |||
0 commit comments