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:
@@ -61,6 +61,29 @@ def test_the_proposal_line_names_the_tool_that_answers_it():
|
||||
assert "judge_rule_moments" in line and '"reject"' in line
|
||||
|
||||
|
||||
def test_the_proposal_line_is_a_question_to_check_not_advice_to_relay():
|
||||
rule = SimpleNamespace(id=11, title="Definition of done", kind="rule")
|
||||
evidence = {"situations": ["a", "b", "c"],
|
||||
"reached_by": {"git push": 3, "git push --tags": 1}}
|
||||
line = svc._proposal_line(rule, "work.deliver", evidence)
|
||||
assert "co-occurrence, not a recommendation" in line
|
||||
assert "`list_moments`" in line and "if it is about a subject, leave it" in line
|
||||
assert "(reached by `git push`, `git push --tags`)" in line
|
||||
note = svc._signal_note("work.deliver", evidence)
|
||||
assert note.startswith("Opened just after `work.deliver` (reached by `git push`")
|
||||
assert "3 distinct sessions" in note
|
||||
|
||||
|
||||
def test_the_actions_a_signal_remembers_are_bounded():
|
||||
ev: dict = {}
|
||||
for i in range(svc._SIGNAL_ACTIONS_CAP + 3):
|
||||
ev = svc._add_reached(ev, f"cmd {i}")
|
||||
ev = svc._add_reached(ev, "cmd 0")
|
||||
assert len(ev["reached_by"]) == svc._SIGNAL_ACTIONS_CAP
|
||||
assert ev["reached_by"]["cmd 0"] == 2
|
||||
assert svc._add_reached({}, "")["reached_by"] == {}
|
||||
|
||||
|
||||
# ── The misfire ──────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user