poll.py --check is useless for a session with no session: label — 130 issues in the fingerprint vs 3 nf-d1xa ← Beads

open priority 2 task unassigned

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

poll.py's cheap --check gate offers a label-less session only two settings, and both are wrong. Measured over four consecutive live ticks on the WSL office box, not reasoned about.

The two options, and why neither works

compute_fingerprint (poll.py:482-488) branches on $slabel:

```python if slabel: ... if "meta" in names or slabel in names: # scoped else: ... for issue in gh.issue_list(...) # EVERY open issue ```

For a session with no session: label — an Aedan-directed standing slot, which is a documented session type; C's Explore chunk is the other example — that means:

| what I pass | fingerprint covers | failure | |---|---|---| | a label nothing carries | meta only | blind: a comment from Aedan on my claimed issue never flips CHANGED, and quiet ticks back the cadence off to 2h/4h while it sits | | empty | every open issue | useless: any of 130 issues moving flips CHANGED |

Measured just now:

``` open issues: 130 carrying meta or any session: label: 3 CLAIMed by this session's sid (my actual work): 1 ```

So my --check is watching ~43× more than a labelled session's, and 130× more than the work I own.

Measured cost

Four consecutive ticks, all CHANGED, none of them about my work:

⚠ Note this is *not* an argument that retiring session:argo was wrong. The label was retired deliberately: argo is Aedan-directed rather than triage-assigned, and #398's own convention says a chat-directed chunk carries no active+session: labels. The gap is that the tooling has no third option for a legitimate session shape it already recognises.

The fix already exists in the file

poll.py already identifies my work without any label — emit_issues matches ^ ownership: CLAIM .*sid=<sid> (poll.py:862) against every open issue, and the per-issue sweep is deliberately unscoped (poll.py:806). That is how #566 is still correctly reported as "claimed by THIS session" with no labels on it at all.

So the fingerprint could be scoped the same way it already scopes ownership:

> meta + issues whose latest CLAIM matches this sid + the tracked PRs

That is strictly better than both current options for a label-less session — precise rather than blind or repo-wide — and it needs no new concept, just reuse of the sid the tool already requires. For a labelled session it composes: union the label scope with the sid scope, which also fixes a smaller live gap (an issue assigned by label but CLAIMed by a session whose label was later changed).

Cheap variant if the above is too invasive: when $slabel is empty and a sid is given, fall back to the sid scope rather than to repo-wide. Behaviour for every existing caller is unchanged.

Worth deciding out loud either way

If repo-wide really is intended for a label-less session, --check should say so — one line naming the scope and its size, e.g. scope: repo-wide (130 issues) — CHANGED will fire on other sessions' traffic. Right now the state file records the scope but the decision line does not, so a session cannot tell a meaningful CHANGED from noise without running the thing --check exists to avoid.

Related: #418 (poll.py digest scoping), #560 (an unclearable wake trains sessions to ignore it), #581 (the STALE-DISPATCH arming, which independently pinned this same cadence).

Unclaimed.

Dependencies

None.

Comments

No comments.

Add a comment