Skip to content

Commit 573f2ac

Browse files
dm-builderBrad Groux
andcommitted
fix(test): expect 2700 events after trim, not 3000
The observer store trims to OBSERVER_EVENTS_LOW_WATER (90% of MAX_OBSERVER_EVENTS = 2700) when events exceed the 3000 cap, not to the cap itself. Updated the test assertion and added a comment explaining the low-water mark. Co-authored-by: Brad Groux <brad@digitalmeld.com> Signed-off-by: Brad Groux <brad@digitalmeld.com>
1 parent 4190870 commit 573f2ac

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

desktop/src/features/agents/lib/capabilityManifest.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,9 @@ test("observer reduction retains capability evidence after raw events are trimme
668668
);
669669

670670
const snapshot = getAgentObserverSnapshot(AGENT_PUBKEY, true);
671-
assert.equal(snapshot.events.length, 3_000);
671+
// When events exceed MAX_OBSERVER_EVENTS (3000), the store trims to
672+
// OBSERVER_EVENTS_LOW_WATER (2700) to amortize eviction across refills.
673+
assert.equal(snapshot.events.length, 2_700);
672674
assert.equal(
673675
snapshot.events.some((event) => event.kind === "agent_initialized"),
674676
false,

0 commit comments

Comments
 (0)