fix(6470): a moment proposal counts only opens no hook explained, and asks the reader to judge it
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / integration (push) Successful in 1m4s
CI & Build / Python tests (push) Successful in 1m46s
CI & Build / Build & push image (push) Successful in 37s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / integration (push) Successful in 1m4s
CI & Build / Python tests (push) Successful in 1m46s
CI & Build / Build & push image (push) Successful in 37s
The signal counted every get_rule open against every moment from the previous three minutes, so a rule a search arm had just shown was proposed for whatever moment happened to fire. All nine pending signal proposals were wrong. - The hook skips an open of a rule a hook named this session, and sends the last three acts from 90 seconds instead of 30 from 180. - A rule already mounted anywhere gathers no signal evidence. - A signal pair keeps the actions that reached its moment and shows them as its why. - The proposal line says it is co-occurrence, not a recommendation, and asks the reader to check the rule against the moment before offering it; moments.md says the same. Plugin 2026.10.26.2029. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -195,7 +195,23 @@ async def test_the_open_resolves_acts_through_the_installs_mappings(world):
|
||||
out = await judgments_svc.opened_after(uid, done.id, acts, session_id="s1")
|
||||
assert "work.deliver" in out["moments"]
|
||||
assert "work.run" not in out["moments"]
|
||||
assert (await _row(done.id, "work.deliver")).source == "signal"
|
||||
row = await _row(done.id, "work.deliver")
|
||||
assert row.source == "signal"
|
||||
# The action that reached the moment is kept, and shown as the why.
|
||||
assert row.evidence["reached_by"] == {"git push": 1}
|
||||
assert row.note.startswith("Opened just after `work.deliver` (reached by `git push`)")
|
||||
|
||||
|
||||
async def test_a_rule_already_mounted_gathers_no_signal(world):
|
||||
"""A mounted rule arrives by lookup at its own moments, so an open of it
|
||||
is no evidence it is missing another."""
|
||||
uid, done = world["uid"], world["done"]
|
||||
await rulebooks_svc.set_rule_moments(done.id, uid, ["work.finish"])
|
||||
for situation in ("a", "b", "c", "d"):
|
||||
assert await judgments_svc.co_occurred(
|
||||
uid, done.id, ["work.verify"], situation=situation,
|
||||
) == ""
|
||||
assert await _row(done.id, "work.verify") is None
|
||||
|
||||
|
||||
# ── The misfire ──────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user