Skip to content

feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit - #37371

Merged
os-zhuang merged 17 commits into
mainfrom
claude/project-thread-o3bcge
Nov 26, 2026
Merged

os-zhuang merged 17 commits into
mainfrom
claude/project-thread-o3bcge

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Alice · project thread

Fixes #36055

Draft. #37314 has merged (protocol 19, step19); this branch merged main and carries both halves: the 19 field-axis switch and the ADR-0087 conversion with ruling A's exclusions.

Maintainer quick read

  • From 19.0.0, View All (viewAllRecords) and Modify All (modifyAllRecords) widen records only. They cast no field vote. viewAllFields is the only "every field" channel: read only, never edit, and a set's own readable: false row beats it.
  • Error direction: an unconverted set sees fewer fields, never more. No hidden field opens.
  • Stored permission sets (Studio-saved) are read with the 19 meaning, never rewritten (ruling A, comment 7177446075). Source sets get viewAllFields: true from os migrate meta --from 18 --write. Studio has no viewAllFields control today, so a stored set is fixed by adding viewAllFields: true through the metadata API; a review list of affected stored sets is follow-up os migrate meta --stored: list the stored permission sets whose View All / Modify All lost their field reach in 19 (follow-up of #36055 ruling A) #37375.
  • Beyond the card's premise: Modify All's cross-set EDIT re-open is lost too, because viewAllFields votes read only. That includes the built-in admin beside an app set's edit lock (it still reads every field). This is the ruled field-axis split (ruling 6912661484); the D3 entry names it.
  • Beside Modify All, a set's own field rows now bind on both halves: its own readable: false row hides that field from its holders even with viewAllFields: true, and its own field row without editable: true no longer edits it. The D3 entry's one-step check and the changeset state both, with the fix for each (delete the own hide row; write editable: true on the row).

What changes

  • @objectstack/core: superuserFieldVote is replaced by viewAllFieldsReadVote(sets, object, field). buildEffectiveFieldPermissions asks it. holdsSuperuserBypass is unchanged and answers the record bypass only.
  • @objectstack/plugin-security: getFieldPermissions asks the same vote. Explain drops the "superseded by the Modify All Data field vote" branch (and ConditionedFieldEntry.supersededBy): a row-conditioned lock binds per row for every caller.
  • @objectstack/lint: security-superuser-field-mask-inert is retired (constant, catalog text, explanation, export). security-cross-set-field-reopen reports only a hidden field another set's viewAllFields re-opens, in all 11 locales. The controlled-by-parent master-reference rule and the roll-up source-visibility rules no longer skip a mask beside Modify All.
  • @objectstack/scenarios: persona-grant scoring no longer treats Modify All as overriding a field lock.
  • @objectstack/spec:
    • viewAllRecords / modifyAllRecords / viewAllFields descriptions state the new meaning (generated reference docs regenerated). The liveness ledger anchors viewAllFields at #viewAllFieldsReadVote.
    • New ADR-0087 D2 conversion permission-view-all-fields-beside-record-bypass (packages/spec/src/conversions/entries/19/): writes viewAllFields: true on every objects entry, '*' included, that has viewAllRecords: true or modifyAllRecords: true and no viewAllFields (an authored viewAllFields: false is left alone). A default flip: retiredFromLoadPath: true, retiredAfter: '18.6.0', fixture with 3 notices. Registered in a new MAJOR_19_CONVERSIONS (the sorted { conversion, order } shape of major 18) as CONVERSIONS_BY_MAJOR[19]; step19.conversionIds derives from it.
    • New D3 semantic entry permission-view-all-modify-all-cast-no-field-vote (packages/spec/src/migrations/entries/semantic/): every behaviour change, ruling A's one-step operator check with both own-row cases beside Modify All (an own readable: false row keeps hiding its field after the bit is added; an own field row without editable: true loses the edit), the source and stored paths, and the error direction. It says where the conversion replays: the authoring funnel skips it (retired from the load path), and the artifact door and the stored-row seam refuse it by id. It judges the conversion's edits (conversionIds).
    • ADMIN_FULL_ACCESS_CAPABILITIES (identity/eval-user.zod.ts): the comment on its '*' viewAllFields: true states the 19 meaning (the bit, not the record bits, keeps the platform administrator reading every field; it votes read, never edit). Comment only.
    • Ruling A, stored rows: applyConversionsToStoredItem refuses the id by name (module-local STORED_ROWS_NOT_REWRITTEN, merged into any caller's excludeConversionIds), so the database loader, the ObjectQL stored-row read, the metadata-protocol read and os migrate meta --stored never rewrite a stored set.
  • @objectstack/metadata-core: the artifact-ingestion door refuses the id (DEFAULT_FLIPS_NOT_REPLAYED_HERE, docblock extended with its reason).
  • Showcase: showcase_auditor (four View All entries) and ops' showcase_announcement Modify All entry carry viewAllFields: true, migrated by hand; the access-matrix snapshot records the five grants (the build's ADR-0090 D6 drift check named them).
  • Docs: field-level-security, authorization, permissions-matrix and the showcase security tour describe the 19 meaning.
  • Changeset: names the conversion id (ADR-0087 marker), the one-step check with both own-row cases beside Modify All, the stored-set reading and the D3 entry; @objectstack/metadata-core added as minor.

Where the 19 upgrade guidance lives

  • D3 entry: packages/spec/src/migrations/entries/semantic/19.permission-view-all-modify-all-cast-no-field-vote.ts.
  • Generated guide: pnpm --filter @objectstack/spec gen:upgrade-guide writes content/docs/protocol-upgrade/19.md (gitignored, built by the docs site, served at /docs/protocol-upgrade/19): the conversion row and the D3 entry, both saying stored sets are read with the 19 meaning and the fix is viewAllFields: true.
  • Changeset: .changeset/36055-view-all-stops-voting-on-fields.md (ships as CHANGELOG.md).

Why

Card #36055, step 3 of the field-axis split (#34365, ruling of record 6912661484): View All / Modify All widen records, viewAllFields reads fields.

Tests

  • packages/spec/src/conversions/entries/19/permission-view-all-fields-beside-record-bypass.test.ts (10 tests): registration and step-19 wiring, the three rewrite sites and their notices, entries left alone, field rows untouched, idempotence, the authoring funnel never replays it, the stored seam refuses it for both row spellings and a caller cannot opt back in, a firing control, and other retired entries still replay over a stored permission row.
  • packages/metadata-core/src/artifact-forward-conversion.test.ts: a new block, six tests: refused inside the floor window, after the strict parse, inside the per-entry window and the major-step half; a shut window; a firing control.
  • packages/spec/src/shared/retired-key-removal-version.pin.test.ts: a semantic row kind joins a default flip to the D3 entry an author meets (a default flip has no tombstone or refusal); it reads the entry's reason and acceptanceCriteria, which name protocol 19 and --from 18.

Acceptance notes

  • Acceptance measurement (one-shot script, not committed): pre-PR sources under the v18 merge vs the same sources converted, under the v19 merge, every single set and every pair. Built-in default sets alone: 9 sets, 45 combinations, 507 field cells, 0 conversion notices (their '*' entries already carry the bit), read 507/507 and edit 507/507 identical. Showcase + default sets: 18 sets, 171 combinations, 1314 cells, 5 conversion notices; read 1314/1314 identical; edit 1302/1314, the 12 differences all ruled (admin_full_access / organization_admin beside showcase_contributor / showcase_client_liaison no longer edit showcase_project.budget / spent / budget_remaining, which those sets lock). CRM + default sets: 11 sets, 66 combinations, 663 cells, all identical. No cell opened a field or an edit. The conversion of the pre-PR showcase source equals the branch's hand migration on all 9 sets. Control: an unconverted View All set beside a set hiding a field reads it under v18 (readable: true) and not under v19 (readable: false).
  • Other seams checked: the flow-only exclusions (CONVERSIONS_NOT_REPLAYED_AT_REHYDRATION, FLOW_FALLBACK_VERDICT_NOT_REPLAYED) never see a permission set; every stored-row caller (database loader, ObjectQL, metadata-protocol, os migrate meta --stored, translation and datasource rows) goes through applyConversionsToStoredItem; the only other includeRetired caller is the artifact door. No seam outside the two edited ones replays this id.
  • Mechanical consequences outside the card's listed surface, all test or fixture data: the major-18 fixture permission-modify-all-allow-delete-false-to-true carries viewAllFields: true beside its Modify All entries so the fixture table stays disjoint; scripts/conversions-major18-merge.test.ts reads major 18's slice of ALL_CONVERSIONS instead of its tail; the retired-key pin row above; the showcase access-matrix snapshot.
  • Ablation (one-shot): removing the id from STORED_ROWS_NOT_REWRITTEN turns 3 stored-seam tests red; removing it from DEFAULT_FLIPS_NOT_REPLAYED_HERE turns 4 door tests red; both restored byte-identical to HEAD (blob hashes matched, git diff HEAD empty). The first stored-seam attempt was refused by the replacement tool (its marker already occurred in the file) and changed nothing; it was rerun with a distinct marker.
  • The major-step leg of the door block expects authored-current while the permission flip is step 19's only retired entry: the refusal leaves nothing for that half to open.

Verification

Head 71a5990 is a text-only round on bad558d (the Contract review's S1, N1 and N2: the D3 entry, the changeset and one code comment). Nothing that runs changed, so the readings at bad558d below stand; this round's local runs are in the first block.

Fix round at 71a5990
  • @objectstack/spec build (lock VERDICT command-exit 0), then check:generated --fix: exit 0, all 14 generated artifacts up to date, nothing rewritten.
  • gen:upgrade-guide exit 0 (content/docs/protocol-upgrade/19.md carries the new criteria; gitignored), gen:spec-changes exit 0 (gitignored); no tracked file changed.
  • @objectstack/spec vitest run src/migrations/ scripts/upgrade-guide-docs.test.ts scripts/upgrade-guide-surface-span.test.ts src/shared/retired-key-removal-version.pin.test.ts src/identity/platform-admin-capabilities.test.ts: 9 files / 305 tests green (lock VERDICT command-exit 0).
  • Gates for the three touched files, exit 0: check-adr-0087-registration --base origin/main, check-changeset-no-major, check-empty-changeset, check-closing-keyword-parity, check-issue-citations, check-drift-comment, check:changeset-fixed, check:doc-authoring, check:keyed-text-bounds, check:closed-ceremony-text, check:corpus-claim-drift, check:role-word, check:nul-bytes, check:spec-docblock-symbol-anchors, check:adr-anchors, check:issue-citations, check:upgrade-guide, check:spec-changes, check:liveness. Exit 1, expected and unchanged: check:adr-symbol-anchors, the one ADR-0066:146 finding below. The other derived families were not rerun this round (declared narrowing); CI runs the full set.

Local on bad558d (the affected tests, the derived gate families and the dogfood battery; the rest is cited from CI on the same head):

Tests
  • @objectstack/spec vitest run --project local: 901 files, 28514 passed and 1 failed before the retired-key pin row (permission-view-all-fields-beside-record-bypass unjoined); after the row, src/conversions, src/migrations and the pin: 29 files / 1072 tests green; scripts/conversions-major18-merge.test.ts green.
  • @objectstack/metadata-core test: 27 files / 1070 tests green.
  • @objectstack/cli vitest run --project unit migrate: 44 files / 449 tests green (the integration tier is CI's).
  • After the merge with main: @objectstack/core src/security 75 files / 1493 tests green; @objectstack/lint 236 files / 9658 tests green. @objectstack/plugin-security and @objectstack/scenarios are cited from CI (Test Core success).
  • typecheck: @objectstack/spec and @objectstack/metadata-core green.
  • Ablation: stored seam 3 red, artifact door 4 red, each restored byte-identical (see Acceptance notes).
  • Dogfood battery (pnpm --filter @objectstack/dogfood test, lock VERDICT command-exit 0): 488 passed and 3 skipped of 491 files; 4137 passed and 68 skipped of 4205 tests.
Gates
  • node scripts/pm/dispatch-gates.mjs --commands: 132 families derived at bad558d; --ran reconciliation: 132 accounted, 128 run, 4 NOT MEASURED, 0 unrun.
  • 127 exit 0, among them check-adr-0087-registration (green now that the id is registered), @objectstack/spec check:generated, check:spec-changes, check:upgrade-guide, check:api-surface, check:authorable-surface, check:docs, check:liveness, check:type-check-debt, check:nul-bytes, check:platform-checklist, check:doc-security-posture.
  • Red, outside this surface (exit 1): check:adr-symbol-anchors on docs/adr/0066-unified-authorization-model.md:146, which anchors effective-object-permissions.ts#superuserFieldVote. docs/adr/** is out of this PR's surface; the anchor re-points to #viewAllFieldsReadVote in the ADR PR of weekly card ADR revisions, week of 2026-11-25: rolling checklist of ADR text out of step with main (one governed PR) #37245, which merges before this PR leaves draft.
  • NOT MEASURED (exit 3, prerequisite refused): check-plugin-teardown-shape --self-test (shallow clone), check:skill-examples, check:dual-build-cjs-loads, check:published-readme-exports (packages outside this diff not built here). CI runs them.
  • pnpm --filter @objectstack/spec gen:upgrade-guide writes content/docs/protocol-upgrade/19.md with the conversion row and the D3 entry.
  • CI at bad558d: 58 success, 10 skipped, 2 failure: Lint & Repo Gates and Lint · docs & code guards, whose log names the one check-adr-symbol-anchors finding above and nothing else. TypeScript Type Check, Test Core, Build Core success.

Clause-②: yes (narrowing)
Metadata-protocol: semantic

Skills-docs: follow-up #37374

ADR-0066 D2 ⑧ end-state note (text for the weekly ADR card #37245)

Note (19.0.0): View All and Modify All cast no field vote (#36055, step 3 of the field-axis split #34365, ruling of record 6912661484). A set's viewAllRecords or modifyAllRecords on an object widens which records it reaches and casts no vote in either field merge. The one object-wide field vote is viewAllFields: readable: true on every field of the object, never editable: true, and a set's own explicit readable: false row on a field beats its own bit (the note of 2026-11-15, now carried by viewAllFields alone). Both merges ask one function, packages/core/src/security/effective-object-permissions.ts#viewAllFieldsReadVote. Consequences: a set's own field rows bind beside its own View All or Modify All; another set's View All or Modify All re-opens no hidden or locked field; nothing re-opens a field edit lock across sets (the built-in admin sets read every field through their '*' viewAllFields and no longer edit a field another held set locks). The ADR-0087 conversion permission-view-all-fields-beside-record-bypass adds viewAllFields: true beside the bits in source; it is a default flip, refused by id at the artifact door and at stored-row reads, so stored sets take this meaning on upgrade (ruling A on #36055). security-superuser-field-mask-inert is retired; security-cross-set-field-reopen reports the viewAllFields re-open only.

Follow-ups to file

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 6 package(s): @objectstack/core, @objectstack/lint, @objectstack/metadata-core, @objectstack/plugin-security, @objectstack/scenarios, @objectstack/spec, touching 49 documentable anchor(s). ⚠️ 5 changed file(s) yielded no anchor (packages/core/src/security/index.ts, packages/lint/src/index.ts, packages/plugins/plugin-security/src/agent-ceiling-clamp.ts, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 87af66e5b6c75af7989ecbdc8820f1ca4a66596a.

⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 5 changed file(s) yielded no anchor (packages/core/src/security/index.ts, packages/lint/src/index.ts, packages/plugins/plugin-security/src/agent-ceiling-clamp.ts, …) — pages documenting those are invisible to this run
  • 15 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 186 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 87af66e5b6c75af7989ecbdc8820f1ca4a66596a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from dd2d9ee1d06c7975e3858e497e8540b8925f3c22 — the merge of head 25e18d4cdb16f02bba83aee105073c9a2e46e56f into base 87af66e5b6c75af7989ecbdc8820f1ca4a66596a, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin dd2d9ee1d06c7975e3858e497e8540b8925f3c22 && git checkout dd2d9ee1d06c7975e3858e497e8540b8925f3c22
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 87af66e5b6c75af7989ecbdc8820f1ca4a66596a 25e18d4cdb16f02bba83aee105073c9a2e46e56f && git checkout -B drift-repro 87af66e5b6c75af7989ecbdc8820f1ca4a66596a && git merge --no-ff 25e18d4cdb16f02bba83aee105073c9a2e46e56f

node scripts/docs-audit/affected-docs.mjs --json 87af66e5b6c75af7989ecbdc8820f1ca4a66596a

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 87af66e5b6c75af7989ecbdc8820f1ca4a66596a → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…iew All and Modify All

ADR-0087 D2 entry permission-view-all-fields-beside-record-bypass, a default
flip retired from the load path: replayed by os migrate meta --from 18 only.
The stored-row seam and the artifact door refuse it by id, so stored sets
take the 19 meaning. Step 19 graduates it and carries the semantic entry
permission-view-all-modify-all-cast-no-field-vote with the one-step check.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
…ll default flip by id

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
… access-matrix snapshot

The showcase build's ADR-0090 D6 drift check named five grants this branch
added by hand (showcase_auditor on four objects, showcase_ops on
showcase_announcement); the snapshot now records them for review.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: bad558d574b997d7bc271793693fab55085331a4
Local-runs: none
Scope: packages/spec/src/conversions/entries/18/permission-modify-all-allow-delete-false-to-true.ts, packages/spec/src/conversions/entries/19/permission-view-all-fields-beside-record-bypass.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/conversions/stored.ts, packages/spec/src/migrations/entries/semantic/19.permission-view-all-modify-all-cast-no-field-vote.ts, packages/spec/src/migrations/registry.ts.template, packages/spec/src/security/permission.zod.ts + packages/core/src/security/effective-object-permissions.ts, packages/core/src/security/index.ts, packages/plugins/plugin-security/src/permission-evaluator.ts, packages/plugins/plugin-security/src/explain-engine.ts, packages/plugins/plugin-security/src/agent-ceiling-clamp.ts, packages/plugins/plugin-security/src/objects/default-permission-sets.ts, packages/metadata-core/src/artifact-forward-conversion.ts, packages/lint/src/validate-security-posture.ts, packages/lint/src/validate-rollup-source-visibility.ts, packages/lint/src/index.ts, packages/qa/scenarios/src/score/scenario-tags.ts, packages/spec/liveness/permission.json
Security-touching: yes
Rule-change-verified: none

PR #37371 for card #36055. Inputs read: the card body and all 11 comments (rulings 7177220994 and 7177446075, claim 7177278985 with amendment 1, both dev reports), the PR body, the 54-path file list, the net diff against main, and the check-runs on this head. The remaining 35 paths (tests, docs, generated references, the showcase, the changeset) are the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

Check-runs on the head, read once: 2 failure, the rest success or skipped, none pending (the second Check Changeset run completed success at 15:13Z).

  • RED, and caused by this diff: Lint · docs & code guards (52 gates: 51 passed, 1 red) and its aggregate Lint & Repo Gates. The one red gate is check:adr-symbol-anchors, 1 finding: docs/adr/0066-unified-authorization-model.md:146 anchors effective-object-permissions.ts#superuserFieldVote, the symbol this PR removes. The job log names nothing else. See ③ E1.
  • Accept-set, ObjectPermissionSchema: unchanged. No key added or removed, no refinement changed; only JSDoc and .describe() text on viewAllRecords, modifyAllRecords, viewAllFields and the field-permission when. Right: the change is a meaning change, not a shape change, which is why it is a default flip and not a rename.
  • Accept-set, conversions: CONVERSIONS_BY_MAJOR[19] now exists with one entry; step19.conversionIds derives from it, as step 18's do. Right. check-adr-0087-registration, check:generated, check:upgrade-guide, check:spec-changes and the retired-after census ran in the green lanes.
  • Public surface removed: @objectstack/core superuserFieldVote (replaced by viewAllFieldsReadVote(sets, objectName, fieldName): boolean); @objectstack/plugin-security ConditionedFieldEntry.supersededBy; @objectstack/lint SECURITY_SUPERUSER_FIELD_MASK_INERT, the rule id, and the bit / reopened user-text params of security-cross-set-field-reopen. Each is right for a major. No reader of any of them is left in the tree outside tests and CHANGELOG.md history; TypeScript Type Check, Type Check UI and Test Core 10/10 are green.
  • Behaviour: both field merges (getFieldPermissions, buildEffectiveFieldPermissions) ask one function. Right, and it is the card's acceptance.

② Semver level

Clause-②: yes — the PR body and the changeset both carry Clause-②: yes (narrowing) and Metadata-protocol: semantic. The value starts with yes, which is what the card owes; the (narrowing) suffix is the dev's addition and the PR-body guards and Check Changeset pass on it.

The changeset matches what the diff publishes: major for @objectstack/core, @objectstack/plugin-security, @objectstack/lint and @objectstack/spec (removed exports and a changed meaning of two published keys), minor for @objectstack/metadata-core (the door refuses one more id). It names the conversion id in the ADR-0087 marker, the FROM → TO, the stored-set reading and the fix. @objectstack/cli and @objectstack/service-automation take a patch for test-comment edits only: not wrong, not needed.

③ Boundary flags

④ Design judgment

S1 (should-fix) — packages/spec/src/migrations/entries/semantic/19.permission-view-all-modify-all-cast-no-field-vote.ts. The card says the one change the conversion cannot keep is "Modify All plus the same set's own editable: false / readable: false row", and that the entry names it. The entry names half of it and contradicts itself on the other half:

  • acceptanceCriteria says, for an entry with either bit, "add viewAllFields: true; nothing else is needed for the read". That is false for a Modify All set with its own readable: false row: viewAllFieldsReadVote skips a field the set's own row hides (declaresOwnReadMask), so after the bit is added, by hand or by the conversion, that field is hidden from the set's holders, where Modify All read it before. reason item (3) says so; the criteria, the text an operator verifies against, say the opposite. The changeset carries the qualifying sentence; the entry's criteria do not.
  • The same-set EDIT lock is not named. reason item (2) and the criteria speak only of "a field another set locks". A Modify All set whose own field row omits editable: true (an omitted editable is false) edited that field until 19 and no longer does, with no second set involved. permission.zod.ts says it ("a field this set's own row hides or locks"); the entry does not.
    Fix: state both own-row cases in the criteria with their remedy (delete the own readable: false row, or write editable: true on the own row), and drop or qualify "nothing else is needed for the read". The error direction is fewer fields, so this is not a must-fix; it is the upgrade contract for a security change, so it is not a nit.

No must-fix.

Nits, no effect on correctness:

  • N1 (nit) — the same entry and the changeset say the authoring funnel refuses the conversion "by id". The funnel skips it through retiredFromLoadPath (applyConversions, includeRetired false); only the artifact door and the stored seam refuse by id. The conversion's own docblock has it right.
  • N2 (nit, outside the diff, read not reviewed) — packages/spec/src/identity/eval-user.zod.ts, the comment on ADMIN_FULL_ACCESS_CAPABILITIES still says viewAllFields "duplicates the vote the two record bits already cast on every field". False at this head. A follow-up, or the fix round for S1 carries it.

What holds, file by file, against the code at this head:

  • entries/19/permission-view-all-fields-beside-record-bypass.ts. The predicate (viewAllRecords === true || modifyAllRecords === true, viewAllFields === undefined, per objects entry, '*' included) writes the bit on exactly the entry that carried the old vote. holdsSuperuserBypass and holdsViewAllFields take the same lookup (objects[name] || objects['*']), so the new vote reaches the same objects the old one did, and no further: a set with a bypass '*' and an explicit bit-less entry for an object cast no vote on that object before and casts none after. I tried to make the conversion open a field and could not: for View All the old vote and the new vote are the same function of the same rows; for Modify All the new vote is a subset (read only, own readable: false rows excluded). Leaving an authored viewAllFields: false alone is right and makes the replay idempotent. retiredFromLoadPath: true with retiredAfter: '18.6.0' matches the type's rule for a stable label (@objectstack/spec is 18.6.0 in pre mode, not yet versioned) and the precedent flow-decision-mode-inclusive-explicit. The docblock's account of where it replays agrees with the three seams below.
  • registry.ts. MAJOR_19_CONVERSIONS takes major 18's { conversion, order } shape; the inApplicationOrder call carries the @__PURE__ annotation the table's own warning demands.
  • stored.ts. STORED_ROWS_NOT_REWRITTEN is spread first into excludeConversionIds and the caller's list is appended, so no caller can remove it; applyConversions reads the exclusion before the retirement window. Every stored-row caller in the tree goes through this function (database loader, ObjectQL plugin, metadata-protocol convertStoredItemDetailed, translation sync, datasource admin). This is ruling 7177446075, option A, as written.
  • Other replay seams, read to find one the PR missed: the only includeRetired: true callers besides stored.ts are the artifact door and the two flow seams, and the flow seams pass a flows-only stack that a permissions walk never touches. applyMetaMigrations (by id, source only) is the single place the entry runs; os migrate meta --stored is exclusive with --from and goes through the stored seam. None missed.
  • artifact-forward-conversion.ts. The id is in DEFAULT_FLIPS_NOT_REPLAYED_HERE, which is the exclusion for the undeclared and converted-forward verdicts and is seeded into closed (and skipped before either half can open it) in idsTheFloorPostdates. Refused in all four windows.
  • registry.ts.template. step19.conversionIds derives from CONVERSIONS_BY_MAJOR[19]; the rationale sentence is accurate.
  • permission.zod.ts. Each changed sentence agrees with viewAllFieldsReadVote: read vote only, never edit, own readable: false row beats the set's own bit, applied to the fields the merge names, View All and Modify All cast no vote. The when description's "a row-conditioned lock binds its holders" matches the explain change.
  • effective-object-permissions.ts, permission-evaluator.ts. One vote function, asked per field by both merges; holdsSuperuserBypass is untouched and has no field reader left. I read every other reader of the two record bits in packages/** and ui/** at this head for a second field-axis reading (a mask skipped for a super-user): none; they are row, transfer, recycle-bin and posture readers.
  • explain-engine.ts. Dropping the "superseded" branch is right: nothing can vote an edit over a conditioned lock any more.
  • validate-security-posture.ts, validate-rollup-source-visibility.ts. viewAllFieldsVoteOf mirrors the core vote for one set; the cross-set rule now fires only on readable: false re-opened by another set's viewAllFields, which is what the D3 entry tells the operator os validate reports. The two skips "beside the set's own Modify All" are removed, consistent with own rows binding.
  • default-permission-sets.ts, agent-ceiling-clamp.ts, scenario-tags.ts, liveness/permission.json: comments, evidence anchor and one scoring reader moved to the new reading; each agrees with the code.

Implemented-by: claude/project-thread-o3bcge
Reviewed-by: session_011y7As8wf3DSPRevwNnYLcM

VERDICT: PASS

…hange

The semantic entry and the changeset now say that, beside Modify All, a
set's own readable: false row hides its field even with viewAllFields,
and that a set's own field row without editable: true loses the edit,
with no second set involved. They also say the authoring funnel skips
the conversion (retired from the load path) while only the artifact door
and the stored-row seam refuse it by id. The ADMIN_FULL_ACCESS_CAPABILITIES
comment is restated for the 19 meaning. Text only.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
…dify All (#36055)

Review S1, same text class: the lost EDIT also covers a field the set's
own field row names without editable: true, not only another set's lock.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 71a5990508df8fab8b150a87dafb72aa85c772ad
Local-runs: none
Scope: packages/spec/src/conversions/entries/18/permission-modify-all-allow-delete-false-to-true.ts, packages/spec/src/conversions/entries/19/permission-view-all-fields-beside-record-bypass.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/conversions/stored.ts, packages/spec/src/identity/eval-user.zod.ts, packages/spec/src/migrations/entries/semantic/19.permission-view-all-modify-all-cast-no-field-vote.ts, packages/spec/src/migrations/registry.ts.template, packages/spec/src/security/permission.zod.ts + packages/core/src/security/effective-object-permissions.ts, packages/core/src/security/index.ts, packages/plugins/plugin-security/src/permission-evaluator.ts, packages/plugins/plugin-security/src/explain-engine.ts, packages/plugins/plugin-security/src/agent-ceiling-clamp.ts, packages/plugins/plugin-security/src/objects/default-permission-sets.ts, packages/metadata-core/src/artifact-forward-conversion.ts, packages/lint/src/validate-security-posture.ts, packages/lint/src/validate-rollup-source-visibility.ts, packages/lint/src/index.ts, packages/qa/scenarios/src/score/scenario-tags.ts, packages/spec/liveness/permission.json
Security-touching: yes
Rule-change-verified: none

Delta review of PR #37371 for card #36055, on top of record 7196108575 (PASS on bad558d574b997d7bc271793693fab55085331a4). Read: the diff bad558d574..71a5990508 (2 commits, 4 files, +29 −17), the four changed files whole at this head, the code they describe, the 55-path file list and the check-runs on this head. The file list grew by one path, packages/spec/src/identity/eval-user.zod.ts; it is a governed path, so hits is 8 paths, one more than the previous record. The other 35 paths stay the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

Nothing that runs changed since bad558d574. The delta is: prose in the changeset; a docblock bullet in the conversion entry; // comment lines in eval-user.zod.ts (the ADMIN_FULL_ACCESS_CAPABILITIES value is untouched); and the replacement, reason and acceptanceCriteria strings of the protocol-19 semantic entry (id, surface and conversionIds untouched). No accept-set, export, predicate or seam moved, so ①, ②, ③ and the file-by-file reading of 7196108575 stand for this head.

Check-runs on this head, read once after the last one completed: 74 runs, none pending. 59 success, 12 skipped, 1 cancelled, 2 failure.

  • The cancelled run is the first PR-body guards run, superseded; its re-run is success.
  • RED: Lint · docs & code guards (52 gates: 51 passed, 1 red, 0 did not run) and its aggregate Lint & Repo Gates (red on that one lane; every other lint lane success). The red gate is check:adr-symbol-anchors, 1 finding across 163 records: docs/adr/0066-unified-authorization-model.md:146 anchors packages/core/src/security/effective-object-permissions.ts#superuserFieldVote, the symbol this PR removes. The job log carries no other finding. Same red as on the previous head; see ③ E1.
  • Green on the new text: both Check Changeset runs, Test Core 10/10 and its aggregate, Test UI 16/16, all five type-check runs, Spec property liveness, Build Core, Build Docs, Check Documentation Links, Governed Surface Queue Guard.

② Semver level

Clause-②: yes — unchanged: the PR body and the changeset still carry Clause-②: yes (narrowing) and Metadata-protocol: semantic; the bump table of the changeset is untouched by the delta.

③ Boundary flags

④ Design judgment

S1: closed
N1: closed
N2: closed

No must-fix, no should-fix.

Each new sentence, held against the code at this head:

  • Own readable: false row beside Modify All (changeset FROM → TO and one-step check; entry replacement and acceptanceCriteria). "Beside View All that restores every read. Beside Modify All it does not restore a field the same set's own readable: false row hides." Right: viewAllFieldsReadVote skips a field for which declaresOwnReadMask is true, and before 19 only Modify All overrode an own row. The sentence "nothing else is needed for the read" is gone from the entry; the changeset limits it to View All. The remedy (delete the row) is correct.
  • Own field row without editable: true (changeset, entry replacement, reason item (2), acceptanceCriteria, conversion docblock bullet). Right: FieldPermissionSchema.editable is z.boolean().default(false), the merge counts an edit vote only on entry.editable === true, and nothing else votes an edit on a field some row names. "With no second set involved" is accurate. The remedy (an explicit editable: true row in the set that should edit) is the one grant the merge reads.
  • The criteria no longer contradict reason item (3); the three places (changeset, entry, conversion docblock) now say the same two own-row cases.
  • N1. Both texts now say the authoring funnel skips the conversion because it is retired from the load path, and that the artifact door (DEFAULT_FLIPS_NOT_REPLAYED_HERE) and the stored-row seam (applyConversionsToStoredItem, through STORED_ROWS_NOT_REWRITTEN) refuse it by id. Both names exist at this head and do what is said.
  • N2. The comment on ADMIN_FULL_ACCESS_CAPABILITIES now says the two record bits cast no field vote from protocol 19 and that viewAllFields keeps the administrator's read, "read, never edit: a field another set locks stays locked for a holder of both". That agrees with buildEffectiveFieldPermissions: the built-in set has no field rows, so on a field another set's row names it adds a read vote and no edit vote.

No new wrong statement found. One wording note, not graded: "hides the field from the set's holders" is said per set, as it was before the delta; a holder who also holds another set that reads the field still reads it, which is the ordinary union and is stated elsewhere in the entry.

Implemented-by: claude/project-thread-o3bcge
Reviewed-by: session_011y7As8wf3DSPRevwNnYLcM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 25e18d4cdb16f02bba83aee105073c9a2e46e56f
Local-runs: none
Scope: packages/spec/src/conversions/entries/18/permission-modify-all-allow-delete-false-to-true.ts, packages/spec/src/conversions/entries/19/permission-view-all-fields-beside-record-bypass.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/conversions/stored.ts, packages/spec/src/identity/eval-user.zod.ts, packages/spec/src/migrations/entries/semantic/19.permission-view-all-modify-all-cast-no-field-vote.ts, packages/spec/src/migrations/registry.ts.template, packages/spec/src/security/permission.zod.ts + packages/core/src/security/effective-object-permissions.ts, packages/core/src/security/index.ts, packages/plugins/plugin-security/src/permission-evaluator.ts, packages/plugins/plugin-security/src/explain-engine.ts, packages/plugins/plugin-security/src/agent-ceiling-clamp.ts, packages/plugins/plugin-security/src/objects/default-permission-sets.ts, packages/metadata-core/src/artifact-forward-conversion.ts, packages/lint/src/validate-security-posture.ts, packages/lint/src/validate-rollup-source-visibility.ts, packages/lint/src/index.ts, packages/qa/scenarios/src/score/scenario-tags.ts, packages/spec/liveness/permission.json
Security-touching: yes
Rule-change-verified: none

Delta review of PR #37371 for card #36055 after a merge of main, on top of records 7196108575 (PASS on bad558d574b997d7bc271793693fab55085331a4) and 7197145451 (delta PASS on 71a5990508df8fab8b150a87dafb72aa85c772ad). Since 71a5990508 the branch carries two commits: the merge fdadfa6785256bce54141fc871e6523a9c821c39 (parents 71a5990508 and main at d92684a7b231421e58ff6c1e23104040f5b39790) and 25e18d4cdb, a regeneration of content/docs/references/api/protocol.mdx. Read: the net diff of the old head against its merge base (1dd682c147) and of this head against its merge base (d92684a7b2), compared path by path; the merge commit; the 35 commits main gained between the two bases; and the check-runs on this head.

① Derived judgments

  • The reviewed diff is unchanged. Both net diffs list the same 55 paths, and for every one of the 55 the added and removed lines are identical between the two. No path entered or left the PR; hits and the implementing files are the ones named in 7197145451. The verdicts of ①, ②, ③ and ④ in the two earlier records therefore apply to this head line for line.
  • The merge changed nothing outside the PR's own paths: the tree of the merge commit differs from main at d92684a7b2 only in the 55 paths of the PR.
  • Two paths were changed by both sides, both merged without a conflict hunk:
    • packages/spec/src/migrations/registry.ts.template. main (fix(spec,test): unblock the 19 Version PR: open the major-19 registry regions, parse prerelease versions in the MCP save test, key the objectui pin claim on the spec major #37557) added the empty 19: regions to RETIRED_KEYS_BY_MAJOR and RETIRED_DEFS_BY_MAJOR at the end of the file; the PR changes the step19 docblock, rationale and conversionIds some 180 lines above. At this head both are present: conversionIds: CONVERSIONS_BY_MAJOR[19]!.map((c) => c.id), the retired-key:19 and retired-def:19 marker pairs, and the PR's hunk against main is the same hunk as before the merge. Nothing from either side is lost.
    • content/docs/references/api/protocol.mdx. The merge commit's copy lacks the ValidateDataIssue.scope rows and nested-shape table main had gained (11 lines; the rest of its difference from main is the PR's own five rows). 25e18d4cdb regenerates the file and restores exactly those 11 lines. At this head the file differs from main only in the PR's own five rows (viewAllRecords and modifyAllRecords twice, when once), each the .describe() text of permission.zod.ts at this head. Consistent.
  • retiredAfter: '18.6.0' on the major-19 conversion, re-judged because main moved the label: chore: version packages (next) #35129 (version packages) took @objectstack/spec from 18.6.0 to 19.0.0-next.0. The type's rule for a prerelease label is "the newest published stable release, which sits below x.y.z", never the label; under 19.0.0-next.0 that is 18.6.0, the value three major-18 entries on main carry too. The value stays right; the reason in 7196108575 ("stable label, not yet versioned") no longer describes the tree, the prerelease clause does. .changeset/pre.json is in pre mode, the PR's changeset is still an added file, and its major bumps are unchanged.

Check-runs on this head, read once: 70 runs, all completed. 60 success, 10 skipped, 0 failure, 0 cancelled, none pending.

  • GREEN now: Lint · docs & code guards and its aggregate Lint & Repo Gates, the two runs that were red on both earlier heads. See ③ E1.
  • Green as before: Check Changeset, Test Core 10/10 and its aggregate, Spec property liveness, Governed Surface Queue Guard, PR-body guards, every other lint lane.
  • The skipped runs include Queue verdict and Borrowed queue verdict; the PR is still a draft.

② Semver level

Clause-②: yes — unchanged from 7196108575 and 7197145451: the changeset and its bump table are byte-identical in the PR's net diff, Clause-②: yes (narrowing) and Metadata-protocol: semantic included.

③ Boundary flags

④ Design judgment

S1: closed
N1: closed
N2: closed

No must-fix, no should-fix.

The design judged in 7196108575 and re-read in 7197145451 is the design at this head: the same lines against a newer main. The one thing the merge could have changed without changing a line of the PR is a neighbour that reads the old vote; ③ lists the search and it found none.

Implemented-by: claude/project-thread-o3bcge
Reviewed-by: session_011y7As8wf3DSPRevwNnYLcM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

席位意见:ACCEPT,交维护者合并。

席位核对 — ACCEPT · head 25e18d4 (2026-11-26T18:23Z)

  1. Shape: 55 files, inside the claim's surface (claim 7177278985 + amendment 7177446075) plus test/fixture data the dev named (major-18 fixture, major18-merge test, a pin row, access-matrix.json for the drift check). Fixes #36055. Clause-②: yes (narrowing); title carries !. Hand-off tier per check-governed-merges --pr 37371: size limb (3213 > 3000) and the narrowing declaration → maintainer merge, pm:awaiting-merge.
  2. Premise measured: the conversion is retiredFromLoadPath, in CONVERSIONS_BY_MAJOR[19] and step19.conversionIds; its id is refused at applyConversionsToStoredItem and in DEFAULT_FLIPS_NOT_REPLAYED_HERE, removing either id turns the pins red (report 7195860041). Field-map acceptance: defaults 507/507 and CRM 663/663 identical, showcase reads 1314/1314, 12 edit cells lost, all the ruled Modify All edit loss; no field or edit opened.
  3. Review: Contract review 7196108575 (PASS, S1) → delta 7197145451 (S1, N1, N2 closed) → merge delta 7199460014 at this head (PASS, No must-fix, no should-fix., net diff over the 55 paths identical to the reviewed one; E1 closed by docs(adr): ADR-0066's viewAllFields vote anchor names holdsViewAllFields #37621).
  4. Gates: at this head 60 success, 10 expected skip, 0 failed, 0 pending; floors green. l1-face: one flag, dogfood owed — answered: dogfood_battery: 25e18d4 · os-verify-lock VERDICT command-exit 0 · Test Files 488 passed + 3 skipped / 491 · Tests 4137 passed + 68 skipped / 4205 · no failures.
  5. Out of scope / follow-ups: skills: View All / Modify All no longer open fields in 19 — re-teach objectstack-ai pitfall 2 and the objectstack-data security eval (follow-up of #36055) #37374, os migrate meta --stored: list the stored permission sets whose View All / Modify All lost their field reach in 19 (follow-up of #36055 ruling A) #37375 (both open). The D2 ⑧ end-state half of row 7178404228 on ADR revisions, week of 2026-11-25: rolling checklist of ADR text out of step with main (one governed PR) #37245 after merge (should say viewAllFieldsReadVote replaced superuserFieldVote). hotcrm sales_manager follow-up owed after merge.
  6. Accepted deviations: 试行偏离 (fresh agent per round; no in-agent CI wait; local runs limited to the affected tests and ratchets, rest read from CI at this head; dev ran l1-face). Pause and resume on the maintainer's concurrency orders (2026-11-26T00:09Z, 2026-11-26T12:59Z).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

维护者速读

Review request: contract review PASS 7199460014 and seat ACCEPT 7200419422, both on head 25e18d4cdb16f02bba83aee105073c9a2e46e56f (2026-11-26T18:24Z).

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 26, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 26, 2026 18:42
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit eb683b8 Nov 26, 2026
76 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-o3bcge branch November 26, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants