test: drive the resource API under the tenant-rooted layout #1863 - #1869
Closed
DmytroZaichenkoDev wants to merge 3 commits into
Closed
DmytroZaichenkoDev wants to merge 3 commits into
DmytroZaichenkoDev wants to merge 3 commits into
Conversation
Adds the tenant-rooted StorageLayout and selects the layout at start-up from storageLayout.tenantRooted, which defaults to false, so physical paths are unchanged unless a deployment opts in. The active layout is process-wide: ResourceDescriptor is constructed everywhere and carries no configuration of its own. AiDial sets it unconditionally on every start so the layout is fully determined by settings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Encrypted fields are bound to the resource's physical path through the AES-GCM AAD, which five call sites derived inline. They now share ResourceSecretAad, which also accepts a path directly, so a caller that moves an encrypted resource can decrypt with the source path and encrypt with the destination one. Same bytes as before; no behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Enables storageLayout.tenantRooted through the real stack and exercises a conversation round trip, listing and deletion, then asserts the blob is stored under the tenant root in a reserved type folder. Unit tests cover the path conversion in isolation; this is what shows the descriptor, the cache and the blob store agreeing on the same paths. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DmytroZaichenkoDev
force-pushed
the
feat/issue-1863-3-secret-aad
branch
2 times, most recently
from
August 31, 2026 11:21
e0966ee to
5b4f3b0
Compare
Contributor
Author
|
Folded into #1866, so the end-to-end test sits with the change it proves. |
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.
Part 4 of 4 for #1863. Stack: layout seam → tenant layout → secret AAD → this.
What
An integration test that enables
storageLayout.tenantRootedand drives the resource API through the real stack.PUTthenGETreturns the same body).org/test-tenant/…in a reserved type folderWhy
Parts 1 to 3 verify the conversion in isolation. Nothing had yet run the descriptor, the Redis cache and the blob store together with the flag on — which is the only way to show they agree on the same paths.
Notes for review
@AfterEach. Any test going throughAiDial.start()also resets it, since the layout is set unconditionally there.MAX_PATH_SIZE(900 bytes) is checked against the physical path, and tenant-rooting lengthens every path by roughly 15 bytes for a default-tenant user resource. Resources within that margin of the ceiling today would migrate but then fail validation. The ceiling is correct as written — it guards the blob store's key limit — so this is a migration constraint to measure before cutover, not something to relax here.