fix(6253): the moment-proposal queue lists a signal pair only once it has proposed

pending() listed every suggested signal row, including pairs still gathering
evidence below the three-situation bar, so the queue held 200 "proposals"
where about 25 had crossed it. A signal pair now needs proposed_at in its
evidence, the same test the misfire half already applies; proposals from a
pass are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 20:03:52 -04:00
co-authored by Claude Opus 5.5
parent 67d3c68fbf
commit d51ccd9b69
2 changed files with 15 additions and 2 deletions
@@ -143,6 +143,8 @@ async def test_the_signal_counts_sessions_and_asks_once_the_bar_is_crossed(world
for situation in ("s1", "s1", "s2"):
assert await judgments_svc.co_occurred(uid, done.id, ["work.verify"],
situation=situation) == ""
# Below the bar the pair is gathering evidence, not waiting on anyone.
assert (await judgments_svc.pending(uid, rule_id=done.id))["rules"] == []
line = await judgments_svc.co_occurred(uid, done.id, ["work.verify"], situation="s3")
assert f"#{done.id}" in line and "`work.verify`" in line and "3 distinct sessions" in line
assert "judge_rule_moments" in line