test: compare access decisions across the two storage layouts #1870 - #1892
Open
DmytroZaichenkoDev wants to merge 2 commits into
Open
DmytroZaichenkoDev wants to merge 2 commits into
DmytroZaichenkoDev wants to merge 2 commits into
Conversation
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-1-replay-diff
branch
from
September 2, 2026 14:31
7643ad9 to
0286ab0
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-2-access-differ
branch
from
September 2, 2026 14:31
0a6cc22 to
132276a
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-1-replay-diff
branch
from
September 2, 2026 15:07
0286ab0 to
84e69e4
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-2-access-differ
branch
from
September 2, 2026 15:07
132276a to
5d65dbb
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-1-replay-diff
branch
from
September 2, 2026 15:23
84e69e4 to
bd6648c
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-2-access-differ
branch
2 times, most recently
from
September 2, 2026 15:56
b4bc5ac to
480ed3a
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-1-replay-diff
branch
from
September 3, 2026 10:53
48fc265 to
df8b721
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-2-access-differ
branch
from
September 3, 2026 10:53
480ed3a to
3b03a3a
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-1-replay-diff
branch
from
September 3, 2026 11:58
df8b721 to
acbc1b9
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-2-access-differ
branch
from
September 3, 2026 11:58
3b03a3a to
4415dcb
Compare
DmytroZaichenkoDev
marked this pull request as ready for review
September 3, 2026 15:05
DmytroZaichenkoDev
requested review from
Oleksii-Klimov and
astsiapanay
as code owners
September 3, 2026 15:05
astsiapanay
approved these changes
Sep 4, 2026
astsiapanay
approved these changes
Sep 4, 2026
Seeds durable state - an owned resource, a read share, a write share, a published resource, a pending review copy, an application, app data - and then asks 21 access questions of both layouts, comparing the decisions. The questions go over HTTP rather than into AccessService directly. populatePermissions runs the same eleven-rule chain and puts its result in the response, so this observes the real chain with a real context; a hand-built context would mostly prove the mock was set up the way the test expected. Every cell names the rule it exists to exercise and the permissions it must yield, and some name permissions it must not. Without that a matrix that stopped exercising the chain would compare denied to denied and report the layouts identical. The matrix also declares the whole chain, so a rule that no cell reaches fails unless it is listed as uncovered with a reason - one is, and the reason is that it needs a deployment on the context, which no request this differ can make ever has. It should come back clean, and does: shares and rules key on logical urls and bucketLocation stays legacy, so the inputs never change. The reason to build it anyway is that the same differ answers "does the new engine decide identically?" when the chain is replaced, and it has to exist while there is still a working reference implementation to capture behaviour from. Found api_key_data/ unmapped, which is fixed in the branch below. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Empty expects meant "no expectation", so all seven denied cells only pinned cross-layout equality: both layouts granting the stranger READ would have compared equal and passed. Empty expects now asserts that the whole chain granted nothing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-2-access-differ
branch
from
September 7, 2026 11:50
da81845 to
962ac0f
Compare
DmytroZaichenkoDev
force-pushed
the
feat/issue-1870-1-replay-diff
branch
from
September 7, 2026 11:50
72d016c to
722a89c
Compare
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.
Stacked on #1891.
Seeds durable state — an owned resource, a read share, a write share, a published resource, a pending review copy, an application, app data — then asks 21 access questions of both layouts and compares the decisions.
Questions go over HTTP rather than into
AccessServicedirectly:populatePermissionsruns the same eleven-rule chain and puts its result in the response, so this observes the real chain with a real context. A hand-built context would mostly prove the mock was set up the way the test expected.Coverage — 10 of the 11 rules, each with a grant and a denial:
The 11th,
getOwnResourcesAccessForChainedSchemaRichApplication, needscontext.getDeployment()to be a schema-richApplication, and only the deployment-routing controllers set a deployment —ResourceControllerdoes not. It is listed underuncoveredwith that reason, and the matrix declares the whole chain, so a rule that is neither covered nor explained fails the run.Each cell declares the permissions it must yield, and some what it must not. Without that a matrix that stopped exercising the chain would compare denied-to-denied and report the layouts identical.
Result is clean, as expected — shares and rules key on logical urls and
bucketLocationstays legacy, so the inputs never change. Worth building anyway because the same differ answers "does the new engine decide identically?" when the chain is replaced in P3, and it has to exist while there is still a working reference implementation to capture behaviour from.Found
api_key_data/unmapped on its first run — per-request keys threw, taking out every application caller. Fixed in #1889.🤖 Generated with Claude Code