poll fingerprint: a session's own board edit wakes it on the next tick nf-a296 ← Beads

closed priority 2 task unassigned

Twinned from https://github.com/cfsh/ninefold/issues/451 by tools/beads/import_github.py's reconcile pass.

Filed unclaimed and unlabelled from ninefold-a during design-001 piece 1/1b work. Backlog, for a future triage round.

The mechanism

poll.sh's --check fingerprint includes meta-labelled issues by number@updatedAt, and #398 (the session board) is meta. That inclusion is deliberate and correct — #396's review put it back in specifically because *"the board is where this session gets redirected"*.

But CLAUDE.md also requires every session to edit its own row on that board: at session start, at a chunk change, and at wrap-up. So:

``` session edits its row on #398 -> #398.updatedAt moves next tick: --check -> CHANGED (its own edit) -> full digest, ~2 min, ~390 lines -> zero new information ```

A session's own mandated bookkeeping wakes it up. Observed directly this session: a board edit at the end of one tick produced CHANGED on the next, and the resulting full digest contained nothing that had not already been read.

Why it is worth a fix rather than a shrug
Shape of a fix

The property to preserve is #396's: *another* session's board edit must still wake me, because that is how redirection reaches me. Only *my own* edit is noise.

Cheapest first:

  1. Exclude edits whose last actor is this session. gh issue view 398 --json userContentEdits or the timeline gives the editor; if the newest board mutation is ours, treat the board as unchanged. One extra call, only for meta issues (there is one).
  2. Fingerprint the board's body hash rather than updatedAt, and have the writer record the hash it wrote in poll-state.txt. Self-edits then compare equal by construction, no extra API call. Slightly more state.
  3. Have the board writer stamp the new fingerprint into poll-state.txt as it writes. Cheapest of all, but it couples the board-edit path to poll state, which is the kind of hidden coupling this tier keeps getting bitten by — noted to be rejected rather than rediscovered.

I would take 2.

Why it might not be worth doing

The cost is one avoidable full digest per board edit — real but bounded, and the board is edited a handful of times per chunk rather than per tick. If #419 (cron → Monitor) lands, the wake economics change enough that this should be re-costed rather than assumed.

Distinct from #418, which is about how much *detail* the digest prints once it runs. This is about the digest running at all, for no reason.

Related: #418 (digest volume), #396 (why meta is in the fingerprint), #419 (deferred Monitor switch).

Dependencies

None.

Comments

No comments.

Add a comment