Firmer per-leg host attribution for the dispatcher queued-run read (jobs web-JSON witness) — deferred from #376 #377

Open
opened 2026-11-20 01:20:58 +00:00 by matou-build-agent · 0 comments

This was generated by AI during triage.

Carved out of #376 (item 3) during triage as defer-with-criteria under ADR 0174, so the follow-up is durably tracked rather than lost when #376 closes on its buildable items (1 and 2).

The deferred item

Firmer per-leg host attribution for the dispatcher's queued-run read. Today fleet-dispatch-lib.sh attributes a waiting run to a host by the host token appearing in the run's display_title/name (the per-host leg is runs-on: <host>, GOTCHAS 62). actions/runs carries no per-job/label breakdown, so this is best-effort and fails open (an unattributable run withholds nothing). A firmer witness is the jobs web-JSON (POST <forge>/<repo>/actions/runs/<n>/jobs/0, GOTCHAS 78) — one call per candidate run, so it must stay bounded.

Ruled: DEFERRED (agent, ADR 0174 — veto anytime)

Why defer, not build now: the current title-based attribution fails open — its worst case is withholding nothing (a missed backpressure signal), never a wrong withhold. Adding a bounded-but-non-trivial per-run jobs-JSON call to every dispatcher pass is only justified once the cheap path is shown to be too loose in practice. Building it speculatively spends tracker calls on a precision we have no evidence we need.

Revisit criterion: the title/display_title attribution proves too loose in the live fleet-wide rollout — i.e. the dispatcher is observed either (a) withholding a host whose backed-up leg was actually a different host's run misattributed by a shared token, or (b) failing to withhold a genuinely backed-up host because its leg was unattributable. Evidence = a dispatcher log line or a reproduced mis-attribution.

Two-way door: switching the witness from title-match to jobs-JSON is a revertible code change in fleet-dispatch-lib.sh, provable by tests/fleet-dispatch-lib-test.sh. Not on the one-way-door list.

When the criterion fires, a human removes deferred and relabels for the pipeline.

Context: #376, #373, GOTCHAS 62, GOTCHAS 78, ADR 0009.

> *This was generated by AI during triage.* Carved out of #376 (**item 3**) during triage as **defer-with-criteria** under ADR 0174, so the follow-up is durably tracked rather than lost when #376 closes on its buildable items (1 and 2). ## The deferred item Firmer per-leg host attribution for the dispatcher's queued-run read. Today `fleet-dispatch-lib.sh` attributes a `waiting` run to a host by the host token appearing in the run's `display_title`/`name` (the per-host leg is `runs-on: <host>`, GOTCHAS 62). `actions/runs` carries no per-job/label breakdown, so this is best-effort and **fails open** (an unattributable run withholds nothing). A firmer witness is the jobs web-JSON (`POST <forge>/<repo>/actions/runs/<n>/jobs/0`, GOTCHAS 78) — one call per candidate run, so it must stay bounded. ## Ruled: DEFERRED (agent, ADR 0174 — veto anytime) **Why defer, not build now:** the current title-based attribution fails *open* — its worst case is withholding nothing (a missed backpressure signal), never a wrong withhold. Adding a bounded-but-non-trivial per-run jobs-JSON call to every dispatcher pass is only justified once the cheap path is shown to be too loose in practice. Building it speculatively spends tracker calls on a precision we have no evidence we need. **Revisit criterion:** the title/`display_title` attribution proves too loose in the live fleet-wide rollout — i.e. the dispatcher is observed either (a) withholding a host whose backed-up leg was actually a *different* host's run misattributed by a shared token, or (b) failing to withhold a genuinely backed-up host because its leg was unattributable. Evidence = a dispatcher log line or a reproduced mis-attribution. **Two-way door:** switching the witness from title-match to jobs-JSON is a revertible code change in `fleet-dispatch-lib.sh`, provable by `tests/fleet-dispatch-lib-test.sh`. Not on the one-way-door list. When the criterion fires, a human removes `deferred` and relabels for the pipeline. Context: #376, #373, GOTCHAS 62, GOTCHAS 78, ADR 0009.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#377
No description provided.