Issue #248's acceptance 4 (median pickup latency) needs a cross-source "first visible" event before it is measurable
Id: TD-PPagop-26081405 · Status: resolved · Filed: 2026-08-14 · Resolved: 2026-08-14 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/399
tech-debt/TD-PPagop-26080808.md answered acceptance 5 (no increase in duplicate-work
incidents) from data the union log already carries, and recorded stage 3
(event-driven dispatch) in docs/ROADMAP.md. Acceptance 4 is the one piece
of issue #248 it deliberately left undone:
median time from “item enters a source” to “claimed” under 20 minutes with more than one active node
Why the log cannot answer this today
Section titled “Why the log cannot answer this today”A selection event marks the end of the interval — the item’s claimed
branch — but nothing marks the start. The union log has no event for “this
item became visible to a gather”, so there is no pair to subtract. Unlike
acceptance 5, this is not a query away: it needs a new event, emitted the
first time an item is seen.
Why that is a design job, not a bolt-on
Section titled “Why that is a design job, not a bolt-on”“First visible” has to mean the same thing across sources gathered on very different cadences, or the interval it produces compares nothing meaningful:
- Poll-based sources (
tech-debt,issues,security,code-quality,register-hygiene, and the rest ofscripts/gather-*.sh) re-read their target every cycle. An item’s first appearance in a gather’s own output is a reasonable proxy for “entered the source” — but only if every node’s gather agrees on it closely enough that the interval isn’t dominated by which node happened to look first. - Event-native sources, once stage 3 above lands (webhooks, or the state- repo poller), would have an actual point-in-time event to anchor on instead of “first noticed by a poll” — a strictly better answer for those sources, and a reason not to freeze a poll-shaped definition into every source before that mechanism exists.
- Recurring visibility — an item that was seen, went stale or got
filtered out (e.g.
refinement_policy, back-pressure), and reappears later — has to resolve to one first-seen timestamp, not the most recent reappearance, or the interval undercounts exactly the items that took longest to claim. - The timestamp needs state that survives a cycle: the Script (never the
model, per the claim discipline requirement 17a already establishes) has
to remember an item’s first-seen time across cycles and across nodes, the
same “shared state, never a local checkout” discipline
TECH-DEBT.md’s claiming workflow already applies to item claims.
Suggested shape (not a commitment — the design is the open question)
Section titled “Suggested shape (not a commitment — the design is the open question)”A new log event, written once per item the first time any node’s gather
reports it — first-seen or similar, carrying repo, item, source and
ts — read back the same way claim-lost/selection already are (union
log, most-recent-or-first-wins reduction) so a later cycle’s write is a
no-op rather than a fresh timestamp. scripts/pickup-metrics.sh
(tech-debt/TD-PPagop-26080808.md, component 21 of
docs/IMPLEMENTATION-PIPELINE-SPEC.md) is the natural place to extend once
the event exists: it already reads the union log read-only and already
reports a before/after split per node.
Where: docs/IMPLEMENTATION-PIPELINE-SPEC.md (the Script’s requirements,
the events list of requirement 33), scripts/gather-*.sh (every poll-based
source), agent-cycle.sh’s gather step, and scripts/pickup-metrics.sh
once the event lands. Issue #248’s own acceptance text, and
tech-debt/TD-PPagop-26080808.md which deferred this piece.