C4: Divergence check -> review nudge, no silence #25

Closed
opened 2026-10-28 11:07:52 +00:00 by jacisjake · 0 comments
jacisjake commented 2026-10-28 11:07:52 +00:00 (Migrated from github.com)

Epic: #21. Depends on: #24

Goal

After a conspiracy's crows deliver, run Jev divergence checks (noul: "does this add a point already made?") per deliver against earlier delivers; a restatement gets a review nudge message from the harness — the crow is never silenced and the deliver stays in the log.

Acceptance criteria — falsifiable tests

  1. FakeJevServer + TestRestatementGetsNudge — Given two delivers whose Jev restates_earlier noul is 0.8 (> band) for the second, when both are posted, then a kind:"nudge" harness message addressed to the second crow is appended and references it. Red now, green after.
  2. TestDistinctDeliversNoNudge — same but noul 0.2 for the second: no nudge appended. Red now, green after.
  3. Nudges count toward the nest budget: with a Budget whose limit allows one crow call, the second crow's nudge path does not spend model tokens; assert budget.Spent() unchanged after nudge. Red now (no accounting), green after.

Test command

go test -race -run 'TestRestatementGetsNudge|TestDistinctDeliversNoNudge' .

Blockers / unknowns

Nudges-per-expectation cap (3 loops, #4) applies to expectation nudges (Epic E); this is a per-message review nudge — one per deliver, no loop possible: assert at most one nudge references any given msg.

Epic: #21. Depends on: #24 ## Goal After a conspiracy's crows deliver, run Jev divergence checks (noul: "does this add a point already made?") per deliver against earlier delivers; a restatement gets a **review nudge** message from the harness — the crow is never silenced and the deliver stays in the log. ## Acceptance criteria — falsifiable tests 1. `FakeJevServer` + `TestRestatementGetsNudge` — Given two delivers whose Jev `restates_earlier` noul is 0.8 (> band) for the second, when both are posted, then a `kind:"nudge"` harness message addressed to the second crow is appended and references it. Red now, green after. 2. `TestDistinctDeliversNoNudge` — same but noul 0.2 for the second: no nudge appended. Red now, green after. 3. Nudges count toward the nest budget: with a Budget whose limit allows one crow call, the second crow's nudge path does not spend model tokens; assert budget.Spent() unchanged after nudge. Red now (no accounting), green after. ## Test command `go test -race -run 'TestRestatementGetsNudge|TestDistinctDeliversNoNudge' .` ## Blockers / unknowns Nudges-per-expectation cap (3 loops, #4) applies to expectation nudges (Epic E); this is a per-message review nudge — one per deliver, no loop possible: assert at most one nudge references any given msg.
Sign in to join this conversation.