Repository navigation
Commit 2dfe070
Fixes #16524
Clause-②: no
## What this changes
Three published `.describe()` strings in
`packages/spec/src/api/protocol.zod.ts`, the `organizationId` member of:
| schema | was | now |
|:--|:--|:--|
| `GetMetaItemRequestSchema` | "Selects the org partition in the
ADR-0005 overlay read order … Absent = environment-wide read: only
env-level overlays apply and no org partition is consulted." | "When an
org partition applies, this selects it in the ADR-0005 overlay read
order … Supplying a value does not by itself guarantee an org partition
is consulted; where none applies, and whenever it is absent, the read is
environment-wide and only env-level overlays apply." |
| `GetMetaItemLayeredRequestSchema` | "Selects the org partition …
Absent = environment-wide read: `overlay` reports the env-level row
only." | "When an org partition applies, this selects it … Supplying a
value does not by itself guarantee an org partition is consulted; where
none applies, and whenever it is absent, the read is environment-wide:
`overlay` reports the env-level row only." |
| `GetMetaItemCachedRequestSchema` | "Selects the org partition …
exactly as on the uncached read. Also folded into the ETag, … Absent =
environment-wide read." | "When an org partition applies, this selects
it … exactly as on the uncached read. Also folded into the ETag, …
Supplying a value does not by itself guarantee an org partition is
consulted; where none applies, and whenever it is absent, the read is
environment-wide." |
Plus the regenerated `content/docs/references/api/protocol.mdx` (three
table rows) and an `@objectstack/spec` **patch** changeset.
Prose only: no key, export, accept set or runtime behaviour changes. A
supplied `organizationId` is still accepted on all three requests, and
the runtime still drops it where no org partition applies.
## Rulings carried
- Ruling B (comment 5567936958), maintainer, verbatim: 「协议不对不是应该修改协议吗?」.
The describes are protocol text, so they are corrected now. The wording
qualifies the promise, states the negative, names neither
`allowOrgOverride` nor the registry (no registry clause), and adds no
key. Its shape matches the sibling
`GetMetaItemsRequestSchema.organizationId` row reworded in PR #16523, so
the four meta-read rows now read the same way.
- Scope ruling (comment 5807019811), maintainer, verbatim: 「16524
改文档,不需要按组织取」. This PR changes published text only: no runtime change,
and no refusal of a supplied `organizationId`.
- Measured correction (comment 5612706063): on
`GetMetaItemCachedRequestSchema` only the opening sentence overstated.
The ETag sentence ("Also folded into the ETag, so a scope switch never
returns a stale 304 from another scope's cached representation.") is
true, is pinned by PR #17292, and is **kept byte-for-byte**. Its source
line does not appear in this diff.
## Premise re-verified on today's tree
Measured on `84880f9` (BASE); the merge of `369bcbed` touched no file
below.
- The gate is `organizationIdForMetaRead`
(`packages/metadata-core/src/meta-write-org-scope.ts:184`). It returns
`undefined` unless `declaresOrgOverride(type)` holds.
- `getMetaItem` (`packages/metadata-protocol/src/protocol.ts`) reads
`request.organizationId` only through the gate (`:8123`). A gated-away
value resolves `findDraft(null)` (`:8161`) and `findOverlay(null)`
(`:8227`-`:8228`), which are env-level.
- `getMetaItemLayered` gates at `:8633`. `if (orgId)` at `:8728` skips
the org overlay read entirely, and only `findOverlay(null)` runs.
- `getMetaItemCached` delegates to `getMetaItem` (`:12199`), so the same
drop applies. The ETag folds the *supplied* value (`:12294`), so the
kept ETag sentence stays true.
The runtime still behaves as the ruling describes, so no stop was
needed.
## Verification
All at head `3388f2920` (branch merged with `origin/main` `369bcbed`),
unless noted. Every heavy run went through
`scripts/pm/os-verify-lock.sh`, and each result is the `VERDICT
command-exit` line.
- `pnpm --filter @objectstack/spec build`, then `check:generated`:
before `--fix`, exactly 1 of 15 artefacts was stale
(`content/docs/references/**`). `--fix` regenerated that one, and the
three `organizationId` rows in `protocol.mdx` are the only lines that
moved. After the merge: "All 15 generated artifacts are up to date",
exit 0.
- `pnpm --filter @objectstack/spec test`: 540 files, 15820 passed and 2
todo, exit 0. `src/api/protocol.test.ts` alone: 178 passed.
- `pnpm --filter @objectstack/spec typecheck` (tsc, scripts, and the
test layer): exit 0.
- Compiled `dist` read back: the three new descriptions are present,
"allowOrgOverride" and "registry" each count 0 in them, and the ETag
sentence occurs verbatim once.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 101 commands, the same list before
and after the merge. `--ran` reconciliation reads "101 derived, 100 run,
1 NOT-MEASURED, 0 UNRUN". All 100 that ran exited 0.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads` (exit 3, PREREQUISITE
NOT MET). It needs every publishable package built: 33 still had no
`dist/` after the closure build below, and CI's `Build Core` runs it. As
a declared narrowing, I loaded every `require` entry of
`@objectstack/spec`, the only package this diff rebuilds, under CJS: 23
of 23 loaded. The gate's own `--list` names 18 spec entries, all inside
those 23. Every other package's dist is unaffected by string edits in
`packages/spec/src`.
- For five gates the first run refused with PREREQUISITE NOT MET
(unbuilt `lint` / `formula` / `client-react` / `objectql`):
`check:skill-examples`, `check:doc-formula-expressions`,
`check:doc-security-posture`, `check:docs-transcript-drift` and
`check:lean-entry-closure`. After a turbo build of that 34-task closure
they ran green. `check-plugin-teardown-shape --self-test` first refused
on the shallow clone; it went green after a depth-1 fetch of its pinned
fixture commit.
- `check:dts-closure` and `check:sourcemap-no-sources-content` swept 1
built package, `@objectstack/spec`, which is the one this diff touches.
- ESLint (narrowed, a measurement rather than a skip): `eslint
--no-inline-config --format json` over the three touched paths returns 3
entries. `protocol.zod.ts` has 0 errors and 0 warnings. The `.md` and
`.mdx` answer "no matching configuration", which means they are outside
the population defined by `eslint.config.mjs`'s `files` globs. The
config enables no type-aware linting (no `parserOptions.project`, zero
`projectService`), so this diff cannot move a verdict on any untouched
file. The repo-wide `pnpm lint` is left to CI.
- No pin test is added. These strings are prose that no consumer parses,
and pinning their wording would only freeze the wording.
## Acceptance notes
- `packages/spec/src/api/protocol.test.ts:1599`-`1602`, a test comment,
still says the implementation "accepts and HONOURS `organizationId` on
all four read verbs: it selects the org partition … it decides which
tenant's row is served". That is the same overstatement, in an
unpublished test comment. It is outside this card's claimed file
surface, so I left it. Carrier: none.
- Draft PR #19637 also regenerates
`content/docs/references/api/protocol.mdx`. Whichever PR lands second
regenerates that file; the file is routed to the `os-regen` merge
driver.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01CiCTczDo7tGhafXjf61dUJ)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 836aad2 commit 2dfe070
3 files changed
Lines changed: 37 additions & 16 deletions
File tree
- .changeset
- content/docs/references/api
- packages/spec/src/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
1219 | | - | |
| 1219 | + | |
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
| |||
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
1273 | | - | |
| 1273 | + | |
1274 | 1274 | | |
1275 | 1275 | | |
1276 | 1276 | | |
| |||
1319 | 1319 | | |
1320 | 1320 | | |
1321 | 1321 | | |
1322 | | - | |
| 1322 | + | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
444 | 446 | | |
445 | 447 | | |
446 | 448 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
451 | 456 | | |
452 | 457 | | |
453 | 458 | | |
| |||
1818 | 1823 | | |
1819 | 1824 | | |
1820 | 1825 | | |
1821 | | - | |
1822 | | - | |
1823 | | - | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1824 | 1830 | | |
1825 | | - | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
1826 | 1834 | | |
1827 | 1835 | | |
1828 | 1836 | | |
| |||
0 commit comments