Repository navigation
feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit - #37371
Conversation
…gin-security, lint, scenarios) Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
…st no field vote) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
📓 Docs Drift CheckThis PR changes 6 package(s): 20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 186 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
#36055) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
…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
…e entry (#36055) 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
… its D3 entry Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM Contract reviewServed-tier: 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 ① Derived judgmentsCheck-runs on the head, read once: 2 failure, the rest success or skipped, none pending (the second
② Semver levelClause-②: yes — the PR body and the changeset both carry The changeset matches what the diff publishes: ③ Boundary flags
④ Design judgmentS1 (should-fix) —
No must-fix. Nits, no effect on correctness:
What holds, file by file, against the code at this head:
Implemented-by: 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
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM Contract reviewServed-tier: Delta review of PR #37371 for card #36055, on top of record 7196108575 (PASS on ① Derived judgmentsNothing that runs changed since Check-runs on this head, read once after the last one completed: 74 runs, none pending. 59 success, 12 skipped, 1 cancelled, 2 failure.
② Semver levelClause-②: yes — unchanged: the PR body and the changeset still carry ③ Boundary flags
④ Design judgmentS1: closed No must-fix, no should-fix. Each new sentence, held against the code at this head:
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: VERDICT: PASS |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM Contract reviewServed-tier: Delta review of PR #37371 for card #36055 after a merge of ① Derived judgments
Check-runs on this head, read once: 70 runs, all completed. 60 success, 10 skipped, 0 failure, 0 cancelled, none pending.
② Semver levelClause-②: yes — unchanged from 7196108575 and 7197145451: the changeset and its bump table are byte-identical in the PR's net diff, ③ Boundary flags
④ Design judgmentS1: 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 Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM
席位意见:ACCEPT,交维护者合并。 席位核对 — ACCEPT · head 25e18d4 (2026-11-26T18:23Z)
|
|
repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM 维护者速读
Review request: contract review PASS 7199460014 and seat ACCEPT 7200419422, both on head |
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
viewAllRecords) and Modify All (modifyAllRecords) widen records only. They cast no field vote.viewAllFieldsis the only "every field" channel: read only, never edit, and a set's ownreadable: falserow beats it.viewAllFields: truefromos migrate meta --from 18 --write. Studio has noviewAllFieldscontrol today, so a stored set is fixed by addingviewAllFields: truethrough 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.viewAllFieldsvotes 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.readable: falserow hides that field from its holders even withviewAllFields: true, and its own field row withouteditable: trueno 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; writeeditable: trueon the row).What changes
@objectstack/core:superuserFieldVoteis replaced byviewAllFieldsReadVote(sets, object, field).buildEffectiveFieldPermissionsasks it.holdsSuperuserBypassis unchanged and answers the record bypass only.@objectstack/plugin-security:getFieldPermissionsasks the same vote. Explain drops the "superseded by the Modify All Data field vote" branch (andConditionedFieldEntry.supersededBy): a row-conditioned lock binds per row for every caller.@objectstack/lint:security-superuser-field-mask-inertis retired (constant, catalog text, explanation, export).security-cross-set-field-reopenreports only a hidden field another set'sviewAllFieldsre-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/viewAllFieldsdescriptions state the new meaning (generated reference docs regenerated). The liveness ledger anchorsviewAllFieldsat#viewAllFieldsReadVote.permission-view-all-fields-beside-record-bypass(packages/spec/src/conversions/entries/19/): writesviewAllFields: trueon everyobjectsentry,'*'included, that hasviewAllRecords: trueormodifyAllRecords: trueand noviewAllFields(an authoredviewAllFields: falseis left alone). A default flip:retiredFromLoadPath: true,retiredAfter: '18.6.0', fixture with 3 notices. Registered in a newMAJOR_19_CONVERSIONS(the sorted{ conversion, order }shape of major 18) asCONVERSIONS_BY_MAJOR[19];step19.conversionIdsderives from it.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 ownreadable: falserow keeps hiding its field after the bit is added; an own field row withouteditable: trueloses 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: truestates the 19 meaning (the bit, not the record bits, keeps the platform administrator reading every field; it votes read, never edit). Comment only.applyConversionsToStoredItemrefuses the id by name (module-localSTORED_ROWS_NOT_REWRITTEN, merged into any caller'sexcludeConversionIds), so the database loader, the ObjectQL stored-row read, the metadata-protocol read andos migrate meta --storednever 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_auditor(four View All entries) and ops'showcase_announcementModify All entry carryviewAllFields: true, migrated by hand; the access-matrix snapshot records the five grants (the build's ADR-0090 D6 drift check named them).@objectstack/metadata-coreadded asminor.Where the 19 upgrade guidance lives
packages/spec/src/migrations/entries/semantic/19.permission-view-all-modify-all-cast-no-field-vote.ts.pnpm --filter @objectstack/spec gen:upgrade-guidewritescontent/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 isviewAllFields: true..changeset/36055-view-all-stops-voting-on-fields.md(ships asCHANGELOG.md).Why
Card #36055, step 3 of the field-axis split (#34365, ruling of record 6912661484): View All / Modify All widen records,
viewAllFieldsreads 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: asemanticrow kind joins a default flip to the D3 entry an author meets (a default flip has no tombstone or refusal); it reads the entry'sreasonandacceptanceCriteria, which name protocol 19 and--from 18.Acceptance notes
'*'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_adminbesideshowcase_contributor/showcase_client_liaisonno longer editshowcase_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).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 throughapplyConversionsToStoredItem; the only otherincludeRetiredcaller is the artifact door. No seam outside the two edited ones replays this id.permission-modify-all-allow-delete-false-to-truecarriesviewAllFields: truebeside its Modify All entries so the fixture table stays disjoint;scripts/conversions-major18-merge.test.tsreads major 18's slice ofALL_CONVERSIONSinstead of its tail; the retired-key pin row above; the showcase access-matrix snapshot.STORED_ROWS_NOT_REWRITTENturns 3 stored-seam tests red; removing it fromDEFAULT_FLIPS_NOT_REPLAYED_HEREturns 4 door tests red; both restored byte-identical toHEAD(blob hashes matched,git diff HEADempty). 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.authored-currentwhile 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/specbuild (lock VERDICT command-exit 0), thencheck:generated --fix: exit 0, all 14 generated artifacts up to date, nothing rewritten.gen:upgrade-guideexit 0 (content/docs/protocol-upgrade/19.mdcarries the new criteria; gitignored),gen:spec-changesexit 0 (gitignored); no tracked file changed.@objectstack/specvitest 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).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/specvitest run --project local: 901 files, 28514 passed and 1 failed before the retired-key pin row (permission-view-all-fields-beside-record-bypassunjoined); after the row,src/conversions,src/migrationsand the pin: 29 files / 1072 tests green;scripts/conversions-major18-merge.test.tsgreen.@objectstack/metadata-coretest: 27 files / 1070 tests green.@objectstack/clivitest run --project unit migrate: 44 files / 449 tests green (the integration tier is CI's).@objectstack/coresrc/security75 files / 1493 tests green;@objectstack/lint236 files / 9658 tests green.@objectstack/plugin-securityand@objectstack/scenariosare cited from CI (Test Coresuccess).typecheck:@objectstack/specand@objectstack/metadata-coregreen.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;--ranreconciliation: 132 accounted, 128 run, 4 NOT MEASURED, 0 unrun.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.check:adr-symbol-anchorsondocs/adr/0066-unified-authorization-model.md:146, which anchorseffective-object-permissions.ts#superuserFieldVote.docs/adr/**is out of this PR's surface; the anchor re-points to#viewAllFieldsReadVotein 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.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-guidewritescontent/docs/protocol-upgrade/19.mdwith the conversion row and the D3 entry.Lint & Repo GatesandLint · docs & code guards, whose log names the onecheck-adr-symbol-anchorsfinding above and nothing else.TypeScript Type Check,Test Core,Build Coresuccess.Clause-②: yes (narrowing)
Metadata-protocol: semantic
Skills-docs: follow-up #37374
ADR-0066 D2 ⑧ end-state note (text for the weekly ADR card #37245)
Follow-ups to file
sales_manager: convert the migratedviewAllFields: trueto explicit field rows (Decision: separate the record axis from the field axis — View All / Modify All stop voting on fields, a read-onlyviewAllFieldsbit carries the admin channel (end state, v19) #34365 step 4).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_011y7As8b4YLdvodeGAQWNTQ