GeezerVison is showing github.com — 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 · Issue #8361 · developing-today/code
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 #8361DescriptionProblem
The creation-outbox drainer's marker reconciliation (GhCreator::find_by_marker, pkgs/fleet/crates/fleet-queue/src/client.rs:2589-2608) can never find anything, and a failed lookup is indistinguishable from "proven absent". Every uncertain entry (ambiguous create, failed read-back, expired lease after a drainer crash) is therefore re-created, which is the duplicate-in-the-crash-window failure the outbox exists to prevent (#3706).
Evidence (verified on origin/main fb97fae, gh 2.102.0, laptop)
- The search call is
gh api search/issues -f q=... (client.rs:2593-2598). gh api switches to POST when any -f field is present, and /search/issues has no POST route:
$ gh api search/issues -f 'q=repo:dezren39/fleet-outbox-trial-3706 fleet-outbox:ob-1794350127-ac5b929eacf5' --include | head -1
HTTP/2.0 404 Not Found (exit 1)
$ gh api search/issues -f 'q=repo:developing-today/code fleet-outbox' # public repo: same 404
$ gh api search/issues --method GET -f 'q=repo:dezren39/fleet-outbox-trial-3706 fleet-outbox:ob-1794350127-ac5b929eacf5' --jq .total_count
2 # issues #6 and #7, the trial-2 pair
-
gh_json (client.rs:2430-2436) maps any non-zero exit to None and discards stderr; find_by_marker ?-propagates it, so a 404, a 403/429, or a network error all return None. The drain loop (client.rs:2636-2656) reads None as "Marker search proves absence: fall through and re-create". The lookup fails open on the duplicate-protection path.
-
Consequence for fix(fleet-queue): outbox reconcile must not trust GitHub search absence — live trial 2 created a duplicate (from #3706) #8331: its live trial 2 attributed the duplicate (Bump build/buck/preludes/buck2-prelude from 3a02ea3 to c77fc97 #7 after Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 4371899 #6) to GitHub search indexing lag. The search leg cannot succeed at all with this argv, so the duplicate happens on every reconcile regardless of index freshness. The marker search is healthy with a GET (above). Adding a REST list-scan fallback, as fix(fleet-queue): outbox reconcile must not trust GitHub search absence — live trial 2 created a duplicate (from #3706) #8331 proposes, would hide this dead call rather than repair it, and the error-as-absence behaviour would remain.
-
No test can see it: GhCreator is hard-wired to Command::new("gh") (client.rs:2420) with no seam, and nothing references GhCreator, find_by_marker or read_back outside src/client.rs. The 13 creation_outbox tests (pass on main) use FakeCreator, whose find_by_marker scans in-memory bodies, so the "kill/restart reconciles by marker" trial passes while the production leg is dead.
Acceptance criteria
Filed by improvement-issue-creator; filed only, not enqueued. Activitydeveloping-today commented on Nov 11, 2026 dezren39 commented on Nov 11, 2026
🤖 Agent note · triaged
- Agent: triage-step
- State: triaged
- Work kind:
task/small-fix — a bounded code fix in GhCreator::find_by_marker / gh_json in pkgs/fleet/crates/fleet-queue/src/client.rs.
- Priority:
priority/high (already present, kept) — why: Drew's priorities brief line 1 (keep the fleet itself able to work): the fleet-queue creation-outbox's duplicate-protection reconcile is dead — the marker search is a POST that always 404s and a failed lookup counts as absent, so every uncertain entry is re-created. Not critical: main and the queue still operate; duplicates occur only in the uncertain/crash window. Ranked otherwise by usefulness under brief line 5.
- Effort:
effort/s (already present, kept; <2h). Kind: kind/bug (already present).
- First concrete step: add the
gh seam to GhCreator (binary override or injected runner, client.rs:2420) and a failing test asserting the search argv is a GET, before changing find_by_marker.
- Acceptance check: marker search issued as a GET and finds a landed marker; the lookup is three-way found / checked-and-absent / could-not-check, with could-not-check (any non-2xx, transport error, unparseable JSON) leaving the entry
uncertain with backoff, never re-creating, and the stderr class recorded in last_error_class; stubbed-gh tests cover GET argv, 404/403 = could-not-check, and a landed marker found. Companion: 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 (comment kinds), mechanism under fix(fleet-queue): outbox reconcile must not trust GitHub search absence — live trial 2 created a duplicate (from #3706) #8331.
- Fix packet:
repo-health-code-pilot task 14807 (dedupe repo-health:v1:fix:developing-today/code:issue:8361, priority 20), validated and enqueued this run; queue signal refreshed.
- Labels:
status/needs-triage and task/triage removed; task/small-fix, priority/high, effort/s, kind/bug in place; queue/ labels left as found.
dezren39 commented on Nov 11, 2026 🤖 Agent note · picked up (resume) — lane code-k (repo-worker-code), task 14807 (small_fix): the fix for issue #8361 already exists — commit ca33ea0 on branch queue/14807-8361-marker-search-get, PR #8389 OPEN, prior Codex review completed with no findings. Per anti-evaporation §10 (resume, don't restart): rebased the PR cleanly onto current main (1a49ce4; client.rs only, +291/-39), re-running the fleet-queue suite on the rebased head, then merge on green.
dezren39 commented on Nov 11, 2026 🤖 Agent note · done — lane code-k (repo-worker-code), task 14807 (small_fix): PR #8389 merged (33bb1da); issue #8361 closed. This was a resume, not a restart: the prior claim had already written the fix (GET marker search, three-way MarkerLookup, GhCreator runner seam + tests) and opened PR #8389; this pass rebased it onto current main (1a49ce4), re-verified (cargo test -p fleet-queue --all-features: 197 passed / 0 failed; one spawn_failed flake in marker_search_failed_candidate_readback_is_could_not_check on the first run — passes 3/3 in isolation and in the full-suite rerun), and landed it after the Codex re-review of the rebased head completed with no findings.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|