Skip to content

Commit d47802a

Browse files
test(storage): account for unowned Code/Effects read variants
RepositoryReadOperationV1 gained Code and Effects variants that the concrete repository executor explicitly rejects rather than routing. Record them as read_unowned_variants so the S8 read vocabulary matches its route matrix and assert the executor still handles them explicitly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a95f10a commit d47802a

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

tests/fixtures/storage_runtime/s8_cutover_routes.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,9 @@
8282
"variant": "Session",
8383
"callee": ".session.execute_read"
8484
}
85+
],
86+
"read_unowned_variants": [
87+
"Code",
88+
"Effects"
8589
]
8690
}

tests/storage_runtime_s8_cutover.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ struct S8CutoverFixture {
1717
families: Vec<FamilyFixture>,
1818
write_routes: Vec<Route>,
1919
read_routes: Vec<Route>,
20+
// Read vocabulary variants that this repository executor explicitly does
21+
// not own (their execute arm rejects rather than routing to a family
22+
// executor). Tracked so the vocabulary stays fully accounted for.
23+
#[serde(default)]
24+
read_unowned_variants: Vec<String>,
2025
}
2126

2227
#[derive(Debug, Deserialize)]
@@ -63,11 +68,12 @@ fn profile_project_and_session_reads_share_the_closed_runtime_route() {
6368
let fixture: S8CutoverFixture =
6469
serde_json::from_str(S8_ROUTES).expect("decode S8 route fixture");
6570
let repository = RustAst::parse(&fixture.repository_module);
66-
let expected_variants = fixture
71+
let mut expected_variants = fixture
6772
.read_routes
6873
.iter()
6974
.map(|route| route.variant.clone())
7075
.collect::<BTreeSet<_>>();
76+
expected_variants.extend(fixture.read_unowned_variants.iter().cloned());
7177
// The read operation vocabulary now lives in the `tracedecay-store` runtime
7278
// port, re-exported through the repository module; assert against its
7379
// definition site while the executor routing below stays on the module.
@@ -80,6 +86,14 @@ fn profile_project_and_session_reads_share_the_closed_runtime_route() {
8086

8187
let paths = repository.method_paths("ConcreteRepositoryReadExecutor", "execute");
8288
let calls = repository.method_calls("ConcreteRepositoryReadExecutor", "execute");
89+
// Unowned variants must still be handled explicitly by the executor (their
90+
// arm rejects), never silently fall through the read dispatch.
91+
for variant in &fixture.read_unowned_variants {
92+
assert!(
93+
has_path_suffix(&paths, &format!("RepositoryReadOperationV1::{variant}")),
94+
"S8 unowned read variant {variant} is not explicitly handled by the executor"
95+
);
96+
}
8397
for route in fixture.read_routes {
8498
assert!(
8599
has_path_suffix(

0 commit comments

Comments
 (0)