Repository navigation
tests(access-security): pin the FLS read side and the persona x CRUD cell matrix, and re-scope both checklist refs - #9570
Merged
os-zhuang merged 1 commit intoAug 18, 2026
Conversation
…cell matrix (#9481) QA run #9401 scored `access-security.fls-mask-and-strip` and `access-security.crud-permission-matrix` green on pins that reach only a subset of each item's acceptance clauses. Two new dogfood pins close the named gaps, and both items' `automated.ref` are re-scoped so the next Tier-1 run scores them honestly — including what stays manual. FLS read side. A permission-set `readable: false` STRIPS the field: the key is deleted, not nulled and not replaced by a placeholder. The pin asserts key-absence on the by-id record, on every listed row and on an explicit `select` that names the field, always against the entitled caller's contrast on the same row and request; it also pins the filter and sort oracle refusals (403 PERMISSION_DENIED naming the field) and the read deny's write complement. The scratch `readable: false` set is authored at runtime, exactly as the item's own steps prescribe — stock showcase metadata is untouched. Persona x CRUD cells. All 25 `showcase_*` rows of the showcase's access-matrix.json are driven over all four verbs by one fresh member per permission set: 100 cells, 50 effective-allow and 50 effective-deny, each judged against the BASELINE-UNIONED expectation (ADR-0090 D5), whose 9 baseline-only grants are asserted as load-bearing in their own right. An admin payload control runs first, so a persona 403 cannot be a 400 in disguise. Both refs now state what they do NOT reach: the #8993 maskingRule path has no fixture anywhere in this repo, the UI halves have no pin, the 6 sys_* delegate rows are not plain cells, and the guest-anchor intake asymmetry is not observable on a member persona at all. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. |
os-zhuang
marked this pull request as ready for review
August 18, 2026 11:12
os-zhuang
enabled auto-merge
August 18, 2026 11:12
os-zhuang
marked this pull request as draft
August 18, 2026 11:18
auto-merge was automatically disabled
August 18, 2026 11:18
Pull request was converted to draft
os-zhuang
marked this pull request as ready for review
August 18, 2026 11:21
os-zhuang
deleted the
claude/issue-9481-fls-read-side-and-persona-crud-cells
branch
August 18, 2026 11:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9481
QA run #9401 scored two access-security items green on pins that reach only a subset of their acceptance clauses. This lands the two missing pins and re-scopes both items'
automated.ref, including what stays manual — the second half is the point, not a footnote: a pin that covers more while the ref still claims the old scope leaves the same dishonesty pointing the other way.Tests and checklist prose only. No runtime behaviour, wire shape, or accept/reject decision changes.
1. FLS read side —
access-security.fls-mask-and-strippackages/qa/dogfood/test/showcase-fls-read-mask-strip.dogfood.test.ts(8 tests).The existing pin covers the write half only, and its ref says so. The read half is what an unentitled persona actually receives on the wire.
The distinction, asserted rather than assumed. The platform has two ways a field fails to reach a caller and they are not interchangeable:
readable: falsemaskingRule(#8993)A test that only checks "I did not get the real value" passes for both and pins neither. So the assertions are about the key:
Object.prototype.hasOwnProperty.call(record, 'budget')must befalse— which also distinguishes absent from present-and-null, where atoBeUndefined()would not.Measured answer, and it settles an ambiguity in the item's own clause 4 ("absent or nulled"): the product strips. What is pinned:
selectthat names it (200, no error, no value);Fixture. Stock showcase authors no
readable: falsegrant — the item's ownknownGapsrecords this and #9308 fixture 4 is the card that would land it in the seed. The test authors a scratch permission set at runtime, which is exactly what this item's own steps prescribe; committed showcase metadata is untouched. Boots privately rather than on the worker-shared showcase, because it inserts asys_permission_setrow and the shared harness excludes permission-set metadata edits outright.2. Persona x CRUD cells —
access-security.crud-permission-matrixpackages/qa/dogfood/test/showcase-crud-persona-matrix.dogfood.test.ts(30 tests).All 25
showcase_*rows of the showcase'saccess-matrix.json, driven over all four verbs by one fresh member per permission set. 100 cells: 50 effective-allow, 50 effective-deny.The union is the whole trap.
access-matrix.jsonlists what each set grants on its own; every authenticated member also holdsshowcase_member_defaultadditively (ADR-0090 D5) and capability is a union. Judging a cell against the raw row turns 9 correctly-allowed cells into fabricated violations. The effective expectation isrow[verb] OR baseline[verb], and those 9 baseline-only grants get their own assertion — if that count ever reaches 0 the union has stopped mattering and the sweep has silently stopped testing it.Both sides, and the balance is checked. A matrix that only asserts denials stays green when everything denies.
records the verdict of every cellasserts the exact 50/50 split, that every set and object was really driven, that every denial is403 PERMISSION_DENIEDspecifically (never an incidental 404/400), and that every allow is 2xx. Narrowing the sweep breaks the build instead of quietly shrinking what is proven.A denial here is a permission verdict, not a bad payload. Before any persona runs, the admin creates every object from the same payload builder. A showcase change that adds a required field fails that control naming the object, instead of every persona's 403 staying green for the wrong reason. (Both over-tightening ablations below were caught by this control first, which is the behaviour it exists for.)
Also pinned: denied CREATE leaves no row behind (clause 2);
viewAllRecordsreaches a foreign private note by id and in lists, with a persona lacking the bit denied both ways (clause 3);modifyAllRecordslets ops patch a foreign announcement while the same patch by a baseline member is refused and the row is unchanged (clause 4).What is re-scoped as manual, and why
Stated in both refs, not implied:
maskingRulewas pruned as dead in 2026-06 #8993maskingRulepath. No object anywhere in this repo declares amaskingRule— the showcase declares none — so the masked-value wire shape has no fixture, and authoring one would change what the stock showcase means. The read pin covers the strip mechanism only.showcase_field_ops_delegatexsys_*rows. Their verdicts are not plain cells. Measured: a member holding nothing but the app baseline reads/data/sys_user200 (self-scoped) although the matrix listssys_userread only for the delegate — the platform's own baseline sets grant part of that surface independently of the app matrix, so a missing row is not a prediction of denial there. And the delegate'ssys_user_positionwrites are decided by the ADR-0090 D12 adminScope subtree gate, whichshowcase-permission-zoo.dogfood.test.tsalready pins on both sides.guest_portalcreate-without-read). Not observable on a member persona at all: the everyone baseline grants read onshowcase_inquiry, so the union says read, and the test asserts the union because that is what a member holding the set may actually do. The asymmetry lives on the unauthenticated guest anchor, a different admission lane.Red without the behaviour — predicted vs actual
Each ablation rebuilt the mutated package and was proven present in
dist/withscripts/ablation-dist-preflight.mjsbefore its colour was allowed to mean anything (dogfood resolves through built artifacts; an unrebuilt ablation stays green and certifies a vacuous test).FieldMasker.maskRecordstops deleting hidden fieldscheckObjectPermissionreturns true)contributor x invoice_line, whose master-detail create cascades off the invoice it can no longer create. Prediction missed the cascadeF is the regression these pins exist to catch, and it is the one the D6 snapshot gate structurally cannot see: that gate compares declarations, this compares declaration against what the server actually serves.
All ablations reverted;
ablation-dist-preflight --absentconfirms no marker survives in any built artifact.Verification
Union re-run on the pushed head
4ace9167c:showcase-fls-read-mask-strip+showcase-crud-persona-matrix+ the four neighbouring access-security pins +authz-conformance— 7 files passed, 117 tests passedpnpm --filter @objectstack/dogfood typecheck— clean (script name echoed, not a zero-match filter)check:type-check-debt --re-measure— 33 ledger entries, 1926 raw errors, "surplus: none", nothing above its recorded numbercheck:nul-bytes,check:cross-package-test-inputs,check:test-source-alias,check:type-source-resolution,check:query-options-erasure,check:engine-double-contract,check:where-matcher,check:type-check-coverage,check-platform-checklist,check-affected-docs, and spec'scheck:empty-state/check:liveness/check:strictness-ledger/check:variant-docscheck:cross-package-test-inputswas not assumed covered: injecting an undeclared path into the matrix test made it red naming both the path and my file, and it went green again on restore — so the existingexamples/app-showcase/**glob demonstrably covers theaccess-matrix.jsonread.Notes for review
skip-changesetinstead.@objectstack/dogfoodisprivate: trueso it cannot appear in one, andscripts/check-empty-changeset.mjsexplicitly rejects an empty-frontmatter changeset, prescribing the label for a PR that releases nothing. The dispatch brief said "changeset required"; the repo mechanism says otherwise for a tests-and-docs PR, and this follows the repo. Flagged rather than decided silently.budget_remaining + spentreproduces the strippedbudget), while the product deliberately closes the filter/sort oracle for the same field. Measured here, asserted nowhere: pinning today's behaviour would turn a future fix into a red. That card is not addressed by this PR, and Land the showcase seed fixtures that unblock the checklist's stock-fixture gaps (loginable 2nd member, publicSharing object, writable summary field, readable:false FLS grant) #9308 remains open independently.Generated by Claude Code