Repository navigation
Commit e23eccb
feat(spec,metadata-protocol)!: rename the type registry's allowOrgOverride to allowEnvironmentOverlay, on the registry and on GET /meta/types (#22874)
Part of #22340
Clause-②: yes (narrowing)
ADR-0131 C5's spec half (stage S2): the metadata type registry's
`allowOrgOverride` is renamed to `allowEnvironmentOverlay`, on
`DEFAULT_METADATA_TYPE_REGISTRY` and on the `GET /meta/types` wire
field, under ruling C on #22007 (`6028809298`), ruling `6073921182` (Q1
A, Q2 A) and the pre-build contract review `6109457426`, which fixed the
name. #22340 stays open for S3, the governed text.
**The console pin moves with the rename, in this PR.** `.objectui-sha`
is objectui `e5311165a8d6`, the merge of objectstack-ai/objectui#12168,
which carries objectstack-ai/objectui#12141: from that commit on,
objectui's metadata admin reads the wire field under its new name only,
with no dual read. The two halves land together. Any other pin bump past
`e5311165a8` before this PR lands would show the five overlay-enabled
types read-only in Studio. The landing record is the contract review on
this post-pin head.
## What changes
- **The key.** `MetadataTypeRegistryEntry.allowEnvironmentOverlay`
(default `false`) with the contract review's describe and TSDoc.
`allowOrgOverride` is a `retiredKey()` tombstone on
`MetadataTypeRegistryEntryBaseSchema` whose prescription names the new
key: the old key fails `tsc` and fails the parse (`invalid_type` at
`allowOrgOverride`). The prescription reads "was renamed to
`allowEnvironmentOverlay` (ADR-0131 D6)" and names no version: the
changeset ships this as `major` on the `18.0.0-next` line, and the
TSDoc's "in 18" names the protocol major. All 28 built-in rows spell the
new key; every value is unchanged (the true set is `view`, `dashboard`,
`report`, `translation`, `email_template`).
- **The ledger (ADR-0087).** Retired-keys entry
`18.kernel__MetadataTypeRegistryEntry__allowOrgOverride`; D3 semantic
entry `metadata-type-registry-allow-org-override-renamed`, covering the
registry key AND the wire field; its `STEP18_RATIONALE` fragment (order
94). No D2 conversion, as ruled: no manifest, stack or stored row can
carry a registry entry. No `registry.ts`, `spec-changes.json` or upgrade
guide is committed (git-ignored, generated).
- **The wire, one spelling.** `getMetaTypes` writes the
`OS_METADATA_WRITABLE` elevation onto `allowEnvironmentOverlay` on BOTH
arms: the registry arm (the `...base` spread already carries the new
key, and the elevated value overwrites it) and the synthesised arm of a
runtime type with no registry row. No entry carries `allowOrgOverride`.
The field's describe says the elevation opens only items no managed
package ships; `overrideSource` keeps `registry` / `env` and its
describe names the new field.
- **The read-side trap, hand-renamed.** A truthiness reader of the old
key compiles against the tombstone and reads `undefined`, which closes
all five types. The readers moved by hand: `protocol.ts` `getMetaTypes`
(both arms) and `OVERLAY_ALLOWED_TYPES`, and
`sys-metadata-repository.ts`'s `OVERLAY_ALLOWED_TYPES`. Every test
reader moved with them.
- **`supportsOverlay` keeps its name and both keys stay** (contract
review item 2: ADR-0049 retires neither). Its TSDoc and its three
describes (registry, `GetMetaTypesResponse`, `MetadataTypeInfoResponse`)
and the stale read claims in `protocol.ts` and
`sys-metadata-repository.ts` now say what it gates: the delete
carve-out, no save and no read. **Wording used: PR #22833's**, which
landed (`8c105e3d67`) before this branch merged `main`: the removal
"removes no managed definition, and changes what is served for
`permission` alone".
- **Prose that tied the flag to organization scope** is rewritten, not
mechanically renamed: the key's TSDoc and describe,
`email-template.zod.ts`, `kernel/index.ts`, the `customizationPolicies`
prescription (and its pin), the unreleased D3
`metadata-customization-protocol-retired` and its fragment, and the
comments in `protocol.ts`, `rest-server.ts`, runtime `packages.ts` /
`mcp.ts` and `sys-flow-credential.object.ts`. A comment that records
history keeps the name of its time: `sys-metadata-repository.ts` still
says commit `ee58392e1` rolled `allowOrgOverride` back.
- **The refusal sentences** that named the flag name the new key; codes
and statuses are unchanged.
- **Tests.** The 74 files that named the key move to the new key. The 20
files that pin the RETIRED per-organization path label their specimens
as the five overlay-enabled types (the set those doors once scoped to an
organization), so no label reads as "org-overridable =
`allowEnvironmentOverlay`"; their `ORG_OVERRIDABLE` identifiers are now
`PRE_D6_ORG_SCOPED`. The two plugin-security doubles throw the sentence
the producer emits today.
- **Docs and tooling.** `metadata-lifecycle.mdx`'s whitelist table
header moves with `check-overlay-whitelist-table.mjs`'s `COL_FLAG` and
its self-test fixtures, in one change; 10 more `content/docs` pages; 8
platform-checklist files, both `metadata-plugin.zod.ts#allowOrgOverride`
anchors re-pointed to `#allowEnvironmentOverlay` (revision-history
`change` entries keep the old name); 3 liveness notes; 2 ADR anchors;
the regenerated references.
- **The changeset** (`major` on the v18 pre-mode line, the `22572`
precedent): BREAKING, the FROM / TO table for registry entries and
`/meta/types` entries, `Clause-②: yes (narrowing)` and the ADR-0087
`registered` marker.
## The console pin (round 2)
**The hop.** objectui `4997995022f8..e5311165a8d6` (`.objectui-sha` was
`4997995022f8` on `main` at the merge): 24 commits, all non-merge
squashes, over 287 paths (214 modified, 69 added, 4 deleted, none
renamed), +13412 / −2428. objectui `4baa8a67c4` (objectui#12170:
`slotsForType` stops reading the retired `flow-template` ledger role) is
INSIDE it, two commits below the new tip: `git merge-base --is-ancestor
4baa8a67c4 e5311165a8` exits 0, and `--is-ancestor 4baa8a67c4
4997995022f8` exits 1, read in a full (non-shallow) clone whose control
leg (`d32869883b`, 50 commits below the old pin) answers 0. Its
changeset is release-nothing, so the console changeset counts it among
the 2 release-nothing changesets rather than listing it.
**The Console Pin Gate's steps, run locally on this head:** `turbo run
build --filter=@objectstack/client...` exit 0;
`scripts/build-console.sh` exit 0 at `e5311165a8d6` (objectui cloned
from the pin into `.cache/`, 8872 modules; bundle canary `import/jobs`
present; one zod version literal; "Console bundle carries THIS tree's
@objectstack/spec, and only it"); the dist and its `.objectui-sha` stamp
in place; `pnpm check:console-sha` exit 0 (objectui@e5311165a8d6); `pnpm
check:console-injection --require-stamp` exit 0. The injection's stale
detector is the published spec's describe of the retired key, "Allow
per-org overlay writes via runtime metadata API", and it is absent from
the bundle.
**Against this PR's wire.** The built bundle's app code reads
`allowEnvironmentOverlay` 15 times (`metadata-admin`, `packagedActions`
and the shell; for example the read-only verdict is
`!u.allowEnvironmentOverlay && !u.allowRuntimeCreate`).
`allowOrgOverride` occurs only inside this tree's spec, in the tombstone
and its prescription text (4 occurrences, all in the
`vendor-objectstack` chunk); no app code reads it. Then the two
together, on a booted backend: `pnpm dev -- --fresh -p 38977` on this
head (showcase, the console dist above, `check:console-sha` green at
boot). The live `GET /api/v1/meta/types` answered 34 entries: all 34
carry `allowEnvironmentOverlay`, none carries `allowOrgOverride`, and
`true` is exactly `view`, `dashboard`, `report`, `translation` and
`email_template`, each with `overrideSource: registry`. In a headless
Chromium signed in as the seeded admin, the console's Setup metadata
pages read that wire: a packaged `view` (`showcase_task.in_progress`)
and a packaged `dashboard` (`showcase_chart_gallery`) open with the
`writable` badge and an editable designer, while a packaged `flow`
(`showcase_task_completed`) and a packaged `object` (`showcase_account`)
open `create-only` and "locked". No page names `allowOrgOverride`. The
server was stopped afterwards. In process, the `getMetaTypes` pin
(`protocol-meta-types-rich.test.ts`) and S1's five-type file on both
topologies are green on this head.
**The artefacts that travel with the pin**, in the shape PR #22794 used:
- `.changeset/console-e5311165a8d6.md`, derived by
`scripts/bump-objectui.sh` from the changesets objectui declared over
the range (21 releasing, 4 breaking by their authors' annotation, no
declared `major`). Its ADR-0087 disposition is `not-required
(no-migration-prescription)`, and it answers each declared-breaking
objectui change: objectui#12141 is this PR's own rename, whose
prescription and `registered` disposition live in
`22340-registry-allow-environment-overlay.md`; the three objectui#12130
changes move objectui's own form-field face, no ObjectStack key.
- `sdui.manifest.json` and `scripts/sdui-manifest.record.json`,
regenerated from the built tree at the pin: 107 components; one input
description changed (the record activity feed's `showCompleted`,
objectui#12106), and no component, input, type or required flag moved.
- `packages/sdui-parser/objectui-lockstep.json`, re-recorded at the pin:
the 214-line grammar region, the 25 diagnostic codes and the containment
predicate are unchanged.
- `.changeset/objectui-pin-citations-e5311165a8d6.md`
(`@objectstack/spec` patch, `Clause-②: no`) and the re-measured
citations. All 55 asserting citations (49 hand-written, 6 in the
generated migrations registry) were mapped through the hop. Five cited
files changed (`ObjectGrid.tsx`, `data-table.tsx`, `form.tsx`,
`record-related-list.tsx`, `data-objectstack/src/index.ts`) and every
cited line in them moved or held byte-identical; each record gains a hop
sentence, and the anchors that moved are re-pointed where the records
cite them at this pin. The six migration entries' corpus counts were
re-taken with `git grep -o -F` (8506 tracked files; 124 zero tokens
still zero; `Span` 517 to 519, both new hits `colSpan`).
`check:objectui-pin-citations --verify-anchors` against objectui at the
pin: 55 asserting citations match, 13 anchor content assertions
verified.
## New pins
- `kernel/metadata-type-registry-allow-org-override-retirement.test.ts`:
the parse refuses the old key with the rename (code, path, prescription
text; `false` refused like `true`); the new key parses and defaults to
`false` with no old key grown back; every built-in row states the new
key, none the old, and the true set is exactly the five; the
retired-keys registration.
- `kernel/metadata-type-registry-allow-org-override-absence.test.ts`
(`repo` project, radius already declared for
`@objectstack/spec#test:repo`): a tree-scoped, AST-read absence of any
CODE reference to `allowOrgOverride` in `packages/**/*.ts` and
`examples/*/src/**/*.ts`. Comments and strings are history and are not
judged; the tombstone declaration is exempt by shape. The sibling
refusal pin is counted apart and REQUIRED to be found, so the walk
carries a live positive control.
- `objectql/protocol-meta-types-rich.test.ts`: both writer arms carry
`allowEnvironmentOverlay`, the hatch elevation lands on it on both arms,
and `not.toHaveProperty('allowOrgOverride')` on every entry.
- S1's `environment-overlay-five-types.test.ts` under the new name on
both topologies, plus the wire absence; the identity pins
(`org-scoped-write-refused`, `adr0005-org-override-rollback`,
`overlay-precedence`) read the new key.
## Ablation (round 1; committed fix first; restored blob-equal)
Dropped the hand rename of `OVERLAY_ALLOWED_TYPES`'s reader (`if
(!entry.allowEnvironmentOverlay) continue;` back to the old key) through
`scripts/ablation-replace.mjs`: anchor 1 → 0, mutant 0 → 1 on disk;
`@objectstack/metadata-protocol` rebuilt; `ablation-dist-preflight`
found the marker in `dist/index.js` and `dist/index.cjs`. S1's five-type
file: **20 failed / 6 passed of 26** (the 6 are the wire and identity
cases, which do not read that set). Restored: blob `eff1a12c83e2` equals
HEAD, `git diff HEAD` empty; rebuilt; preflight `--absent` clean over 24
built files; the same file **26 / 26 passed**.
## Readings (head `49ef13a518`)
- **Residual `allowOrgOverride` in non-test source:** the tombstone, its
prescription and TSDoc, the registry's naming note, the retired-keys and
D3 entries, the rationale fragment, two shipped protocol-17 D3 entries,
`18.metadata-write-organization-scope-refused` (history), the generated
`authorable-surface/kernel.json` `[RETIRED]` row and the untouched
`authorable-surface.base.json`, four history comments (`protocol.ts`
retired exemption, a quoted docs sentence and the commit `ee58392e1`
record in `sys-metadata-repository.ts`, `rest-server.ts`), two
ADR-anchor history notes, and the checker's header note. No code
reference (the absence pin).
- **Surfaces (spec-property-retirement).** Apply: schema, retired-keys +
D3 + fragment, generated baselines (`authorable-surface/kernel.json`,
`authorable-defaults/kernel.json`, four reference pages), pin tests
(radius declared), examples (one comment), docs, changeset, the
`check:generated` source audits and the dogfood radius. Do not apply:
orphan value schema (boolean), D2 conversion (ruled out), liveness
ledger row (none exists for the registry entry; the three prose notes
follow the name), forms and i18n (no `*.form.ts` input), CLI advisory
lint (ledger-driven, no row), published skills (S3). `api-surface`,
`json-schema.manifest` and `export-origins` do not move (no export
renamed); `authorable-surface.base.json` is written only by
`gen:authorable-surface-base` and is untouched.
`acceptRetiredDefaultResidue` is not needed: no built artifact or stored
row carries a registry entry.
- **Size.** 162 files, +1509 / −649 = 2158 changed lines, generated
included, under the 3,000 line. The pin round's own files: 21, +350 /
−79.
## Not in this PR
- The governed text (S3): `AGENTS.md` Prime Directive 7,
`skills/objectstack-ai/SKILL.md`, ADR-0005 (and the dated ADR records).
- cloud's two test helpers (`service-ai-studio` `write-door.ts` and
`metadata-tools.test.ts`): recorded on the card (`6109343061` item 5)
for a seat that reaches cloud.
- CHANGELOGs and every other pending changeset.
## Acceptance notes
- `check:platform-checklist` is red on this head on 8 findings in files
this PR does not touch, each byte-identical to `main`: the 7 recorded in
round 1 (`areas/access-security.json`, `areas/attachments-storage.json`)
and one more, `areas/search.json` citing `protocol.ts#countable`, a
symbol main's PR #22857 (`55382dc02a`) removed. `countable` reads 0 in
`protocol.ts` on `origin/main` and on this head. Not this diff.
- The ADR-0087 marker names only the D3 id: the gate resolves ids from
the semantic and conversion registries and refused the retired-keys
string as an id. The retired-keys entry is named in the changeset body.
- `pnpm --filter @objectstack/spec check:migration-registry` does not
exist (the registry is git-ignored and generated);
`gen:migration-registry` ran green on this head (424 semantic, 259
retired-key, 222 retired-def).
- This branch merged `main` at `018b077fbf` (round 2, through
`os-regen-merge.sh`; two hand-written conflicts, `email-template.zod.ts`
and `liveness/README.md`, resolved by stacking both intents). `main` has
moved 9 commits since; `git merge-tree --write-tree HEAD origin/main` is
clean, and none of those commits adds a line naming either key or an
asserting pin citation.
## Verification (head `49ef13a518`)
- `@objectstack/spec`: `typecheck` exit 0; `test` (local) 649 files /
19398 tests passed (1 todo); `repo` project: the absence pin,
`retired-key-migrate-sentence` and `step18-rationale-merge`, 3 files /
26 tests passed.
- `@objectstack/metadata-protocol`: `test` 226 files passed, 3 skipped
(28171 tests passed, 19 skipped); `typecheck` exit 0.
- `@objectstack/objectql`: S1's `environment-overlay-five-types.test.ts`
and the wire pin `protocol-meta-types-rich.test.ts`, 2 files / 33 tests
passed.
- Built first: `turbo run build
--filter=@objectstack/example-showcase...` (61 tasks, exit 0); later,
eight packages outside that closure, by name, for two gates'
prerequisites and the boot (`client-react`, the five packages
`check:published-readme-exports` reads, `studio`,
`service-cluster-redis`). No `pnpm build`. `check:generated` exit 0 (all
14 artifacts up to date against that dist); `check:api-surface`
"unchanged"; `check:authorable-surface` exit 0
(`authorable-surface.base.json` trails `018b077fbf88`, an information
line); `check:future-spec-major` exit 0 (no citation names a major above
17, with the version word gone from the prescription).
- The Console Pin Gate's steps: see the pin section; every step exit 0.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` (no paths) at this head printed 155
commands; every one run except two, and `--ran` reconciles: 155 derived,
153 run, 2 NOT-MEASURED (claimed), 0 UNRUN. Exit codes: 152 × 0 and
`check:platform-checklist` × 1 (above). `check:skill-examples` first
refused with exit 3 (`@objectstack/client-react` unbuilt), then exit 0
after that package was built. NOT MEASURED: `check:dual-build-cjs-loads`
(no whole-workspace build this round) and `check:type-check-debt` (the
derived command is the `--re-measure` this round does not run).
- Artifact rosters (41), with `PR_NUMBER=22874`, `PR_HEAD_REF`,
`PR_BODY` and `GITHUB_REPOSITORY` wired for `closing-target-claim`,
`partof-closing-keyword` and `single-claim-paths`: 41 × exit 0. Two
needed a rerun: `check:published-readme-exports` refused with exit 3
until five packages outside the showcase closure were built, and
`check:select-shard-packages`'s self-test compared output that the proxy
variable the PR-context guards need had polluted with a warning; rerun
without it, exit 0.
- `check:pm-dispatch-gates` (fast tier): 1828 cases pass, exit 0.
`check-adr-0087-registration --base origin/main` exit 0: two
declared-breaking changesets,
`22340-registry-allow-environment-overlay.md` (`registered
metadata-type-registry-allow-org-override-renamed`) and
`console-e5311165a8d6.md` (`not-required (no-migration-prescription)`).
Round 2 (the pin round) was written by session
`session_01KNKBCRDJCu5tGy3TEbvtrF` under claim `6109485204`, on the
seat's order `6117020961`.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 21914c3 commit e23eccb
162 files changed
Lines changed: 1509 additions & 649 deletions
File tree
- .changeset
- content/docs
- ai
- api
- automation
- concepts
- deployment
- kernel/contracts
- permissions
- plugins
- protocol/objectui
- references
- api
- kernel
- system
- ui
- docs/qa/platform-checklist
- areas
- examples/app-showcase/src
- packages
- lint/src
- metadata-core/src
- metadata-protocol/src
- objectql/src
- platform-objects/src/audit
- plugins/plugin-security/src
- qa/dogfood/test
- rest/src
- runtime/src
- domains
- sdui-parser
- services/service-automation/src
- spec
- authorable-defaults
- authorable-surface
- liveness
- src
- api
- contracts
- data
- kernel
- migrations
- entries
- retired-keys
- semantic
- system
- ui
- scripts
- adr-anchors
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| 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 | + | |
| 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 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments