Skip to content

gh credential-cache daemon resilience + Cloudflare tier + fleet gh fallback chain #16826

Done

Description

@developing-today-fleet

Programme issue — Drew's order, 2026-11-29 08:31 CST. Sibling, not duplicate: #16762 is the queue-broker incident; this is the gh credential path (code#10742 cache daemons).

What happened (verified 2026-11-29, main sandbox seat)

  • ~14:06Z the sandbox's network fabric wedged: the egress proxy accepts TCP but never returns HTTP responses (api.github.com, cloudflare.com, workers.dev, turso all time out at 15–45s), and connects to the laptop tailnet IP (100.99.113.103) fail with EPERM.
  • The local gh cache daemon (fleet gh cache-serve, 127.0.0.1:4802, pid 102730, started 14:14Z) stayed alive and listening, but its GitHub App installation-token mint — an HTTPS call to api.github.com — hung with no effective timeout. Token requests single-flight behind a mint, so every request queued behind the stuck one: 322 threads / 327 fds, 321 threads parked in futex_do_wait. fleet gh api rate_limit produced no output in 45–60s. The closure watchdog died on it twice ("no cache daemon answered (tried 127.0.0.1:4802, 100.99.113.103:4802)"); a 45s fleet gh api call returned nothing.
  • Killing the daemon and respawning it via init-ensure changed nothing: a fresh daemon wedges identically on its first mint while egress is dead (verified — pid 131325, cache-status UP with entries=0, misses climbing).
  • Supervision gap, two layers: (1) init-ensure's daemon leg gated on process exists + TCP port accepts, which a wedged daemon passes. (2) Worse, the leg's spawn inherited the flock'd ensure-lock fd — a running daemon was found holding fd 9 → .daemon-ensure.lock (/proc/<pid>/fd), so flock -n failed on every subsequent init-ensure run and the leg could never act while any daemon it spawned was alive. The leg was structurally incapable of restarting a wedged daemon; it only ever worked after the daemon had fully died. The daemon also logs nothing but its startup line.

Root defects:

  1. cache-serve's upstream mint has no bounded timeout.
  2. The single-flight mint wait is unbounded — one stuck mint blocks every token request.
  3. Client-side per-tier failover is so slow it is indistinguishable from a hang.
  4. Only two tiers exist (local daemon, laptop daemon) and both ride the same local fabric that failed.

Drew's design (2026-11-29)

"fix the gh daemon. migrate it to cloudflare. if anything it's fine to be on laptop but should auto fallback to cloudflare with no downtime."
"gh daemon can run in each sandbox too"
"local sandbox then laptop then up to cloudflare then direct. fleet gh does this immediately and then if all that fails the local agent can retry with gh or curl api or something directly with each secret."

The chain fleet gh must walk, failing over immediately and automatically (a tier that accepts but never answers must fail over too — today's wedge was a hang, not a refusal):

  1. Local sandbox daemon — fleet gh cache-serve in each sandbox (127.0.0.1:4802).
  2. Laptop daemon — 100.99.113.103:4802.
  3. Cloudflare — the token-mint/cache function hosted as a Cloudflare Worker (fleet-gh-cache), serving installation tokens over authenticated HTTPS.
  4. Direct — fleet gh resolves tokens in-process (App mint, then personal tokens) and talks to api.github.com itself.
  5. Agent last resort (not a fleet gh tier): the local agent retries with plain gh or curl against the API directly, rotating each token source (App installations first, personal last — the existing fleet rotation), secrets fetched by name from the secrets broker (fleet secrets get <name>), never printed or logged. Runbook: this issue + fleet docs.

Work items

  • Daemon timeouts (pkgs/fleet, cache-serve): bound the upstream mint (HTTP connect + total timeout); bound how long a request may wait on an in-flight mint before the cached-failure path answers; keep failure caching (<60s) semantics.
  • Client chain (pkgs/fleet, fleet gh): tiers 1→2→3→4 with short per-tier timeouts (connect ~2s, daemon request ~5s, CF request ~8s, mint ~15s — final numbers in the design doc); an https:// entry kind in the FLEET_GH_CACHE / --cache-addr list for the CF tier; fleet.toml [gh] config for the CF endpoint (GhConfig already carries cache_local/cache_laptop); per-tier negative caching 30–60s; cache-status covers the CF tier.
  • Cloudflare tier: Worker fleet-gh-cache (pm-notify is the repo's model Worker): mints App installation tokens (App private key as a Worker secret, set from the broker by name via the sanctioned cf binary route — never wrangler directly, never values in files/logs), caches until expiry−5min, serves GET /token (bearer-authenticated) + GET /health. Credential names on record: github-app.developing-today-fleet.private-key; precedent pair github-app.backup-worker-bearer / github-app.backup-worker-url.
  • Supervision: init-ensure's gh-cache leg fixed locally 2026-11-29 and verified (wedged-daemon simulation: STOPped daemon killed and respawned by init-ensure alone, ~9s): gate is now the protocol probe (fleet gh cache-status local line = UP), wedged incumbents are stopped with an exe-verified SIGKILL, and the spawn closes fd 9 (9>&-) so the daemon no longer inherits the ensure lock. Upstream the same three changes to every maintained copy of init-ensure (the hatch-personal copy spawns daemons on other seats with the same fd bug — a daemon on this seat was observed logging to hatch-personal/logs/, spawned by that copy).
  • Agent last-resort runbook: token-source rotation list reused from fleet gh's own credential logic (no second list); broker-by-name fetch; gh-orig / curl recipes; recorded in the fleet docs and linked here.
  • End-to-end verification, with timings: (1) local daemon healthy → answer via tier 1; (2) local daemon stopped → answer via tier 2/3 with no manual step; (3) laptop unreachable → answer via Cloudflare or direct; (4) observed failover timings per tier recorded on this issue.

Evidence pointers

  • Daemon state at diagnosis: pid 102730, 322 threads, 327 fds, log = startup lines only (~/logs/gh-cache-daemon.log).
  • fleet gh cache-status during the wedge (fresh daemon): 127.0.0.1:4802 UP entries=0 hits=0 misses=15+ min_ttl=0s; laptop DOWN ... Operation not permitted (os error 1).
  • Egress probes 2026-11-29 14:26–14:40Z: proxy port (hatch-egress-proxy:3128) accepts TCP; HTTP to api.github.com / cloudflare.com / pm-notify.workers.dev / fleet-platform turso all 000 at 12–45s; direct (no-proxy) connections time out (egress is proxy-only).

Acceptance

All four tiers implemented and verified end-to-end with timings recorded here; a stopped or hung local daemon no longer stalls fleet gh beyond the tier budget; the runbook is in the fleet docs.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T14:49:43Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Acceptance criteria

  • The gh credential-cache daemon's token mint has an effective timeout; a hung mint cannot single-flight-block all later requests indefinitely.
  • Daemon supervision detects a wedged (alive but non-answering) daemon, not only a dead process / closed port, and can restart it — including the ensure-lock fd inheritance defect described in the body.
  • A fallback chain (e.g. Cloudflare tier / direct fleet gh path) serves gh calls when the local cache daemon is wedged, with the fallback's use visible in logs.
  • A wedged-daemon drill (egress blocked) shows gh calls either succeeding via fallback or failing fast with a clear error — never hanging 45s+ with no output.

Activity

  1. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Progress record — 2026-11-29 (coordinator)

    Phase A — local daemon: FIXED and verified locally

    Diagnosis (main sandbox seat, 14:26–15:05Z):

    • Wedged daemon pid 102730: listening on 127.0.0.1:4802, 322 threads / 327 fds, 321 threads parked in futex_do_wait behind one unbounded installation-token mint; log contained startup lines only. SIGTERM exited it cleanly in 1s — the request path, not the process, was stuck.
    • A fresh daemon wedged identically while egress was down (entries=0, misses climbing, cache-status protocol probe still answering in ~44ms — the status path does not mint, so the daemon looked healthy to every existing check).
    • Root cause of the supervision failure, found by simulation: the init-ensure gh-cache leg gated on process+TCP-accept, and its spawn inherited the flock'd ensure-lock fd — the running daemon held fd 9 → ~/.cache/gh-cache/.daemon-ensure.lock, so flock -n failed on every later init-ensure run and the leg could never restart a live-but-wedged daemon. It only ever worked after the daemon had fully died.

    Fixes landed in this seat's ~/tools/init-ensure.sh (upstream to every maintained copy — see checklist):

    1. Gate is now the protocol probe: fleet gh cache-status local line must read UP (bounded 5s).
    2. A not-UP incumbent is stopped with an exe-verified SIGKILL (TERM can pend forever on a stopped/wedged process; the cache is soft state).
    3. The spawn closes fd 9 (9>&-) so the daemon no longer inherits the ensure lock.

    Verified end-to-end on this seat:

    • Healthy daemon (pid 140095 lineage) is left untouched by init-ensure; flock is free while it runs; daemon holds 4 fds, none of them the lock.
    • Simulated wedge (SIGSTOP): init-ensure alone killed and respawned the daemon in ~9.4s; cache-status UP afterwards.
    • After the fabric recovered (~15:0xZ): daemon minted and now serves from cache — 127.0.0.1:4802 UP entries=6 kinds:[installations=2 token:<redacted>] hits=310 min_ttl=228s.

    Failover timings measured today (current binary — the "before" baseline)

    Scenario Result Time
    Tier 1 healthy, cold (incl. mint) answered via daemon 12.1s
    Tier 1 healthy, warm answered via daemon 15.4s (fabric still flappy)
    Tier 1 dead (connect refused) → in-process answered 38.3s
    Tier 2 only (laptop EPERM) → in-process answered 63.3s
    Tier 1 wedged (accepts, never answers) → anything no answer in 60s ∞ (the bug)

    Failover exists but is nowhere near immediate, and the wedged-tier case is unbounded — exactly what the chain work (per-tier timeouts: connect 2s / daemon request 5s / CF 8s / mint 15s / single-flight wait 10s) is designed to close. Design + file-by-file patch plan are written and will land with the implementation PR.

    Fabric note

    The sandbox egress fabric itself was down ~14:06–15:0xZ (proxy accepted TCP, never responded; tailnet EPERM) and is still flappy (one GraphQL stream CANCEL during this issue's first create attempt; the create was verified not-landed and retried). GitHub itself was never down — in-process fleet gh answered throughout the recovery window.

    Remaining

    • Cloudflare tier (fleet-gh-cache Worker): package built (src, wrangler.toml, deploy.sh, verify.sh), deploy via the sanctioned cf route being attempted now that egress is back; result recorded here.
    • Chain implementation in pkgs/fleet: dispatched against the design/patch plan; PR recorded here when opened.
    • Agent last-resort runbook: written (tier-5 rotation reusing fleet's own source order; broker-by-name fetches; gh-orig/curl recipes) — lands in the fleet docs with the implementation PR.
  2. added
    priority/high
    on Nov 29, 2026
  3. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    fleet-gh-cache (tier 3) — DEPLOYED + verified 2026-11-29

    Endpoints (both live, both verified):

    Installations configured (public config, in wrangler.toml + cloudflare.config.ts):

    • developing-today → 178567642 (this is DEFAULT_INSTALLATION_ID)
    • developing-today-forks → 178568091
    • dezren39 → 181169681

    fleet gh api /app/installations timed out repeatedly (60s, ×3 — the daemon tiers are the incident this tier exists for), so the IDs were read via a direct App-JWT GET /app/installations (key by broker name, in-process only; paginated, 103 installations).

    Bearer: created in Bitwarden Secrets as github-app.fleet-gh-cache-worker-bearer (id a443b1f4-f434-4da4-bf55-b51100f641c1, project developing today); broker-verified by name (fleet secrets list shows it; fleet secrets get resolves it). Worker URL recorded as github-app.fleet-gh-cache-worker-url (id 7733a07d-9d6e-4fac-98fe-b51101087f66) = https://gh-cache.security.cab. No secret value appears in this comment, any file, or any log.

    Verification (verify.sh, evidence logs in ~/workspace/gh-chain-2026-11-29/cf-worker/evidence/):

    • workers.dev: GET /health 200 {"ok":true}; authenticated GET /token → token present, expires_at: 2026-11-29T17:02:01Z; unauthenticated /token → HTTP 401.
    • gh-cache.security.cab: same three results (expires_at: 2026-11-29T17:02:29Z).
    • Resolution modes all mint: default, ?owner=dezren39, ?owner=developing-today-forks, ?installation=178567642.

    Custom domain: cf zones list under the deploying token shows the security.cab zone held by this account (zone d9632853730f95d9c252c7c637051fe7, active), so the route was enabled: uncommented in wrangler.toml, mirrored as domains: ["gh-cache.security.cab"] + workersDev: true in cloudflare.config.ts, redeployed once.

    Deploy-route findings (the package was built against an older cf/wrangler than this seat has):

    1. The installed cf requires wrangler ≥ 4.136.0 with the cf delegate; the package pinned 4.59.1. npm registry egress was too flappy to install (three runs, 600–840s timeouts), so node_modules was populated from the machine's existing wrangler 4.147.0 tree (~/tools/wrangler) and the cf 1.0.0-beta.20 package (~/tools/cf). package.json updated accordingly (wrangler: ^4.147.0, cf: 1.0.0-beta.20, type: module). package-lock.json is now stale vs package.json — regenerate on the next npm-capable pass.
    2. The cf versions flow requires cloudflare.config.ts — added, mirroring wrangler.toml (precedent: atlas-search / queue-transport-alert workers). src/index.ts is unchanged.
    3. A new Worker's first deploy cannot preset secret bindings: the first deploy was run as cf deploy --secrets-file <FIFO> (broker → FIFO, deploy.sh's own technique, per cf's error guidance); after that ./deploy.sh ran clean end-to-end (exit 0, code + secrets steps).
    4. Bug found + fixed: fleet secrets get appends a trailing newline, and deploy.sh's … | jq -Rs . pipeline encoded that newline into the stored WORKER_BEARER secret — authenticated /token returned 401 while the Bitwarden value (64 chars, no newline) was correct. deploy.sh's writer in the package copy is patched (capture via $(), printf '%s'), the live secrets were re-set trimmed, and verification then passed. Any other seat deploying from an unpatched copy will reintroduce this.
    5. deploy.sh auth-gate flakiness: cf auth whoami intermittently exits 0 while reporting authenticated: false, so deploy.sh skipped loading the broker token and cf deploy failed with "No authentication token found". Workaround used: pre-set CLOUDFLARE_API_TOKEN from the broker (name cloudflare.api-token-day-to-day) in the environment. Recommend deploy.sh check the whoami JSON body, not its exit code.

    Still open:

    • Client side: fleet gh does not consume tier 3 yet (resolve github-app.fleet-gh-cache-worker-url / -bearer by name, GET /token, cache to expiry−5min) — separate implementation work.
    • package-lock.json regeneration (item 1).
    • Optional KV mirror (GH_CACHE_KV) not enabled; in-isolate cache only, as designed for v1.
  4. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Implementation progress (fleet gh fallback chain lane, 2026-11-29):

    PR: #16833 — branch feat/gh-fallback-chain, commit 7af1f0cb0, base = origin/main d6f820792 (2026-11-29 12:40Z; a fresh fetch was attempted and hit the day's flaky egress, CANCEL).

    Implemented per the design + patch plan in ~/workspace/gh-chain-2026-11-29/fleet-chain/ (seat-local copies; design landed in the PR at pkgs/fleet/docs/fleet-gh-fallback-chain-design.md, runbook at pkgs/fleet/docs/runbook-agent-last-resort.md):

    • Chain walk T1 local daemon → T2 laptop daemon → T3 Cloudflare GET /token (HTTPS entry kind in --cache-addr/FLEET_GH_CACHE; [gh] cache_cf_url + cache_cf_token_name — broker NAME only; env overrides) → T4 in-process. Budgets: connect 2s, daemon request 5s (was 60s), CF 8s, mint upstream 15s/5s connect, single-flight wait 10s, failure caches 30s (client stamp: connect 60s).
    • Daemon: bounded single-flight wait (waiter gets the cached-failure answer; mint continues on its own thread and caches), failure cache added at 30s, bounded mint via the shared RawMinter agent (covers daemon + tier 4).
    • Client: in-walk failure memo + cross-invocation stamp file ~/.cache/fleet/gh-tier-failures.json (tier id/class/timestamp only); ALL-DOWN error names every tier + class; cache-status CF line (UP/DOWN/NOT-CONFIGURED), exit 3 only when no tier answered.
    • 14 new tests across fleet-config, gh_cache, gh::chain, gh (walk), gh::cache_serve.

    Deviations from the patch plan (real source disagreed):

    1. Crate is synchronous (std threads + ureq + Condvar, no tokio/reqwest) — bounds expressed as TcpStream read timeouts, ureq agent timeouts, Condvar wait_timeout.
    2. The shipped daemon had NO failure cache to align from <60s — one was added at the design's 30s.
    3. Broker resolution already bounded in fleet-secrets (BROKER_ATTEMPT_TIMEOUT = 10s); kept, per design §5's allowance.
    4. A daemon error answer no longer ends the walk (pre-existing code treated it as authoritative) — the next tier is tried; daemon-error answers are neither memoised nor stamped.
    5. Tier 3 consumed once per invocation; fleet-App candidates pass ?owner= (the Worker lane's contract) to select their installation.
    6. Docs landed in pkgs/fleet/docs/, not doc/agents/: this seat's checkout is sparse (pkgs/fleet only) and three bounded sparse-expansion attempts failed on flaky egress. fleet-gh-credentials.md cross-links both docs.

    Verification status: PR checks are only CodeRabbit/Proof (skipping). Remote build/test attempts so far: fleet actions exec start → broker tunnel to laptop EPERM (same tailnet policy block as tier 2); fleet queue dispatch (auto + github runner) → HTTP 403 Resource not accessible by integration on the fleet-forks surface; one fleet-org dispatch attempt timed out locally with outcome being verified before any re-dispatch. PR stays OPEN until tests are verified; evidence will be added here.

  5. added
    kind/infrastructure
    status/needs-triage
    effort/l
    app/fleet
    source/agent
    meta/enriched
    on Nov 29, 2026
  6. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Intake review

    Related: issue #16762 (queue-broker incident — sibling, not duplicate), issue #10742 (cache daemons).

    Notes: Still live — programme issue from Drew's 2026-11-29 order; the body verifies the wedge firsthand on the sandbox seat (hung token mint, 322 threads parked, supervision leg structurally unable to restart a wedged daemon). No merged PR in the evidence addresses the mint timeout, the flock-fd defect, or a fallback tier. Acceptance criteria were missing from the body and have been appended by this pass.

    Risks: multi-part programme (daemon resilience + Cloudflare tier + fallback chain) — likely needs splitting into implementation slices before queue work; the secrets/credential path makes changes here higher-blast-radius than a normal fleet fix.

    Suggested approach: slice it — (1) mint timeout + wedged-daemon health check + lock-fd fix, (2) fallback chain, (3) Cloudflare tier — and land (1) first since it unblocks supervision.

    🤖 Agent note · state: filed

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-29 14:14 CST
    • Found via: monitor reconciliation
    • Task: Intake enrichment (§5 pass) for this issue
    • Expectation: effort/l; done = AC appended, labels normalized, intake review posted, meta/enriched applied
    • Links: n/a
  7. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Claim — Felix lane 0640-DL (2026-11-29). Taking the verification slice of #16826's remainder: (1) read the merged PR #16833 cache-serve changes on current main and confirm both bounds exist — the upstream mint timeout AND a bounded wait on an in-flight (single-flight) mint, with failure-caching semantics kept; (2) execute the pkgs/fleet gh/cache test surface remotely (fleet-command) and read executed counts; (3) probe tier 1 from this seat with timings (fleet gh cache-status, timed fleet gh api rate_limit). The supervision-upstreaming work item (hatch-personal init-ensure copy) is being premise-checked separately by this lane. Live tier-2 failover timings remain gated on the laptop (code#16762). Priority validation: priority/high confirmed — important and time-sensitive (today's wedge is the evidence); no change.

  8. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Progress — Felix lane 0640-DL (2026-11-29): daemon-bounds verification (code-read) + tier-1 timings + supervision upstream PR.

    1. Daemon bounds — VERIFIED IN CODE on current main (PR #16833, merged 16:08Z). Read firsthand at main:

    • gh_cache.rs: MINT_UPSTREAM_TIMEOUT = 15s, MINT_CONNECT_TIMEOUT = 5s, SINGLE_FLIGHT_WAIT = 10s, FAILURE_TTL_SECS = 30. Cache::get_or_mint bounds every waiter by the single-flight wait; a waiter whose budget expires receives the cached-failure shape while the minter's own thread carries the mint to its bounded end and populates the cache — one stuck mint can no longer convoy later requests (the 2026-11-29 wedge shape).
    • gh.rs:1087-1089: the mint's ureq agent is built with timeout_global(MINT_UPSTREAM_TIMEOUT) + timeout_connect(MINT_CONNECT_TIMEOUT) — the constants are wired, not decorative.
    • Tier budgets in the same file: connect 2s / daemon 5s / CF 8s; status probes 2s TCP / 3s CF.
    • A dedicated regression test exists: gh_cache::tests::single_flight_wait_is_bounded_and_mint_lands_detached. Executed-count confirmation is dispatched as fleet-command run 46313322796 (cargo test -p fleet --lib gh from pkgs/fleet, realised OpenSSL env) — verdict to follow on this issue when it finalizes.

    2. Tier-1 timings from this seat (2026-11-29 ~21:44Z): fleet gh cache-status answered in 0.37s — local line 127.0.0.1:4802 UP entries=10 hits=8422 misses=61 min_ttl=12s uptime=3638s; laptop line DOWN (os error 1, code#16762). A timed fleet gh api rate_limit answered in 3.1s via tier 1 (Apps pool, core remaining 4681). Caveat: this seat's daemon is still the 2026-11-24 fleet build (pre-#16833) — the bounded-mint code takes effect here only when the seat's fleet binary refreshes (parent-Felix item); the timings measure the chain's tier-1 behaviour, not the new daemon code. Tier-2/3 failover timings remain gated on the laptop leg.

    3. Supervision upstreaming — PR #16986 OPEN. The canonical copy (scripts/muse/init-ensure.sh on main) still carried the pre-fix leg (pgrep + TCP-port gate, no wedged stop, spawn inheriting fd 9). PR #16986 applies the three fixes there: protocol-probe gate (cache-status local line UP), exe-verified SIGKILL of non-serving incumbents, 9>&- on the spawn line. One file, +30/−3, bash -n clean, probe pattern verified against live daemon output. Note for the seat owner: this seat's live ~/tools/init-ensure.sh has diverged the other way (it carries the 2026-11-23 stale-exe restart but NOT these three fixes) — worth reconciling when the binary refresh lands.

    Remaining on #16826 after this: the run-46313322796 verdict (this lane), end-to-end failover timings for tiers 2–4 (laptop-gated), and the hatch-personal install-profile copy of the supervision leg if one is maintained there (the boot-hook init.sh carries no gh-cache leg — checked). Priority/high confirmed, no change.

  9. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Run 46313322796 — EXECUTED but selection-missed; NOT evidence for the gh bounds (lane 0640-DL). Full log read firsthand: checkout at main 0ba7310, command as dispatched, conclusion success. But cargo test -p fleet --lib gh selected the fleet package's LIB target (48 tests), where the filter gh matched only 2 id_proxy tests (both pass; their names contain 'gh' via 'through'). The gh_cache / gh::chain / gh::cache_serve tests live in the fleet BINARY target — zero of them executed. Corrected re-dispatch: run 46314087550 (cargo test -p fleet --bins gh, same OpenSSL env). The single-flight verdict waits on that run's log. (Side observation from the same log: the #16956 'Report dispatch error' step is present in the fleet-command action and correctly skipped on success.)

  10. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Shepherd-merged — lane 1522-G (2026-11-29). PR #16986 merged (b2cb4d0) under Drew's merge rule: full diff read firsthand by this lane (protocol-probe gate replacing the TCP-port check, exe-verified SIGKILL of a wedged incumbent, fd-9 closed on the daemon spawn, +x) and Felix 0640-DS's firsthand verdict (21:46:41Z, merge-ready) as the verification of record; PR CLEAN/MERGEABLE on two agreeing reads at head 86fff1e.

  11. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Verdict — Felix lane 0640-DL (2026-11-29): the daemon-bounds acceptance criterion is PROVEN by executed remote tests. One chain test fails; adjudication experiment in flight.

    Run 46314087550 full log read firsthand (main @ 0ba7310, cargo test -p fleet --bins gh from pkgs/fleet, realised OpenSSL env): 130 passed / 1 failed / 168 filtered. All 11 gh_cache::tests pass by name, including the ones that pin this issue's acceptance criteria:

    • single_flight_wait_is_bounded_and_mint_lands_detached ... ok — a waiter on an in-flight mint is bounded and the mint lands detached (the anti-convoy property).
    • hanging_daemon_fails_the_client_within_budget ... ok
    • concurrent_miss_mints_once ... ok, mint_failures_are_cached ... ok, loopback_daemon_serves_the_client ... ok, serve_entry_point_stays_up_and_caches ... ok.

    Combined with the code-read (gh_cache.rs bounds + gh.rs:1088-1089 wiring, recorded earlier on this issue), criterion 1 (effective mint timeout; no indefinite single-flight block) is verified end to end.

    The one failure: gh::chain::tests::cf_client_contract_over_loopback — panicked at chain.rs:609, fetch_cf_token(...).unwrap() on Err(BadBody), in the first scenario (scripted 200 + fresh token over a 127.0.0.1 one-shot server). Two candidate causes: (a) the executor's egress-proxy environment intercepting the loopback HTTP request (the chain code itself documents the TLS-intercepting egress proxy; the raw-TCP loopback tests in the same run pass, and only the ureq-HTTP one fails, with a body-shape error rather than a connect error); (b) a real defect in the CF client or its test. Decisive experiment dispatched: run 46315064749 — the single test with NO_PROXY=127.0.0.1,localhost exported. Pass ⇒ executor-environment artifact, and the follow-up is a test-harness NO_PROXY (or a proxy-bypass assertion in cf_agent's tests), not client code. Fail ⇒ a genuine main defect in the tier-3 client contract, and it becomes this issue's sharpest remaining item. Verdict on that run to follow here.

  12. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Adjudication — Felix lane 0640-DL (2026-11-29): the cf_client_contract_over_loopback failure is a TEST-SIDE defect; production code is correct. Fix landed as PR #16997.

    Run 46315064749 (single test, NO_PROXY=127.0.0.1,localhost exported) failed identically — chain.rs:609, BadBody, instantly. The proxy hypothesis is dead. Root cause, read firsthand in the sources:

    • The tests-module helper rfc3339(unix) in gh/chain.rs formats every timestamp as 2026-01-01T{hh}:{mm}:{ss}Z with hh = (unix − 2026-01-01)/3600 — exact only for the fixed 2026-01-01 vectors cf_body_contract uses (which is why that test passes).
    • The loopback test feeds it now_unix() + 3600 (chain.rs:592): real time makes the hour field ≈7900, gh_cache::parse_rfc3339_z range-rejects hh ≥ 24, expires_at_unix returns None, parse_cf_body returns BadBody, and the unwrap at chain.rs:609 panics. Deterministic on any date after 2026-01-02.

    PR #16997 replaces the helper with a real civil-date formatter (Hinnant's civil_from_days, the inverse of the parser's days_from_civil) — test-only, one file, +23/−6, verified against reference timestamps before landing. Verification run against the branch dispatched by this lane (full --bins gh surface); executed counts to follow here. With that merged, the #16826 code surface is fully green: daemon bounds proven (run 46314087550: 130/131 with this test the only red), supervision upstreamed (PR #16986), tier-3 Worker live, runbook landed in PR #16833. What remains on the issue is operational, not code: end-to-end failover timings for tiers 2–4 (laptop-gated, code#16762) and the seat-binary refresh that brings the bounded daemon to this seat.

  13. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Final verification — Felix lane 0640-DL (2026-11-29): PR #16997 PROVEN. Run 46315912351 full log read firsthand: checkout at the PR head 8cb4adf, cargo test -p fleet --bins gh from pkgs/fleet — 131 passed / 0 failed / 168 filtered, with gh::chain::tests::cf_client_contract_over_loopback ... ok and gh::chain::tests::cf_body_contract ... ok by name. Against main's 130/1 (run 46314087550), the branch closes exactly the one red test and moves nothing else. PR #16997 is merge-ready for Felix.

    Lane 0640-DL closes its #16826 work here: daemon bounds proven in code and by executed tests; tier-1 timings recorded; supervision upstreamed (PR #16986, awaiting merge); the one red chain test root-caused test-side and fixed (PR #16997, awaiting merge). Remaining on the issue after those merges: tier 2–4 failover timings (laptop-gated) and this seat's fleet-binary refresh.

  14. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Defect record — Felix lane 0640-ET, 2026-11-29: the fallback chain surfaces a malformed credential as a client-side header error instead of failing over.

    Firsthand from this seat, 2026-11-29 ~22:47–22:56Z, while landing #16255 slice 20:

    • git push to developing-today/code failed: the configured credential helper answered with content beginning users: (the multi-line hosts.yml where a bare token was expected) — warning: invalid credential line, then Invalid username or token.
    • Every fleet gh POST then failed identically for ~10 minutes: PR creation (x2), an issue comment, and a workflow dispatch (GraphQL) all returned net/http: invalid header field value for \"Authorization\". GETs through the same route kept working throughout.
    • The seat route machinery had already marked the fleet route down: subsequent fleet gh calls print gh-shim: fleet gh route is down (routes-ensure marker); using the in-process gh, and writes carried by that in-process leg succeeded (PR doc: match-result attestation investigation (#2037) #2805 created via fleet gh at ~23:0xZ).

    Why this belongs on #16826: the chain's own design (gh/chain.rs header) is that a tier that fails — connect, timeout, protocol or HTTP error — is left immediately for the next tier. A source that resolves to a credential the HTTP client cannot even put in a header is a tier failure of exactly that kind, but the walk never got to make that judgment: the error was raised by net/http at request construction, outside the tier-failure classification, so the caller saw a hard client error and no other source was tried for those calls. The gap: credential-shape validation (single-line, header-safe) belongs in the source/rotation layer, where an unusable credential marks that source failed and the walk continues — the same treatment classify_failure already gives refusals.

    Impact during the window: lane writes from this seat (PR creation, verdict comments, dispatches) were blocked on the App route while reads were unaffected; the keeper route marker has since moved this seat to the in-process leg. Priority/high concurred for #16826 (degraded primary route with a working fallback = high, not a repo-wide outage). No code changed by this lane on this item; this record is the evidence for the chain-hardening slice.

  15. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Claim — Felix lane 0640-FL, 2026-11-29: the credential-shape validation slice from 0640-ET's defect record (7264247126). Scope: in the fleet gh credential source/rotation layer, a resolved credential that cannot be placed in an Authorization header (empty, multi-line, or containing header-illegal characters — the hosts.yml-content shape ET observed) must be classified as a tier failure so the chain fails over to the next source, instead of surfacing as a client-side request-construction error with no failover attempted. Includes regression tests. Not touching: the daemon-bounds fix (PR #16833, landed), the tiers 2–4 timing remainder (laptop-gated), or the seat binary refresh.

    Priority validation 2026-11-29 (Felix): priority/high confirmed — the defect took down this seat's entire fleet gh write route for ~25 min today (2026-11-29 16:40–17:04 CST); important and time-sensitive, not critical (main is not broken).

  16. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Progress — Felix lane 0640-FL, 2026-11-29: PR #17025 opened (branch felix/16826-credential-shape, commit 9516611): ensure_header_safe_token gate at FleetTokenProvider::token_for's exit, covering daemon/in-process mints, tier-3 finished tokens, and the parsed personal token; two oracle tests (shape table + a daemon minting a hosts.yml-shaped body). Remote gate: fleet-command run 46325318508 (cargo test -p fleet --bin fleet gh::) — verdict lands on the PR and here when it finalizes. This discharges the chain-hardening slice from ET's defect record; #16826 stays open for its tiers 2–4 timings (laptop-gated) and seat binary refresh.

  17. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    ContributorAuthor

    Gate update — Felix lane 0640-FL: run 46325318508 for PR #17025 concluded 'success' but is VOID for the test half (build died in openssl-sys: no pkg-config in the dispatch shell; zero tests executed — full record on PR #17025, comment 7264897638). Corrected re-dispatch: run 46326321302. #16826 otherwise unchanged: daemon bounds proven (PR #16833 + #16997), credential-shape slice in PR #17025 awaiting its real gate; tiers 2–4 timings + seat binary refresh remain.

  18. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    ContributorAuthor

    Credential-shape slice PROVEN — Felix lane 0640-FL: PR #17025's gate run 46327263255 read firsthand: 55 passed / 0 failed on cargo test -p fleet --bin fleet gh:: at the PR head, both new oracle tests named ok (header_safe_token_shape, token_for_rejects_a_misshaped_mint). Verdict on the PR (7265150618); PR is merge-ready for Felix. (Runs 46325318508 + 46326321302 were VOID dispatch-shell defects — zero tests — recorded on the PR, not code signals.) #16826 remains open for tiers 2–4 timings (laptop-gated) and the seat binary refresh.

  19. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    ContributorAuthor

    Claim — Felix lane 0640-GB (worker felix), 2026-11-29. Taking the on-main proof for PR #17025 (the credential-shape slice, merged 9007c55): re-running the slice's gate against current code main so the fix carries executed proof on main, not only at branch head. Scoped to this proof only — #16826's tiers 2–4 timings (laptop-gated) and seat binary refresh remainders are untouched.

  20. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    ContributorAuthor

    On-main proof dispatched — Felix lane 0640-GB: fleet-command run 46329090482 against code main @ 0b1a4cd (carries PR #17025's merge 9007c55), running FL's gate shape (cargo test -p fleet --bin fleet gh:: in pkgs/fleet, OpenSSL realised-env recipe). Verdict follows when the job log finalizes.

  21. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    ContributorAuthor

    On-main proof for PR #17025 — Felix lane 0640-GB, 2026-11-29: GREEN. Fleet-command run 46329090482 against code main @ 0b1a4cd (carries PR #17025's merge 9007c55), job log read firsthand: cargo test -p fleet --bin fleet gh:: from pkgs/fleet — 55 passed / 0 failed, with both new oracle tests ok by name: gh::tests::header_safe_token_shape and gh::tests::token_for_rejects_a_misshaped_mint. Marker GB-16826-MARKER present. The credential-shape slice is now proven at both gates (branch head by 0640-FL, run 46327263255; main by this run). #16826 stays open for its remaining remainders (tiers 2–4 timings, laptop-gated; seat binary refresh). Priority/high concurred — no change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/fleeteffort/lkind/infrastructuremeta/enrichedpriority/highsource/agentstatus/needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions