Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(memory): flip assertion for capabilities served since v1.2.0

Steven Enamakel76568bd61efc
diff --git a/src/openhuman/memory/binding_tests.rs b/src/openhuman/memory/binding_tests.rs
index db3948013a..ce33d1a9c9 100644
--- a/src/openhuman/memory/binding_tests.rs
+++ b/src/openhuman/memory/binding_tests.rs
@@ -397,21 +397,33 @@ fn module_binding_advertises_the_pinned_artifacts_families() {
assert!(advertised.contains(family), "{family} must be advertised");
}
- const NOT_YET_SERVED: [Capability; 5] = [
+ // Arrived in the v1.2.0 artifact. Asserted PRESENT so a re-pin that
+ // silently narrows the advertised set is caught the same way an over-claim
+ // would be.
+ const SERVED_SINCE_1_2_0: [Capability; 4] = [
Capability::People,
Capability::Chunks,
Capability::Retrieval,
Capability::Profile,
- Capability::Episodic,
];
- for family in NOT_YET_SERVED {
+ for family in SERVED_SINCE_1_2_0 {
assert!(
- !advertised.contains(family),
- "{family} has no bus member in the pinned v1.0.1 artifact (#5598); \
- widen this only together with the registry version bump"
+ advertised.contains(family),
+ "{family} has a bus member in the pinned artifact but is not advertised — \
+ the host is under-claiming and hiding a family it can reach"
);
}
+ // The last of the five, and the only one still withheld. The artifact
+ // serves it; `ModuleMemoryProvider` has no `as_episodic`, so the accessor
+ // returns `None` and advertising it would be the #5598 over-claim in a
+ // different coat. Move it into the loop above in the same change that
+ // implements the accessor.
+ assert!(
+ !advertised.contains(Capability::Episodic),
+ "Episodic is advertised but ModuleMemoryProvider has no `as_episodic`"
+ );
+
// The contract may be ahead of the artifact but never behind it.
assert!(Capabilities::all().contains_all(advertised));
// Unbound contexts still assume the widest set (deny-by-default is wrong