Skip to content

docs(qa): cover the #33761 ledger gaps and name --reporter=tree for per-file pin scoring - #34068

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-i4rbyv
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-i4rbyv

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #33969

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

Ledger row / scope item Item Added / changed / already-covered reading
Row 11 (#33250 writeRequiresMasterRead opt-in) and row 16 (security-plugin-cbp-relation.ts had no exact citer) access-security.cbp-master-read-opt-in Added. Reader writes land under the opt-in; blind/hidden: insert 403 asking read, by-id update/delete 404; looker 403 object gate; CONTROL detail still asks edit, explain agrees; save door 422 off a detail and beside ownerMayEdit. Cites security-plugin-cbp-relation.ts#resolveCbpRelation. parent-and-organization-write-guards covers only the unamended edit question.
Row 12 (#33238 renamedFrom holder carry) access-security.position-renamed-holder-carry Added. install-local v1→v2 carries holders with no restart, CONTROL holder untouched, repeat idempotent, publish door carries, another package's holders never claimed. Active-save is knownGaps[0] (#33788, open).
Row 15 (#33181 pending single sign-on people) identity-auth.pending-sso-users-managed Added. add/import-sso-users, password doors 409, ban/unban without the admin plugin, managed 409s pointing to Setup → Users, non-admin 403, unmanaged 409. Wired host and the cloud provider are knownGaps (pins only).
Row 15 (#33512 cross-object analytics where) dashboards.cross-object-where-engine-path Added. Engine path: dotted equals nested and /data, orphan excluded under $ne, $or+$null, empty match, >1000 parents 400 not truncated, two hops/$not/$field 400, related-field 403 value-independent, cbp scope, /analytics/sql refuses. Native $ne parity is knownGaps[0] (#33792, open).
Row 101 (email immutability) identity-auth.self-service-profile-password rev 3→4 Changed. New acceptance[6]: the disabled field and update-user {email} → 400 EMAIL_CAN_NOT_BE_UPDATED, address unchanged; steps[6] sends the server probe.
Rows 196 and 209 (#33649 preferences in the emitting organization) integration-system.notification-preference-suppression rev 5→6 Changed. New acceptance[5]: a row under another organization neither mutes nor overrides the emitting organization's opt-out. The fix shipped with 18.5.0 (2673f59, #33779; its changeset was not consumed by the version commit, #33903), so the clause says an 18.4.x reading is not a FAIL and scores 18.5.0 on as written.
Seat scope (2): permission-set-address-in-execution-context knownGaps[0] access-security.permission-set-address-in-execution-context rev 4→5 Gap closed. Re-read: permissionSetHoldersMeet lets two packages with different namespaces each hold a set name, so the second holder is now authored in the fixture. The bare door answers 409 with candidates, ?package= addresses each holder, and a stale or package-less row is refused. Pinned by permission-set-package-doors, grant-permission-set-package and protocol-permission-set-name-registry-reading (all green).
Seat scope (1): clauses scored on "the summary line per pin file" 58 items (list below) Changed. Each verify (and the token door's pin step) names --reporter=tree; each item +1 revision with a history row. Count at origin/main 159757a: 58 items, under the 60 stop line. Left out: single-file clauses (catalog-activation [5], cli.deploy-runtime-dry-run-json [4], records-forms.list-link-filter-refused-whole [3], namespace-co-owner-name-refusal [2]) and CLI summary lines (cli.doctor-*, cli.qa-suite-execution).

The 58 items: access-security (anonymous-floor-v18-doors, walled-environment-metadata-operator-only, meta-authoring-trail-and-audience-gates, security-catalog-activation-and-clone-doors, security-catalog-one-holder-and-boot-report, grant-table-write-contract, parent-and-organization-write-guards, deployment-tables-platform-only, share-link-combined-gates, org-admin-assignment-boundary); ai (mcp-coded-refusals-and-runtime-exposure, mcp-dataset-tools, mcp-read-file-pdf-word-extraction, mcp-tool-call-interceptor); api-backend (second-object-exposure-and-internal-fields, data-request-shape-and-query-arity, meta-read-doors-v18, error-sentences-and-unique-violation-wire-code); approvals (email-action-token-door, request-page-reply-and-reader-visibility, act-door-and-admin-rescue-slate); attachments-storage (upload-limits-scope-and-ownership, chunked-upload-integrity); automation (flow-registration-verdict-on-read, flow-authoring-refusals-v18, flow-run-semantics-v18, inbound-hook-timestamped-signature, scheduled-work-opt-in); cli (migrate-meta-write-stored-and-all, organization-ownership-ceremony, meta-package-flags-and-explain, validate-v18-authoring-verdicts, verify-derived-proof-families, package-upgrade-plan-override-advice); dashboards (analytics-exposure-gate-and-measure-aggregate); i18n (flow-copy-translation-and-host-override); identity-auth (auth-gate-held-session-raw-host-families, api-key-expiry-lifecycle, cookie-session-renewal-in-process, default-organization-boot-invariant, import-invitation-and-sso-domain-answers); integration-system (inbound-mailbox-association, notification-org-and-redeliver-eligibility, oracle-federated-read-write, mssql-federated-read-write); platform-core (v18-boot-refusals, protocol-18-handshake-and-stored-replay, settings-organization-isolation-and-platform-rung, serve-composition-v18); records-forms (write-time-option-and-element-shape-judgement, write-answer-advisories-rollback-and-tree-delete, comment-reactions-and-edit-stamps, v18-semantic-defaults, action-preflight-panel); studio-authoring (meta-save-preconditions-and-draft-rows, multi-package-item-rows, save-door-runs-authoring-rules, page-api-binding-reread-after-action).

Edits are literal text spans: every untouched item stays byte-identical, and each edited file parses to exactly the intended value.

Tests

No test changed. The new items' pins were run with --reporter=tree at this branch, all green: plugin-security (3 files, 165 tests), spec (1, 26), lint (1, 40), cloud-connection (1, 6), runtime (1, 10), plugin-auth (5, 186), service-analytics (6 files), rest (3, 34), service-messaging (1, 14). The permission-set pins: runtime permission-set-package-doors (40), permission-set-address + grant-permission-set-package (49), protocol-permission-set-name-registry-reading (18).

Acceptance notes

Verification

  • pnpm check:platform-checklist: OK (433 items), re-run on the patch-round head 3b39e185.
  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran: 16 derived, 16 run, 0 NOT-MEASURED, all exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmRVa2kpALN3irmcUCv

access-security.permission-set-address-in-execution-context rev 5: two
packages of two namespaces each install a set of one name since the
permission-set narrowing, so the knownGap is closed and the item drives
the bare-name refusals, the per-holder switch and a real second holder's
row live.

Claude-Session: https://claude.ai/code/session_01ADHkmRVa2kpALN3irmcUCv
Co-authored-by: Claude <noreply@anthropic.com>
…t where

Four new checklist items for surfaces no item drove: the controlled_by_parent
writeRequiresMasterRead opt-in, the renamedFrom position holder carry, cloud-
managed pending single-sign-on people, and the analytics one-hop cross-object
where on the engine path. Two items gain a clause: email immutability scored at
the server, and notification preferences read in the emitting organization.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRVa2kpALN3irmcUCv
Fifty-eight items score their pins by "the summary line per pin file", but a
runner's non-TTY shell gets only the run's totals from vitest's default
reporter. Each such verify (and the token door's pin step) now names
--reporter=tree, which prints one line per file. Each item's revision moves by
one with a history row; no clause or threshold changed.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRVa2kpALN3irmcUCv
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z

席位核对 · ACCEPT · head 3b39e185b5 · 2026-11-15T18:08Z

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 18:08
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 1c48f6f Nov 15, 2026
51 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-i4rbyv branch November 15, 2026 21:44
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
… default defineStack door (objectstack-ai#34020)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9CZHtkC74Ydb9at95QTnivt)_
Fixes objectstack-ai#33940
Clause-②: yes
Metadata-protocol: none

## 维护者速读

- 改了什么:默认(strict)`defineStack` 解析时,如果作者在 `controlled_by_parent` 对象的
`master_detail` 上没写 `required`,spec 会在解析后的字段上悄悄记一笔“作者省略了”;`os lint` 的
`relationship/master-detail-required` 读这笔记录,在默认写法下也报 error。
- 为什么改:裁决 A(objectstack-ai#30905,记录 6687830530)放行可选主字段,同时承诺 `os lint` 对省略写法报错;但默认
strict 解析先把省略填成 false,lint 永远看不到,迁移说明那句话在最常见的写法下是假的。
- 风险与回滚:解析结果不变(仍是 `required: false`,可选主字段),栈照常加载,`os validate` / `os
build` 不变;只是 `os lint` 在这一种写法上多报一条 error。回滚即 revert 本 PR。
-
先看:`packages/spec/src/data/master-detail-required-omission.ts`(记录与读取),`packages/spec/src/stack.zod.ts`
中 `recordMasterDetailRequiredOmissions`
的调用,`packages/lint/src/data-model-rules.ts` 中 `optionalMaster` 那一行。
- 两分钟验证:在示例应用副本的默认 `defineStack({ … })` 里加一个 cbp 对象,唯一的 master_detail 不写
required,跑 `os lint --json`:应 exit 1,报
relationship/master-detail-required 在 `.required`;改成 `required: false`
后应 exit 0。
- 需要你做的:无,席位落地。

## What changes

- **`@objectstack/spec`** — new module
`src/data/master-detail-required-omission.ts`. After a strict
`defineStack` parse succeeds,
`recordMasterDetailRequiredOmissions(normalized.objects, data.objects)`
stamps a non-enumerable, non-writable
`Symbol.for('objectstack.field.masterDetailRequiredOmitted')` on each
parsed `master_detail` field of a `controlled_by_parent` object whose
authored definition writes no `required`. The one published reader is
`masterDetailRequiredOmitted(field)` (`@objectstack/spec/data`); the
stamp is internal (not re-exported), mirroring `stack-provenance.ts`.
The parsed value is untouched (`required: false`), so the ruled reading
(option A: the omission is admitted as the optional master) holds at
every runtime reader, and nothing refuses the stack.
- **`@objectstack/lint`** — `cbpMasterReferenceFinding` (R2) treats a
sole `master_detail` as the optional master only when `required ===
false` AND the field does not carry the record. On the default door the
omitted spelling now gets the same finding, path and fix it already got
on `{ strict: false }` and on a raw config.
- **Why on the field, not the stack:** `loadConfig`
(`packages/cli/src/utils/config.ts`) spreads the default export into a
new object, which drops a stack-level symbol (that is why it reads
`stackConversionsOf` before the spread). The `objects` array and each
field reach `lintDataModel` by reference, so a field-level record needs
no `packages/cli` change and no second load of the user's module.
Measured: `composeStacks` (error / override / merge) keeps the record on
the composed field too.
- Regenerated: `packages/spec/api-surface/data.json`,
`packages/spec/export-origins/data.json` (one added export each).
- **Fix of text this change made false:**
`docs/qa/platform-checklist/areas/cli.json`, item
`cli.validate-v18-authoring-verdicts`. Revision 4 (PR objectstack-ai#33929, merged
into main while this card was in flight) moved the item's `os lint` arm
to `{ strict: false }` and said the default strict door gives `os lint`
exit 0 with no finding. That is no longer true, so revision 6 (stacked
on main's revision 5, PR objectstack-ai#34068, which only adds `--reporter=tree` to
acceptance[0].verify) moves steps[2] and acceptance[3] back to the
default door, states that the default door reports only
`relationship/master-detail-required` (not
`security-controlled-by-parent-no-relation`, because the parsed field is
the optional master the runtime derives access from) and keeps `{
strict: false }` as the second door. No other clause changed.
- Docblocks touched: `data-model-rules.ts` (R2 header),
`controlled-by-parent-master.ts` (module header). The semantic entry
`cbp-optional-master-admitted` is unchanged: its sentence "`os lint`
reports the omission at `error`" is now true on the default door, which
was the seat's call (fix the reach, not the prose).

## Why

The maintainer ruling on objectstack-ai#30905 (record 6687830530), option 「A
放行为可选主字段(推荐)」, keeps the omitted `required` readable as the optional
master at the parse and pairs it with the lint: "`os lint` errors on the
omitted spelling". The published entry repeats that promise. On the
ordinary authoring door it did not hold (measured on objectstack-ai#33842 / PR
objectstack-ai#33929).

## Tests

New, no existing assertion edited (no forced test edits):

- `packages/spec/src/data/master-detail-required-omission.test.ts` (7
cases): strict `defineStack` records an omitted `required` on the sole
master and on a second `master_detail` beside a required one; nothing
for explicit `false` / `true`, for another sharing model, for a lookup,
for `{ strict: false }`, or for a bare `ObjectSchema.safeParse`; the
record is invisible to `Object.keys`, `JSON.stringify` and
`FieldSchema`, and a copy drops it.
- `packages/lint/src/data-model-rules.master-detail-required.test.ts`,
new top-level `describe` (4 cases) over stacks a real `defineStack`
built: omitted → one error at `.required` with both spellings; CONTROLS
explicit `false` and `true` → clean; `{ strict: false }` → the same
finding as before; a copied field → clean (the pre-record reading).

Ablations (each committed first, mutated through
`scripts/ablation-replace.mjs`, rebuilt, `ablation-dist-preflight` hit,
then restored with blob == HEAD and rebuilt with the marker absent from
dist):

- A1, lint stops reading the record: lint unit `the sole master_detail
without required` turns red (1 failed / 33 passed); the CLI on the
default door reads `os lint` exit 0, passed true, 0 R2 findings (the
defect).
- A2, `defineStack` stops stamping: spec unit 3 failed / 4 passed (src),
lint unit 1 failed / 33 passed (spec dist), CLI default door `os lint`
exit 0 with 0 R2 findings.

## Acceptance notes

- `Clause-②: yes` differs from the claim's expected `no`: the diff adds
one public export, `masterDetailRequiredOmitted` on
`@objectstack/spec/data`, and the spec lane charter counts any widening
of the public surface as Clause ②. No parse accept set moves, so
`Metadata-protocol: none` and patch changesets.
- On the default door only R2 fires;
`security-controlled-by-parent-no-relation` does not, because the stack
the runtime loads really does derive the optional master from the parsed
`false`. On `{ strict: false }` both fire, as before.
- Not reached by design: the save door and a bare
`ObjectSchema.safeParse` record nothing (neither runs `os lint`);
`ObjectSchema.create()` still forces an omitted `required` to `true`.
- The record lives in `packages/spec` as a declared producer record
beside the provenance mark, not as business logic: it states what the
author wrote and nothing reads it at runtime.
- `pnpm --filter @objectstack/spec check:generated` exits 1 at Node's
default heap in this container: its `check:test-typecheck` leg's `tsc`
dies without diagnostics. At `NODE_OPTIONS=--max-old-space-size=6144`
(the heap `lint.yml` sets for the ledger re-measure) it exits 0 with all
14 artifacts current, and `check:test-typecheck` alone reads OK (52
files / 240 errors / 131 pinned signatures held).

## Verification

Verification head: `7e6f3db1` (main `ea6de745` merged in via
`scripts/pm/os-regen-merge.sh`). That merge had one conflict,
`docs/qa/platform-checklist/areas/cli.json` item
`cli.validate-v18-authoring-verdicts`: PR objectstack-ai#34068 had meanwhile taken
revision 5 on the same item. Resolution: main's revision 5 row and its
acceptance[0] edit are kept as written; this PR's row is renumbered to
revision 6 and the item's `revision` set to 6. Apart from those two
numbers the PR's diff is byte-identical to the one verified at
`6e1439cc` (per-file hunks of `git diff e71ecc1 d468bb8` and `git diff
ea6de74 7e6f3db` match in 10 of 11 files; cli.json differs only in
`"revision": 5` → `6` on the item and the row). Re-read at `7e6f3db1`
after `pnpm install --frozen-lockfile`, `rm -rf
packages/runtime/.objectstack` and a full `./packages/**` rebuild under
the verify lock: `check:generated` exit 0 at heap 6144 (all 14 artifacts
current), spec test 844 files / 26973 tests passed, lint test 212 files
/ 9030 tests passed, `check:platform-checklist` exit 0 (16 areas, 433
items). The readings below were verified at `6e1439cc` (main `b4ce310b`
merged in via `scripts/pm/os-regen-merge.sh`; no conflict, the regen
chain found nothing to rewrite). Re-read at `6e1439cc` after `pnpm
install --frozen-lockfile`, `rm -rf packages/runtime/.objectstack` and a
full `./packages/**` rebuild under the verify lock: `check:generated`
exit 0 (all 14 artifacts current), spec test 843 files / 26968 tests
passed, lint test 212 files / 9030 tests passed, the four end-to-end
readings below unchanged, and the 96 derived gates all exit 0 at heap
6144 (`--ran`: 96 run, 0 NOT-MEASURED). CI on `6e1439cc`: every
check-run completed, all required contexts success. The readings below
were first taken at `eb7616fe` (main `0ac112fc` merged in), with the
same results.

<details>
<summary>End to end: the objectstack-ai#33929 reproduction and its controls (scratch
copy of examples/app-todo, CLI from the tree)</summary>

```
=== sole master_detail, required omitted, default strict defineStack
os lint --json exit 1   passed false
   error relationship/master-detail-required at objects[2].fields.hdr.required
os validate --json exit 0
os build exit 0
=== required: false, default door
os lint --json exit 0   passed true
os validate --json exit 0
os build exit 0
=== required: true, default door
os lint --json exit 0   passed true
os validate --json exit 0
os build exit 0
=== required omitted, defineStack(..., { strict: false })
os lint --json exit 1   passed false
   error relationship/master-detail-required at objects[2].fields.hdr.required
   error security-controlled-by-parent-no-relation at objects[2].sharingModel
os validate --json exit 0
os build exit 0
```

Base reading (objectstack-ai#33929, at 895783a): the first case gave `os lint --json`
exit 0 with no finding. The shipped examples app-crm and app-todo lint
with no R2 finding (their cbp masters are built by
`ObjectSchema.create()`, which writes `required: true`); app-showcase's
config could not load here (its connector-slack dist is not in the CLI
closure), and its two cbp masters are `ObjectSchema.create()` with
`required: true` in source.
</details>

<details>
<summary>Package tests and typecheck (under the verify lock)</summary>

```
pnpm --filter @objectstack/spec test        Test Files 843 passed (843)   Tests 26968 passed | 1 todo
pnpm --filter @objectstack/lint test        Test Files 212 passed (212)   Tests 9030 passed
pnpm --filter @objectstack/spec typecheck   VERDICT command-exit 0
pnpm --filter @objectstack/lint typecheck   VERDICT command-exit 0
pnpm --filter @objectstack/cli exec vitest run --project unit   Test Files 422 passed (422)   Tests 6002 passed
```

The cli integration layer is declared to CI (no spawn entry or
integration file touched).
</details>

<details>
<summary>Derived gates (dispatch-gates --commands at eb7616f, re-run at
6e1439c)</summary>

96 derived families, 96 run, reconciled with `--ran`: "96 run, 0
NOT-MEASURED (a DERIVED zero)". 95 exited 0 at the default heap;
`check:generated` exited 1 there (the out-of-memory `tsc` above) and 0
at the CI heap of 6144, which is the line reconciled.
`check:platform-checklist` exit 0 (16 areas, 429 items).
`check:dev-prereqs` (local-only family): NOT MEASURED, 34 `ui/` packages
unbuilt in this container.
</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic
(the record is a producer stamp beside the provenance mark; nothing
reads it at runtime).
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` is CI's.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.

<!-- signed: domain:spec#2 · os-steve · session_01ADHkmSUpRcnYp68V8zPYaB
-->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checklist coverage: v18.5.0 sweep surfaces with no checklist item (writeRequiresMasterRead, renamedFrom holder carry, cross-object where, and others)

2 participants