Repository navigation
Commit 89d5a41
fix(metadata-protocol)!: an exact
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbBePzY6g11h3hyWk5ud4vWy)_
Fixes #34247
Part of #34248 (delivered here; the area closes it on merge, as with PR
#34324)
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill teaches a moved answer: `skills/**` teaches
`?package=` reads of a holder or of its pair (objectstack-platform
SKILL.md, "Customizing an installed package"), which do not move, and
never the read of a package that holds no item of the name or the bare
doc read beside a package-less entry
> **BREAKING.** Served answers become refusals. `?package=X` of a name X
ships no item of, while another package ships it, now answers `409
RESOURCE_CONFLICT`, reason `not-held-by-qualifier`, with
`details.candidates` naming the holders (ruling 6917064203 on #34398),
on the plain read and `/layers`. A name nothing holds stays 404. The
read gate answers before the `not-held-by-qualifier` refusal names any
holder: a caller the ADR-0046 §6.7 docs audience refuses a `doc` gets
the gate's 401/403, and a member the list view audience refuses a `view`
gets the gate's 403. The bare doc read of a name two enabled packages
ship, beside the environment's own package-less entry, now serves that
entry instead of the package registered last. ADR-0087 disposition:
`not-required (no-migration-prescription)` (in the changeset). No schema
key, stored row or registry slot changes.
## 维护者速读
- 改了什么:带 `?package=X` 读取文档、视图等 8 类元数据时,如果 X 没有这个名字而别的包有,返回 409
`not-held-by-qualifier` 并列出持有包,不再返回别的包的内容;谁都没有的名字仍是
404。`/layers?package=X` 同样处理。文档和视图先过各自的门禁:文档受众门禁拒绝的成员和匿名访问者拿到门禁自己的
403/401,视图受众门禁(`requiredPermissions`)拒绝的成员拿到 403,门禁放行的才拿到
409。两个包都发布同名文档、环境里又有一条无包条目时,不带包名的读取(普通读取、`/layers`、`/published`)返回这条环境条目。Console
文档页和扁平永久链接(跨文档引用都改写到它)在应用包不持有该文档时改为按名字读,跨包引用照常显示,或显示持有包的受众拒绝。
- 为什么改:ADR-0150 D3/D5 规定精确地址只回答该持有者;裁决 6917064203(#34398)定为 409
并列出持有者;裁决 6893582352 规定环境自己的条目优先。原来包名写错的作者会悄悄拿到别的包的内容。
- 风险与回滚:200→409 是收窄(BREAKING),只影响"包名不持有、别的包持有"的地址;环境条目那一行是 200→200
换内容。持有者自己的地址、配对包地址、无包条目、`object`、已覆盖类型、`position`/`capability` 都不变。回滚即
revert 本 PR。
-
先看:`packages/metadata-protocol/src/protocol-meta-item-reads.ts`(`registryAnswerAtAddress`
的拒绝分支与安全目录排除)、`packages/rest/src/meta-item-read-gate.ts`(`gateHolderNamingRefusal`,门禁先于拒绝)、`ui/apps/console/src/pages/DocsSlug.tsx`
与 `doc-address.ts`(按名字回退)。
- 两分钟验证:`pnpm --filter @objectstack/runtime exec vitest run
--maxWorkers=2 src/domains/meta-holder-refusal-audience-gate.test.ts
src/domains/meta-disabled-holder-artifact-door.test.ts`,预期 58 通过、4
跳过(两个文件合计);文档门禁拒绝的成员得 403、匿名得 401,视图门禁拒绝的成员得 403,放行者得 409
并列出持有包,`[#34247]` 组在四种装配下非持有包地址返回 409,`[#34248]` 各条在两种注册顺序下三个入口一致。
- 需要你做的:无,席位落地。
## What changes
**#34247 (exact address, X holds no item of the name).** PR #34241 made
step 2 of `readMetaItem` decline the metadata service's copy of another
package at `?package=X`, for the types the exact qualifier (ADR-0150 D5)
does not judge. When X held no item of the name, step 3 still read
`getItem`, whose last tier is the first composite across packages, so
the address answered another package's item.
Now the code layers' answer at such an address goes through
`registryAnswerAtAddress`. An item stamped with another installed
package (the same test as `serviceCopyOfAnotherPackage`: not X, not a
customization pair either way) is replaced by the registry's package
slot for X. When X has no slot:
- If other packages hold the name, the read is refused `409
RESOURCE_CONFLICT`, reason `not-held-by-qualifier`, `details.candidates`
naming each holder (`notHeldByQualifierRefusal` in
`protocol-exact-qualifier.ts`). This is the refusal the covered types
already answer, and it uses existing vocabulary only (ruling 6917064203
on #34398).
- If nothing holds the name, the answer is nothing, and the door answers
its own 404.
- A qualifier that names no installed package (the Console's app-name
segment) gets the same answer (ruling item 3).
- The read gate answers before the `not-held-by-qualifier` refusal names
any holder (`gateHolderNamingRefusal` in `@objectstack/rest`, asked by
both transports' plain read and `/layers` read). For a `doc`, the
ADR-0046 §6.7 docs gate judges a doc by its name, so it needs no
holder's item: a caller it refuses gets the gate's `403
PERMISSION_DENIED`, or `401 UNAUTHENTICATED` when anonymous. For a
`view`, the list view audience gate (`filterViewForUser`) judges a view
by its body, so every holder the refusal names is read at its own
address (a package at its `?package=`, the environment's own item at the
address naming no package) and judged: a member it refuses for any one
of them gets the gate's `403 PERMISSION_DENIED`. A holder that cannot be
read fails closed: both transports' plain read and `/layers` answer the
same `500 INTERNAL_ERROR`, which names no holder. A caller the gate
admits gets the 409.
The family is the eight types PR #34241 enumerated: `doc`, `view`,
`translation`, `field`, `seed`, `datasource`, `external_catalog`,
`object_extension`. The security catalog types `position` and
`capability` are excluded in code (`isSecurityCatalogType`, ADR-0131
D3). The registry keeps one package holder of such a name, so their code
layers' answer is unchanged. A CONTROL pin for each type proves it.
**Aligned in the same direction.**
- `getMetaItemLayered` (`/layers?package=X`): the code layer declines
the service's copy of another package and reads X's own item. At an
address X holds none of, it gives the same refusal as the plain read
(ruling item 2).
- `readCodeLayerForCarryForward` (the save's credential carry-forward,
read when no stored row is at the address the save writes): the same
decline and the same registry answer, but it **keeps "carries none"**.
It does not refuse (ruling item 2 leaves this choice open). The reason:
the carry-forward is no read answer. The save door already judges the
address on its own path, and a refusal here would turn a save that main
accepted into a 409 for a reason the save door never names. Of the
family only `datasource` has a credential redactor, so only a datasource
save moves. It carried the credential of the package the service kept
(or of the first registered holder). It now carries X's own, or none
when X ships no datasource of the name.
**#34248 (bare doc read beside a package-less entry).** Take two enabled
holders and a package-less entry in the registry's bare slot. The
registry exempts the bare doc read from PR #34036's refusal and serves
the entry, and so does `MetadataFacade.get`. The protocol's plain read,
`/layers` and `/published` served the metadata service's copy instead,
which is the holder registered last. Now the environment's entry answers
first (ruling 6893582352) on every bare door:
- `refuseAmbiguousBareDocRead` still refuses two holders with no such
entry (409, as on main). When an entry sits beside two or more enabled
holders, it returns that entry.
- `readMetaItem` step 2 and the layered read decline a package-stamped
service copy in that case (`bareDocServiceCopyDisplacesEntry`).
- With no overlay stored, both `/published` doors
(`packages/runtime/src/domains/meta.ts` and
`packages/rest/src/meta-item-history-routes.ts`, about four lines each,
beside the #32183 `mixedOwner` swap) serve the layered read's answer in
place of a package-stamped service copy.
**Review M1: the hydrated row as the hydrator lays it.**
`hydrateOverlayIntoRegistry` stamps a package-less stored row
`_provenance: 'org'` with no `_packageId` (`stateTenantAuthorship`).
Such an entry is tenant-authored, so it is never the code layer
(#21059). At `989f4ad7` the plain read served the row while `/layers`
answered `effective: null`, because the sealed doc's package-less row
was declined. Both `/published` doors served 200 with an empty body. Now
the layered read lets the environment's row answer when the bare slot
holds that row's tenant-authored entry and no code layer
(`environmentRowAnswers`: the entry is tenant-authored and `code` is
null). `/layers` reports `code: null` with the row as `overlay` and
`effective`, and both `/published` doors serve the row, consistent with
the plain read. The same row hydrated **after** the artifacts registered
(`loadMetaFromDb`, and boot hydration after the artifact door) wears the
first registered holder's envelope (`mergeArtifactProtection` grafts it:
`_packageId` = first holder, `_provenance: 'package'`). No package-less
entry exists then, and the bare doors stay refused 409 naming both, as
on main. Both orders are pinned on the composed rig.
**Review S4: a stamp-less entry beside a different stored row.**
`environmentRowAnswers` first held for any bare-doc environment entry
beside a package-less stored row. With a stamp-less runtime registration
(a code layer) and a different package-less stored row, `/layers`
`effective` and both `/published` doors moved to the row while the plain
read kept the entry. It now holds only where the entry is the row's
tenant-authored copy (`code` is null). In the mixed state all three
doors serve the registration, with the row as `/layers` `overlay`, as at
`989f4ad7`. Pinned in both orders.
**Review S1: one holder beside a stamp-less entry.** I took the minimal
option: pin the cell and declare it. The bare doors serve the holder's
doc while the registry's `resolveItem` serves the entry. The test is
`[measured, unresolved]` and it runs for each one-holder composition.
The cell stays out of scope because card #34248's acceptance names two
or more holders, and ruling 6893582352 was argued beside two holders.
Moving the one-holder cell would change a 200 answer that no card or
ruling names. It is declared in the changeset under "Not moved".
Follow-up card: #34452 (needs a ruling first).
**Review M2 and ruling item 6: the Console doc doors.** Two Console
doors read a doc under the route's package segment, with X as ADR-0048
prefer-local context: the reader (`DocPage`, `/apps/X/docs/BOOK/NAME`)
and the flat permalink (`DocsSlug`, `/apps/X/docs/NAME`, which every
cross-reference is rewritten to by `doc-links.ts`). The permalink's
single-item read (objectui#10188) tells a name the member may not read
from an absent one. When either read answers the `not-held-by-qualifier`
409 (X not among the candidates) or a 404, the door now reads the name
again by name. Both share one rule, `readsByNameAfter` in
`ui/apps/console/src/pages/doc-address.ts`. The result:
- A cross-reference from X's docs to another package's doc renders that
doc, as on main.
- The app-name segment of a package that ships several apps (which names
no package) renders the doc's one holder, as on main.
- On the flat permalink, a doc the member may not read renders its
holder's audience refusal (`DocRefusal`), as on main, for both segment
kinds. Before this round it fell to the name-prefix redirect or
"Documentation not found".
- A name two other packages ship shows the candidate list (#34070),
where main showed one of them by registration order.
A 404 stays the page's "not found" (not turned into a refusal). Opening
the single named holder directly is left as the optional follow-up the
ruling names.
## FROM → TO
| Read | FROM (main) | TO |
|---|---|---|
| `GET /meta/doc/NAME?package=X`, X ships no doc of NAME (installed, or
not installed), another package does; dispatcher and REST, both
registration orders | 200, a holder's doc | 409 `RESOURCE_CONFLICT`,
`details.candidates` = the holders (ruling 6917064203 on #34398) |
| same address for `view`, `translation`, `field`, `seed`, `datasource`,
`external_catalog`, `object_extension` | 200, a holder's item | 409
`not-held-by-qualifier` naming the holders |
| `?package=X` of a name no package holds, any of the eight types | 404
| unchanged |
| `GET /meta/doc/NAME?package=X` and `/layers`, X ships none, another
does, caller refused by the ADR-0046 §6.7 docs audience; both transports
| 403 `PERMISSION_DENIED` (401 `UNAUTHENTICATED` anonymous): the gate on
the holder's doc | unchanged: the gate answers before the 409 |
| `GET /meta/view/NAME?package=X` and `/layers`, X ships none, another
does, a member the list view audience (`requiredPermissions`) refuses;
both transports | 403 `PERMISSION_DENIED`: the gate on the holder's view
| unchanged: the gate answers before the 409 |
| `GET /meta/doc/NAME/layers?package=X`, X ships none, another does |
200, a holder's `code` and `effective` | 409, as the plain read |
| `GET /meta/doc/NAME/layers?package=X`, X and Y ship NAME, Y registered
last | 200, Y's `code` and `effective` | 200, X's |
| bare `GET /meta/doc/NAME`, `/layers`, `/published`, two enabled
holders plus a stamp-less bare entry; both transports, both orders |
200, the holder registered last | 200, the entry (`/layers`: `code` and
`effective`) |
| same, with a different package-less stored row beside the stamp-less
entry | 200, the holder registered last | 200, the entry on all three
doors (`/layers`: the entry as `code` and `effective`, the row as
`overlay`) |
| same, with a package-less stored row hydrated before the artifacts
(`_provenance: 'org'` entry) | see "Hydration readings" below | 200, the
row (`/layers`: `code: null`, the row as `overlay` and `effective`) |
| same row hydrated after the artifacts (envelope grafted from the first
holder) | 409 naming both | unchanged |
| same name, two holders, no package-less entry | 409 naming both |
unchanged |
| save naming X of a `datasource` with no stored row at X (credential
carry-forward) | carries another holder's credential | carries X's own
credential, or none (never refuses) |
| Console reader `/apps/X/docs/BOOK/NAME`, X ships none of NAME | the
doc one holder ships (or one of two by registration order) | the doc one
holder ships; two holders show the candidate list |
| Console flat permalink `/apps/X/docs/NAME` (cross-references), X ships
none of NAME, a doc the member may not read | the holder's audience
refusal | unchanged (read again by name after the 409) |
| a holder's own address; a pair's address of its base's item; an item
bound to no package; `object`; `position` and `capability`; one holder
beside a stamp-less entry (measured, unresolved); any other read naming
no package | as on main | unchanged |
| the covered types (`action`, `hook`, `job`, `sharing_rule`, `queue`,
`assignment_rule`) at a third package | 409 `not-held-by-qualifier` |
unchanged |
## Hydration readings (dispatch task 1; review M1)
Measured with the real hydrator on the composed artifact rig
(`MetadataPlugin` artifact door plus `AppPlugin`, SQL driver, a stored
package-less `sys_metadata` row of a doc two packages ship), on the
dispatcher and on `RestServer`, in both registration orders. Scratch
test files were not committed.
- **Hydrated after the artifacts** (boot hydration, and `loadMetaFromDb`
after the artifact door): the entry carries the first holder's
`_packageId` with `_provenance: 'package'`. The bare doors answer 409
naming both. The answer is identical at origin/main `c934631723` and at
head `72dc8ca25e`, and it stays so at this head (CONTROL pin). The save
door answers 403 `NOT_OVERRIDABLE`, so no new row is stored.
- **Hydrated before the artifacts** (the hydrator's own `_provenance:
'org'` entry): measured at the merge base `6cc3f97465` (main as this PR
forks it) and at this head:
| Door | main `6cc3f97465` | head `de137717ef` |
|---|---|---|
| bare plain read, both transports | 200, the holder registered last
(`beta doc` with alpha first, `alpha doc` with beta first) | 200,
`environment doc` (the row) |
| bare `/layers` | 200, `code` = the holder registered last, `overlay` =
the row, `effective` = the holder registered last | 200, `code: null`,
`overlay` and `effective` = the row |
| bare `/published`, both doors | 200, the holder registered last | 200,
the row |
| each holder's own address | its own doc | unchanged |
At `989f4ad7` (this PR before the M1 fix) the same state answered: plain
read the row; `/layers` `code: null`, `overlay` the row, `effective:
null`; both `/published` doors 200 with an empty body. That is the
inconsistency M1 named. The head answers are the green pin `[#34248] a
hydrated package-less row (hydrated before the artifacts)` in the rig;
the M1 ablation turns it red in both orders.
- **The exact address of a non-holder** at main `6cc3f97465`, same rig:
`?package=com.qa.gamma` (installed, ships none) and
`?package=com.qa.unknown` (not installed) answer 200 with a holder's
doc. The plain read gives the first composite (`alpha doc` with alpha
first, `beta doc` with beta first). `/layers` gives the service's copy
(the holder registered last) as `code` and `effective`. With beta alone
shipping, `?package=com.qa.alpha` answers 200 `beta doc`. At this head
every one of these answers 409 `RESOURCE_CONFLICT` with
`details.candidates` = the holders.
## Ruling item 5: the read gate answers first
Rule: the read gate answers before the `not-held-by-qualifier` refusal
names any holder. At `?package=X` of a doc X holds none of, on the plain
read and `/layers` of both transports:
- a member the docs audience refuses gets the gate's `403
PERMISSION_DENIED`, with no candidates;
- an anonymous caller gets the gate's `401 UNAUTHENTICATED`, with no
candidates;
- CONTROL: a caller the gate admits gets the `409 RESOURCE_CONFLICT`
naming the holders;
- CONTROL: a doc of the `org` audience gets the 409 for a member.
The same order holds for a `view` at the same address (the list view
audience, `requiredPermissions`): a member it refuses gets the gate's
`403 PERMISSION_DENIED`, with no candidates; CONTROL: a member it admits
gets the 409 naming the holders; CONTROL: at the holder's own address
the two members get the gate's 403 and the view. Every holder the
refusal names is judged, the environment's own item included: a view
only the environment holds answers a member its audience refuses the
gate's 403 (CONTROL: an admitted member gets the 409), and a view a
package and the environment both hold answers the gate's 403 to a member
the package's view admits and the environment's refuses (CONTROL: a
member both admit gets the 409).
Pinned in
`packages/runtime/src/domains/meta-holder-refusal-audience-gate.test.ts`.
Its transports and the gate are real; the protocol is a double that
throws the protocol's own refusal shape.
## Tests
- `packages/objectql/src/package-scoped-exact-qualifier.test.ts`, the
#34247 describe (between the #34040 and #34041 describes; #34354's
describe is kept intact after the merge). It contains:
- the family pin;
- per type, in both registration orders, the 409 naming both holders at
`?package=` of a third installed package and of `com.acme.unknown`, on
the plain read and `getMetaItemLayered`, whichever holder's copy the
service keeps;
- one holder: another package's address is refused naming that holder,
and the holder reads its body;
- CONTROLs: a name no package holds is the read's own miss; a pair's
read of its base's item and a package-less entry are served; every
covered type is still the exact qualifier's 409; `position` and
`capability` keep the holder's item (S2);
- the datasource carry-forward pin with the real redactor.
-
`packages/runtime/src/domains/meta-disabled-holder-artifact-door.test.ts`
(composed artifact rig, both transports):
- over four compositions, the non-holder 409 with `details.candidates`
on the plain read and `/layers` for an installed and a non-installed
package;
- CONTROL: a name no package ships is 404 at any package address;
- each holder's own address;
- the one-holder CONTROL;
- the S1 `[measured, unresolved]` pin;
- the #34248 pins: stamp-less entry, hydrated-before-artifacts
`_provenance: 'org'` row (M1), a stamp-less entry beside a different
package-less stored row (S4: all three doors serve the entry, the row as
`overlay`), and the hydrated-after-artifacts CONTROL through the real
`loadMetaFromDb`.
-
`packages/runtime/src/domains/meta-holder-refusal-audience-gate.test.ts`
(both transports, the real gate): the gate's 403 for a refused member
and 401 for an anonymous caller at `?package=` of a package holding
none, on the plain read and `/layers`; CONTROLs: an admitted caller and
an `org`-audience doc get the 409 naming the holders. A second describe
pins the view gate at the same address on both transports: a member the
view audience refuses gets the gate's 403 with no candidates; CONTROLs:
a member it admits gets the 409, and the holder's own address answers
the two members the gate's 403 and the view. A third describe pins every
holder the refusal names, the environment's own item included: a view
only the environment holds, and one a package and the environment both
hold, each with a refused member's 403 and an admitted member's 409
CONTROL. A fourth describe pins a holder the view gate cannot read: on
both transports' plain read and `/layers`, a refused and an admitted
member alike get `500 INTERNAL_ERROR` with no candidates; CONTROL: the
same address with a holder that reads is the gate's answer (409). The
environment-holder pins are driven by candidates the protocol double
supplies; for a `view`, the refusal this PR adds names package holders
only, so those pins hold the helper's rule rather than a row today's
protocol produces (accepted, no contract effect).
- `ui/apps/console/src/pages/docs-portal.test.tsx`, "objectstack#34247 —
a doc the route's package ships none of is read by name":
- a cross-reference renders the other package's doc (reads
`['com.example.alpha', undefined]`);
- the app-name segment renders its holder's doc;
- two holders show the candidate list;
- CONTROL: the own package is read only at its address;
- CONTROL: a name nobody ships is not found;
- the flat permalink (`DocsSlug`), under `WORLD.exact`: a cross-package
link to a doc the member may not read renders the holder's refusal
(reads `['com.example.alpha', undefined]`), and so does the app-name
segment of a multi-app package (reads `['alpha_suite', undefined]`);
CONTROL: under the holder's own package it reads that address only.
## Verification
Final head `0bc781b5` (taken over by seat repo:objectstack#2 from area
o1-D). Since `24a7664b` (L1-b delta ACCEPT 6932779854, review#2 PASS
6932891519) the delta is 7 files: `.changeset`, rest `index.ts`,
`meta-item-read-gate.ts`, `meta-item-read-routes.ts`, `rest-server.ts`,
runtime `domains/meta.ts` and
`meta-holder-refusal-audience-gate.test.ts`. Commits since: `4b5f2e4b`,
`0ba6987a` (the sentence narrowed to the refusal the helper judges),
`f45378bb` (the view gate answers before the refusal names a holder),
`735dd6a9` (one holder reader in the dispatcher that rejects when the
protocol has no by-name read), `b6f7c36f` (the view gate judges every
holder the refusal names, the environment's own item included; a holder
that cannot be read fails closed), `0bc781b5` (the dispatcher's plain
read answers an unreadable gate input with the fault status its layered
read answers; pinned on both transports). Merge base with origin/main is
still `24b6ae5501`; `git merge-tree` against origin/main is clean.
Main's one commit on a file of this PR (`protocol-meta-item-reads.ts`,
the ADR-0156 compiled-answer cache) caches only reads that name no
package, of types other than `doc`, so it does not reach the reads this
PR moves.
Readings at `0bc781b5`, on a shared box, each heavy run as its own
verify-lock call (exit codes captured before any pipe):
- Closure build (`turbo run build --filter '@objectstack/dogfood^...'`):
exit 0.
- `pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2
src/domains/meta-holder-refusal-audience-gate.test.ts
src/domains/meta-disabled-holder-artifact-door.test.ts`: exit 0, Test
Files 2 passed, Tests 58 passed, 4 skipped.
- typecheck (`NODE_OPTIONS=--max-old-space-size=8192`; at the default
heap the runtime test-layer check dies of a V8 heap OOM with no
diagnostics): `@objectstack/rest` 0, `@objectstack/runtime` 0.
- `pnpm exec vitest run` in `packages/runtime`, every file: exit 0, Test
Files 614 passed; Tests 12661 passed, 23 skipped. Same in
`packages/rest`: exit 0, Test Files 419 passed; Tests 8864 passed, 373
skipped. (At `b6f7c36f`, `pnpm --filter … test`: runtime 11304 passed,
23 skipped; rest 8564 passed, 350 skipped.)
- `dispatch-gates --commands` from the merge base, at `0bc781b5` (the
same 79 as at `b6f7c36f`): 79 derived, 79 run to exit 0. `--ran`: "79
derived famil(ies) accounted for — 79 run, 0 NOT-MEASURED".
- Dogfood battery (title carries `!`): `pnpm --filter
@objectstack/dogfood test`, no shard, no path: exit 0; Test Files 478
passed, 3 skipped (481); Tests 4030 passed, 44 skipped (4074). No
failure. Also exit 0 with the same counts at `b6f7c36f`, `735dd6a9`,
`f45378bb` and `0ba6987a`.
Readings from earlier heads, kept for the record:
<details><summary>Builds, typechecks and package suites (exit codes
captured before any pipe)</summary>
- At `24a7664b`, after `pnpm install --frozen-lockfile`: closure build
(`--filter '@objectstack/dogfood^...'`): `VERDICT command-exit 0`.
- At `24a7664b`, CI: `TypeScript Type Check` success, `Test Core` and
`Test Core (1/8)`–`(8/8)` success, `Type Check UI` success, `Test UI`
success. Package suites were not rerun locally this round; the merge
brought only main.
- At `c47c71b4` (code unchanged since; `2496009b` changed one changeset
line): typecheck `metadata-protocol` 0, `objectql` 0, `runtime` 0,
`rest` 0. `@objectstack/objectql` test 0 (Test Files 603 passed; Tests
13520 passed). `@objectstack/runtime` test 0 (Test Files 609 passed;
Tests 11222 passed, 23 skipped). `@objectstack/metadata-protocol` test 0
(Test Files 346 passed, 9 skipped; Tests 22968 passed, 45 skipped).
`@objectstack/rest` test 0 (Test Files 413 passed; Tests 8552 passed,
350 skipped). `@object-ui/console` test 0 (Test Files 322 passed; Tests
3321 passed). `eslint --no-inline-config` on the changed files: 0
errors. `check-platform-checklist --changed-from origin/main`: OK, 36
anchors judged, 0 lost.
</details>
<details><summary>Derived gate families (dispatch-gates --commands, from
the merge base, at 24a7664)</summary>
- 79 derived, 78 run to exit 0, `check:nul-bytes`,
`check:doc-authoring`, `check:issue-citations` and
`check:test-source-alias` among them. `check:type-check-debt` first
answered exit 3 while the battery held the verify lock; rerun, it exited
0 ("0 raw tsc error(s) total, none above its recorded number").
- `check:dual-build-cjs-loads` exit 3 (PREREQUISITE NOT MET: no
`packages/qa/scenarios/dist`; it needs a full build). NOT MEASURED
locally; CI's `Lint & Repo Gates` is success.
- `dispatch-gates --ran` (with recorded exit codes): "79 derived
famil(ies) accounted for — 78 run, 1 NOT-MEASURED (1 DERIVED from a
recorded exit 3)".
- Earlier rounds: CI at `8c929a55` was red on `check:test-source-alias`.
The new audience-gate pin reached `import('@objectstack/metadata')`
through the dispatcher without a module-top load. Fixed at `c47c71b4` by
a module-top `import '@objectstack/metadata'` in that test.
</details>
<details><summary>Ablations (one per guard; each restore proved: blob =
HEAD, `git diff HEAD` empty, a protocol marker absent from dist after
the final rebuild)</summary>
Not rerun: no guard changed after `c47c71b4`. At `8c929a55` and
`c47c71b4`:
| Guard ablated | Suite | Result |
|---|---|---|
| G `gateHolderNamingRefusal` (returns nothing) | runtime
`meta-holder-refusal-audience-gate.test.ts` | 2 failed: the refused
member's 403 and the anonymous 401 (the two CONTROLs stay green) |
| DS `DocsSlug` by-name fallback | Console `docs-portal.test.tsx` | 2
failed: the flat permalink's cross-package link and app-name segment |
| S4 `code === null && isTenantAuthored(...)` in `environmentRowAnswers`
| runtime rig | 2 failed: the mixed-state pin, both orders |
- G and DS are in source the suites alias, so no build: the marker was
counted in the file (injected 1).
- S4 was rebuilt, and its marker was proved present in
`@objectstack/metadata-protocol`'s `dist` before the run was read.
- The first S4 pass is void and was rerun. Its marker (`'ABL_S4_MARKER'
!== ''`) was constant-folded out of `dist`, and the preflight refused
it. The rerun used a property-read marker that survives the build: the
preflight exited 0, and after the restore `--absent` exited 0 with a
clean tree.
From `de137717` (guards unchanged since), with the same restore proofs:
| Guard ablated | objectql exact-qualifier file | runtime rig | Console
docs-portal |
|---|---|---|---|
| M1 `environmentRowAnswers` (layered read) | — | 2 failed: the
hydrated-before-artifacts pin, both orders | — |
| S2 `isSecurityCatalogType` exclusion | 2 failed: the `position` and
`capability` CONTROLs | — | — |
| R1 `refuse` in `readMetaItem` | 26 failed | 4 failed: the non-holder
409 pin, four compositions | — |
| R2 `refuse` in the layered read | 16 failed | 4 failed: the non-holder
409 pin, four compositions | — |
| UI the by-name fallback in `DocPage` | — | — | 2 failed: the
cross-reference and the app-name segment |
At `f45378bb`, with the same restore proof (`git checkout HEAD --`,
clean `git status --porcelain`, marker count 0): the view arm of
`gateHolderNamingRefusal` ablated (the early return kept `doc` alone)
turns 1 pin red in `meta-holder-refusal-audience-gate.test.ts`, the
refused member's view 403 (1 failed, 6 passed); the source is aliased,
so no build.
At `b6f7c36f`, same restore proof: the environment's item skipped by the
view arm turns exactly 2 pins red, the environment-only and the co-held
refused member's 403 (2 failed, 9 passed); the two CONTROLs stay green.
At `0bc781b5` (same code as its pre-reword commit), same restore proof:
the dispatcher plain read's fault answer removed (the gate's rejection
left to the handler's outer catch) turns exactly 1 pin red, the
unreadable-holder fault pin (1 failed, 12 passed); its CONTROL stays
green.
</details>
<details><summary>Dogfood battery (title carries `!`)</summary>
- Head `24a7664b12`, after the closure build above: `pnpm --filter
@objectstack/dogfood test` under its own lock call, no shard, no path.
- `os-verify-lock: VERDICT command-exit 0 · held the lock 2265s
(37m45s)`.
- Test Files 478 passed, 3 skipped (481); Tests 4030 passed, 44 skipped
(4074). No failure.
- Superseded: at `c47c71b4`, VERDICT command-exit 0; Test Files 474
passed, 3 skipped (477); Tests 4006 passed, 42 skipped (4048).
</details>
CI at `0bc781b5` when this body was written: 43 check-runs success, 10
skipped, none in progress or failed; all eleven required contexts
success.
Taken over from repo:objectstack#1 · os-project-manager ·
session_01FEkQ5obaLbqgzRUR9xXfft.
repo:objectstack#2 · os-steve · session_01ADHkmNkZcGApqG4pHHMLeY
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmNkZcGApqG4pHHMLeY
<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmNkZcGApqG4pHHMLeY -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>?package= read answers its own package's item or a 409 naming the holders, and a bare doc read beside two holders serves the environment's own entry (#34347)1 parent 1538596 commit 89d5a41
18 files changed
Lines changed: 1388 additions & 81 deletions
File tree
- .changeset
- packages
- metadata-protocol/src
- objectql/src
- rest/src
- runtime/src/domains
- ui/apps/console/src/pages
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
1121 | 1122 | | |
1122 | 1123 | | |
1123 | 1124 | | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1124 | 1134 | | |
1125 | | - | |
| 1135 | + | |
| 1136 | + | |
1126 | 1137 | | |
1127 | 1138 | | |
1128 | 1139 | | |
1129 | 1140 | | |
1130 | 1141 | | |
| 1142 | + | |
1131 | 1143 | | |
1132 | 1144 | | |
1133 | 1145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
274 | 291 | | |
275 | 292 | | |
276 | 293 | | |
| |||
0 commit comments