You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(fleet-queue): outbox reconcile must not trust GitHub search absence — live trial 2 created a duplicate (from #3706) #8331
Fix: outbox reconcile must not trust GitHub search absence (live trial 2 duplicate)
Found by the live trials for the creation outbox pilot (#3706, task 14666, 2026-11-10) against scratch repo dezren39/fleet-outbox-trial-3706.
What happened
Trial 2 (kill/restart): entry ob-1794350127-ac5b929eacf5 was claimed by a drainer that "landed its create then died" (issue #6 on the scratch repo, created manually with the entry's marker, exactly as a crashed drainer's landed create would look). After the 120s lease expired, a fresh drain claimed the row as uncertain (correct) and ran find_by_marker — which searches via the GitHub search API. The search returned nothing for an issue created ~2.5 minutes earlier (search indexing lag), the drainer treated that as proven absence, and re-created: duplicate issue #7 with the same marker. The row resolved done against #7.
Defect
find_by_marker (pkgs/fleet/crates/fleet-queue/src/client.rs) uses GitHub search as its only source. Search is eventually consistent; "not in the index yet" is indistinguishable from "does not exist", so the reconcile path can duplicate precisely in the crash window it exists to protect (a create that landed seconds-to-minutes before the restart).
Fix direction
Before concluding absence, the reconcile must check a strongly consistent source: list the repo's recent issues via the REST list endpoint (issues list is not search-indexed) and scan bodies for the marker — at minimum the most recent N issues / issues created since the entry's lease start. Only if BOTH search and the list scan find nothing may the drainer re-create. Add an oracle test: marker present in list results but absent from search results reconciles, never duplicates.
The producer flip (new-issue-creator-code-a) stays blocked on this fix: a drainer that can duplicate in the crash window must not be the fleet's creation path yet.
Cross-link: the search leg in find_by_marker is a POST (gh api search/issues -f ...) that returns 404 every time, and a failed lookup is treated as absence — details and repro in #8361. That is the mechanism under this duplicate; index lag may still apply once the call is fixed. Comment-kind reconcile gap: #8363.
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15289 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.
So the three sibling issues split cleanly: two mechanisms fixed, this one's prescribed leg missing. Triage labels: task/small-fix, priority/normal, effort/m added (the issue had none of kind/priority/effort).
Routing — MID-SHIFT FALLBACK (backend failure)
MID-SHIFT FALLBACK: the fleet queue backend failed at the enqueue verb (broker tunnel errors on both the sandbox and laptop routes, repeatedly, from ~13:0xZ). Per runbook §0b this note carries the task's full outcome on the issue itself; the broker claim for task 15289 is superseded by this record until the backend recovers.
The follow-on fix task is fully specified and its packet is written (packet-code-8331.json, scratch of lane any-d's 2026-11-14 shift): implement the issue's own fix direction — before concluding Absent for an issue-kind entry, scan the repo's recent issues via the REST list endpoint (not search-indexed) for the marker, covering at least issues created since the entry's lease start; Absent only when both sources find nothing; any list failure/unbounded read → CouldNotCheck, never Absent. Plus the issue's oracle test (marker in list-but-not-search reconciles Found, never duplicates) and its two symmetric cases. Claim/lease semantics and the fix(fleet-queue): outbox marker search is a POST that always 404s and a failed lookup counts as 'absent' — every uncertain entry is re-created #8361/fix(fleet-queue): outbox reconcile of issue_comment/pr_comment entries can never match — search hit's issue number is read back as a comment id #8363 behavior are explicitly out of scope. The enqueue of that packet could not be confirmed before the backend failed — the next worker on this issue should enqueue it (dedupe key repo-health:v1:fix:developing-today/code:issue:8331) or work it directly.
Picked up by repo-worker-any-d — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-any-d posts progress markers; after 30 minutes of silence any other worker may pick this up.)
Released by repo-worker-any-d (outcome: done). Triaged (queue task 15289, MID-SHIFT FALLBACK after backend failure at enqueue): verified on main client.rs that #8361/#8363 fixes are in but find_by_marker still concludes Absent from search alone; follow-on fix packet fully specified on issue #8331 (note 6877322132) and preserved at goal hidden_files/pending-packet-code-8331-from-task-15289.json — enqueue pending backend recovery (dedupe repo-health:v1:fix:developing-today/code:issue:8331)
Picked up task 16859 this shift (2026-11-16T14:21Z); lane assignment row 8564 is direct, so this lane does the work itself. Fresh revalidation: issue #8331 OPEN, no hard-stop labels, already triaged (task/small-fix, priority/normal, effort/m); siblings #8361 and #8363 CLOSED; no open PR for #8331.
Next: create laptop worktree from current main, re-read find_by_marker in pkgs/fleet/crates/fleet-queue/src/client.rs, implement the REST issues-list scan leg before any Absent conclusion for issue-kind entries (CouldNotCheck on any list failure), and add the oracle tests (list-hit/search-miss -> Found; both-absent -> Absent; list failure -> CouldNotCheck).
Fixed and merged. PR #10782 (branch queue/16859-8331-outbox-list-scan, commit 6c104c5) merged as 4a80605; this issue closed by the merge.
What landed: for issue-kind entries, find_by_marker (pkgs/fleet/crates/fleet-queue/src/client.rs) no longer concludes Absent from the search leg alone. A new find_issue_in_recent_list leg pages the REST issues list (repos/{repo}/issues?state=all&sort=created&direction=desc, 100/page, 5-page bound covering the 500 most recent issues) and scans bodies for the entry's fleet-outbox marker: Found on a hit; Absent only when the scan terminates with no marker in either leg; CouldNotCheck on any list failure, misshaped page, or an unterminated listing at the bound (issues_list_unbounded) — the same discipline as #8361/#8363. Comment-kind entries and claim/lease semantics are unchanged.
Tests: 4 new oracle tests (list-hit/search-miss -> Found; both-absent -> Absent; list failure -> CouldNotCheck; list shape -> CouldNotCheck). The pre-existing checked-absent fixture was split so its stub answers the list call with an empty array; its Absent assertion is unchanged. Verified on the laptop: cargo test -p fleet-queue --all-features — 357 lib tests pass including all #8361/#8363 fixtures, integration suites pass; cargo fmt check clean. Codex review failed to run on this PR (usage limits, zero findings) and CodeRabbit was rate-limited; both dispositioned here.
Activity
developing-today commentedon Nov 10, 2026
CODE-2483
dezren39 commentedon Nov 11, 2026
Cross-link: the search leg in
find_by_markeris a POST (gh api search/issues -f ...) that returns 404 every time, and a failed lookup is treated as absence — details and repro in #8361. That is the mechanism under this duplicate; index lag may still apply once the call is fixed. Comment-kind reconcile gap: #8363.dezren39 commentedon Nov 14, 2026
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15289 moved from blocked/parked to queued in the fleet unblock-all pass (worker
main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.dezren39 commentedon Nov 14, 2026
🤖 Agent note · triaged
Verified against current main (2026-11-14)
Read
pkgs/fleet/crates/fleet-queue/src/client.rsfrom main directly.find_by_marker(line 4074):GET, and any failure returnsMarkerLookup::CouldNotCheck— a failed lookup no longer counts as absent. (fix(fleet-queue): outbox marker search is a POST that always 404s and a failed lookup counts as 'absent' — every uncertain entry is re-created #8361 CLOSED.)find_comment_on_issue, recording the comment's own id/url. (fix(fleet-queue): outbox reconcile of issue_comment/pr_comment entries can never match — search hit's issue number is read back as a comment id #8363 CLOSED.)MarkerLookup::Absentwith no REST issues-list scan anywhere. Search-index lag — the exact trial-2 condition (entryob-1794350127-ac5b929eacf5, issue created ~2.5 min before the reconcile) — still produces a false absence and a duplicate create.So the three sibling issues split cleanly: two mechanisms fixed, this one's prescribed leg missing. Triage labels:
task/small-fix,priority/normal,effort/madded (the issue had none of kind/priority/effort).Routing — MID-SHIFT FALLBACK (backend failure)
packet-code-8331.json, scratch of lane any-d's 2026-11-14 shift): implement the issue's own fix direction — before concludingAbsentfor an issue-kind entry, scan the repo's recent issues via the REST list endpoint (not search-indexed) for the marker, covering at least issues created since the entry's lease start;Absentonly when both sources find nothing; any list failure/unbounded read →CouldNotCheck, neverAbsent. Plus the issue's oracle test (marker in list-but-not-search reconcilesFound, never duplicates) and its two symmetric cases. Claim/lease semantics and the fix(fleet-queue): outbox marker search is a POST that always 404s and a failed lookup counts as 'absent' — every uncertain entry is re-created #8361/fix(fleet-queue): outbox reconcile of issue_comment/pr_comment entries can never match — search hit's issue number is read back as a comment id #8363 behavior are explicitly out of scope. The enqueue of that packet could not be confirmed before the backend failed — the next worker on this issue should enqueue it (dedupe keyrepo-health:v1:fix:developing-today/code:issue:8331) or work it directly.triaged(recorded here per §0b). Issue fix(fleet-queue): outbox reconcile must not trust GitHub search absence — live trial 2 created a duplicate (from #3706) #8331 stays open for the fix.dezren39 commentedon Nov 14, 2026
Picked up by
repo-worker-any-d— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-any-dposts progress markers; after 30 minutes of silence any other worker may pick this up.)dezren39 commentedon Nov 14, 2026
Progress from
repo-worker-any-d: triaged: outcome recorded in agent note 6877322132; releasing donedezren39 commentedon Nov 14, 2026
Released by
repo-worker-any-d(outcome: done). Triaged (queue task 15289, MID-SHIFT FALLBACK after backend failure at enqueue): verified on main client.rs that #8361/#8363 fixes are in but find_by_marker still concludes Absent from search alone; follow-on fix packet fully specified on issue #8331 (note 6877322132) and preserved at goal hidden_files/pending-packet-code-8331-from-task-15289.json — enqueue pending backend recovery (dedupe repo-health:v1:fix:developing-today/code:issue:8331)11 remaining items
dezren39 commentedon Nov 16, 2026
agent-note:v1
state: picked-up
task: 16859
issue: #8331
lane: code-c (Muse, repo-worker-code)
stage: claimed
Picked up task 16859 this shift (2026-11-16T14:21Z); lane assignment row 8564 is direct, so this lane does the work itself. Fresh revalidation: issue #8331 OPEN, no hard-stop labels, already triaged (task/small-fix, priority/normal, effort/m); siblings #8361 and #8363 CLOSED; no open PR for #8331.
Next: create laptop worktree from current main, re-read find_by_marker in pkgs/fleet/crates/fleet-queue/src/client.rs, implement the REST issues-list scan leg before any Absent conclusion for issue-kind entries (CouldNotCheck on any list failure), and add the oracle tests (list-hit/search-miss -> Found; both-absent -> Absent; list failure -> CouldNotCheck).
Merge pull request #10782 from developing-today/queue/16859-8331-outb…
dezren39 commentedon Nov 16, 2026
agent-note:v1
state: done
task: 16859
issue: #8331
lane: code-c (Muse, repo-worker-code)
stage: done
Fixed and merged. PR #10782 (branch queue/16859-8331-outbox-list-scan, commit 6c104c5) merged as 4a80605; this issue closed by the merge.
What landed: for issue-kind entries, find_by_marker (pkgs/fleet/crates/fleet-queue/src/client.rs) no longer concludes Absent from the search leg alone. A new find_issue_in_recent_list leg pages the REST issues list (repos/{repo}/issues?state=all&sort=created&direction=desc, 100/page, 5-page bound covering the 500 most recent issues) and scans bodies for the entry's fleet-outbox marker: Found on a hit; Absent only when the scan terminates with no marker in either leg; CouldNotCheck on any list failure, misshaped page, or an unterminated listing at the bound (issues_list_unbounded) — the same discipline as #8361/#8363. Comment-kind entries and claim/lease semantics are unchanged.
Tests: 4 new oracle tests (list-hit/search-miss -> Found; both-absent -> Absent; list failure -> CouldNotCheck; list shape -> CouldNotCheck). The pre-existing checked-absent fixture was split so its stub answers the list call with an empty array; its Absent assertion is unchanged. Verified on the laptop: cargo test -p fleet-queue --all-features — 357 lib tests pass including all #8361/#8363 fixtures, integration suites pass; cargo fmt check clean. Codex review failed to run on this PR (usage limits, zero findings) and CodeRabbit was rate-limited; both dispositioned here.