On current main, memory::guard::families::tests::guard_explicit_scope_argument_wins_over_the_ambient_one fails deterministically, in isolation (not an ordering or parallelism artifact):
assertion `left == right` failed: a caller that computed a narrower scope must not be widened back
left: Some("")
right: Some("gmail:me")
at src/openhuman/memory/guard/families_tests.rs:179
Repro:
cargo test --lib memory::guard::families::tests::guard_explicit_scope_argument_wins_over_the_ambient_one
The test passes an explicit SourceScope::new(["gmail:me"]) to query_source while an ambient scope of slack:#eng is installed via with_source_scope. The explicit argument is supposed to win; what reaches the driver is Some("") — neither the explicit scope nor the ambient one, which suggests the explicit Option<&SourceScope> is being dropped somewhere and an empty scope substituted, rather than the ambient one simply overriding it.
This matters beyond the test: the assertion message is a security-shaped invariant — a caller that deliberately narrowed a scope must not have it widened underneath them.
Surfaced while repairing the #5459 / #5446 collision. Deliberately not fixed in that PR (it is a behavioural question for the memory-subsystem author, not a mechanical path rename), and the file is untouched there.
On current
main,memory::guard::families::tests::guard_explicit_scope_argument_wins_over_the_ambient_onefails deterministically, in isolation (not an ordering or parallelism artifact):Repro:
The test passes an explicit
SourceScope::new(["gmail:me"])toquery_sourcewhile an ambient scope ofslack:#engis installed viawith_source_scope. The explicit argument is supposed to win; what reaches the driver isSome("")— neither the explicit scope nor the ambient one, which suggests the explicitOption<&SourceScope>is being dropped somewhere and an empty scope substituted, rather than the ambient one simply overriding it.This matters beyond the test: the assertion message is a security-shaped invariant — a caller that deliberately narrowed a scope must not have it widened underneath them.
Surfaced while repairing the #5459 / #5446 collision. Deliberately not fixed in that PR (it is a behavioural question for the memory-subsystem author, not a mechanical path rename), and the file is untouched there.