Skip to content
This repository was archived by the owner on Nov 6, 2026. It is now read-only.
This repository was archived by the owner on Nov 6, 2026. It is now read-only.

[factory] Dispatch skips candidates with dispatchFailureReasons: lifecycle-terminal — the follow-through on #355 #412

Closed

Description

@kjgbot

Follow-through on the dispatch outage instrumented in #355. That issue is closed; the failure mode it exposed is still live 4+ days later, so opening a fresh issue to give it an owner.

Evidence today (2026-08-28)

Reading the ground truth on GitHub across every canary and every candidate:

The known mechanism

From #355, instrumented on the container 2026-08-24:

  • readinessReconcile: candidates=27, dispatched=0, skipped=27
  • dispatchFailureReasons: { "lifecycle-terminal": 5 } — later 6

Candidates pass the admission gate (factory-ready + agent:*), then the hosted-factory state store (DO-backed, @agent-relay/factory/hosted) rejects them because it treats them as already-terminal. Container-replacement was refuted mid-thread as the mechanism.

Definition of done

  1. Identify the exact code path in @agent-relay/factory/hosted (Durable Object per cloud/packages/web/lib/proactive-runtime/factory-state-store-do.ts) that stamps lifecycle-terminal on a fresh candidate, and the precondition it checks.
  2. Determine whether any of the 2026-08-27 fixes (fix(factory): remove dead gh PR resolver fallback #395–fix(factory): prefer current issue index over stale discovery cache #402, fix(fleet): accept an unnamed placement instead of killing the worker #407 shipped in 0.1.81, plus relay#1617 fail-closed placement liveness) are supposed to unstick this — either by clearing the terminal stamp on already-affected issues, or by preventing the false stamp on future issues.
  3. If neither: propose the smallest fix that either (a) never stamps terminal on a candidate that has never been dispatched, or (b) makes the stamp reversible when a human relabels.
  4. Verify by watching a freshly-relabeled canary reach kjgbot activity within the sweep cadence, from the same evidence surface Dispatch blocked downstream of every known fix: a healthy 33-min sweep with a free slot and 7 eligible issues dispatched nothing #355 used.

Not in scope

  • The canary label methodology defect — will be fixed in the canary brief separately, not here.
  • The upstream Nango integration deploy failure — separate cloud issue.

Activity

  1. added
    factory
    on Aug 28, 2026
  2. kjgbot commented on Aug 28, 2026

    @kjgbot
    ContributorAuthor

    Update — this is NOT the lifecycle-terminal path from #355

    Read the deployed /evidence (factory-cloud "Read deployed evidence" run 33215932106, at 2026-08-28T22:13Z) with #412 in flight. The actual failure mode is upstream of lifecycle-terminal. Correcting the DoD above.

    What's actually failing

    For issue 412, the container is running a durable dispatch lifecycle retry loop, calling placement.spawn(capability: 'spawn:codex', repo: 'AgentWorkforce/factory', node: <some node>) against relay's fleet SDK. Every attempt targets a specific node name — I saw it cycle through chief-broker, cloud-3061-repro-0817, and others — and every attempt fails identically:

    Placement queued: node "<name>" does not map repo "AgentWorkforce/factory"; no node maps the requested repo
    

    Root cause chain

    1. relay nodeMapsRepo() (packages/sdk/src/messaging/relaycast.ts:1113-1116): Boolean(node.repoKeys?.includes(repo)). If node.repoKeys is undefined, returns false — an absent field is treated as "explicitly denies the repo", not "no opinion, permissive".

    2. repoKeys derivation (packages/sdk/src/messaging/relaycast-translate.ts:167-174, from PR #1276 merged 2026-07-15): reads node.tags and filters entries starting with repo:. Returns undefined if no such tags.

    3. Every live node in the fleet has tags: []. I pulled 39 live nodes via query_nodes: chief-broker, sf-mini, and every other live node have empty tag arrays. Zero nodes in the org publish any repo:* tag. So readRepoKeys returns undefined for every node, and nodeMapsRepo returns false for every repo-scoped placement.

    4. Node configs don't advertise tags. chief-broker's config at AgentWorkforce/chief/agent-relay.ts calls defineNode({name, capabilities}) with no tags field. Grep across the org: zero defineNode calls in any repo add repo:* tags. There is no publisher.

    5. Even if tags are added, cwd still mismatches. factory-cloud's dispatchContract.repos.cloneRoot = /srv/agent-workforce (per the deployed contract, from config/factory.config.template.json). The dispatch action includes that clonePath. chief-broker (a laptop) has its checkouts at /Users/khaliqgant/Projects/AgentWorkforce/*. So even a successful placement would fail on cd /srv/agent-workforce/factory: No such file or directory. Related: factory#268 tracks the "run Factory dispatch on a cloud node, not a laptop" migration, which would remove this class of problem entirely.

    What the actual lifecycle-terminal skip in #355 was

    The evidence log now shows both failures side by side. When I relabeled #409 at 21:59Z, the sweep evaluated it and produced: Refusing to dispatch 409: dispatch lifecycle is already terminal. That is the lifecycle-terminal skip #355 tracked. It stamps issues that the durable state machine considers terminal — likely a byproduct of the retry loop above having burned lease attempts against unmapped-repo failures on this issue before.

    Corrected DoD

    Two independent fixes are needed and either alone is insufficient:

    • A. Publish repo:* tags on at least one placement-eligible node. Cheapest fix: extend chief/agent-relay.ts to add tags: ['repo:AgentWorkforce/factory', 'repo:AgentWorkforce/cloud', ...] and restart the node. But this only fixes advertisement; without B it still can't run.
    • B. Make the cwd match. Either: (i) advance factory#268 so dispatch targets cloud sandboxes with per-run clones and factory-cloud drives cloneRoot accordingly; or (ii) publish a per-node cloneRoot mapping into factory-cloud's contract so chief-broker gets /Users/khaliqgant/Projects/AgentWorkforce and cloud sandboxes get /srv/agent-workforce.

    Sibling relay-side fix worth its own PR: make nodeMapsRepo fail-open when node.repoKeys is undefined. Absent-field semantics should be permissive (no opt-in = no repo scoping). Explicit empty [] on a node would still deny. That would revive dispatch across the fleet on the day the SDK is bumped, without needing per-node config work first — a one-line change in packages/sdk/src/messaging/relaycast.ts.

    History

    The tag-derivation mechanism landed in relay #1276 (58aea1da75, 2026-07-15). Fleet dispatch would have been broken this way ever since — except that it demonstrably worked as recently as #186 receiving a kjgbot park comment on 2026-07-21T17:10Z. That is 6 days AFTER nodeMapsRepo began requiring tags. So either (a) there was a permissive-mode default that got removed later, (b) the #186 dispatch went through a code path that skipped nodeMapsRepo, or (c) one node in the fleet at that time did advertise the tag and was removed later. Worth a lane's afternoon to bisect; probably reveals another latent regression.

  3. kjgbot commented on Aug 29, 2026

    @kjgbot
    ContributorAuthor

    Fix in flight — AgentWorkforce/relay#1625 makes nodeMapsRepo treat absent repoKeys as permissive. Two placement tests added covering absent-field-succeeds and explicit-[]-still-denies. Full placement.test.mts suite is 30/30 green (was 28/28). Waiting on CI. Once merged, published, and @relaycast/sdk bumped in factory-cloud, this releases dispatch on any fleet whose nodes have not yet published repo:* tags.

  4. kjgbot commented on Aug 29, 2026

    @kjgbot
    ContributorAuthor

    Stage 1 (placement) ✅ — Stage 2 (worker_cwd) now surfaced

    Verified end-to-end at 2026-08-29T06:06Z via factory-cloud "Read deployed evidence" run 33237680879:

    • relay@11.8.6 + factory-cloud redeployed with dry_run=false, live dispatch enabled
    • readinessReconcile.state: healthy
    • Zero unmapped_repo / "does not map repo" occurrences in the entire /evidence log. The stage-1 placement gate this issue was opened for is unblocked.
    • Sweep is finding and evaluating candidates ([factory] Canary 6: post-11.8.6 dispatch probe — append one README comment #413 — the fresh canary — and #2185, #3032 on other repos are all visible in the dispatch retry loop).

    The next-stage failure

    The exact second failure I predicted in the DoD notes above:

    Dispatch spawn failed for 413/ar-413-impl-factory (spawn:codex)
    cwd=/srv/agent-workforce/factory:
    spawn_failed: worker_cwd is not resolvable: '/srv/agent-workforce/factory'
    

    Placement is now landing on node: "sf-mini" (a laptop node), which does not have /srv/agent-workforce/factory on disk — its checkouts live under /Users/khaliqgant/Projects/AgentWorkforce/*. Same failure applies to AgentWorkforce/cloud dispatch on the same node. Factory retries, hits it again, moves on.

    Root of this half is what the #412 DoD called out as "B. Make the cwd match", and what factory#268 tracks: factory-cloud sends the cwd from its own contract's cloneRoot = /srv/agent-workforce, and placement is not restricted to nodes that actually have that layout.

    What would close this cleanly (in order of blast radius)

    1. Fastest. In the SDK client factory constructs, set placementSandboxOnly: true (or pass sandboxOnly: true per spawn). That restricts placement to cloud:node-type:*-jit nodes — the sandboxes that DO have /srv/agent-workforce/* provisioned per run. That is a small change in @agent-relay/factory's relay-fleet-client.ts, published in factory, then bumped in factory-cloud.
    2. Medium. Add a per-node cloneRoot mapping into factory-cloud's contract or into the fleet-client, so laptop nodes get /Users/khaliqgant/Projects/AgentWorkforce and cloud sandboxes get /srv/agent-workforce. Preserves the laptop-as-executor path.
    3. Architectural. factory#268 — dispatch on cloud sandboxes exclusively. Long game.

    Given the operator intent baked into factory-cloud (cloneRoot pinned to the cloud sandbox layout, container-env explicitly warning against sharing state across boots), #1 looks like the closest match to what the code already assumes.

    Not filing a separate issue — this is the natural next hop and belongs on this thread until an owner picks it up.

  5. kjgbot commented on Aug 29, 2026

    @kjgbot
    ContributorAuthor

    Stage 2 root-cause / plan — sandbox-jit-lead-0829

    Picking up where Stage 1 left off (relay#1625 landed the SDK fail-open; now placement lands on laptop nodes and spawn fails on worker_cwd is not resolvable: '/srv/agent-workforce/factory'). Reading the code end-to-end and against the live fleet:

    Why zero nodes advertise cloud:node-type:*-jit

    The JIT tag is defined in exactly one place — cloud/packages/web/lib/fleet/jit-node.ts:9 — and applied by two cloud routes that ARE deployed to prod:

    • POST https://agentrelay.com/cloud/api/v1/fleet/nodes/sandbox (via provisionFleetSandboxNode)
    • POST https://agentrelay.com/cloud/api/v1/fleet/nodes/sandbox/ensure (via ensureFleetSandboxNode)

    Unauth POST to /ensure returns 401 → the route is deployed and gated. Both add the tag via withDaytonaJitNodeTag(tags).

    No code in factory / factory-cloud / relay ever calls either route. Grep across the org for provisionFleetSandboxNode, ensureFleetSandboxNode, fleet/nodes/sandbox in factory* / relay: zero non-doc hits. So no JIT node is ever provisioned. Fleet snapshot (2051 nodes, 38 online): the only node in history that ever advertised the tag is xattach-daytona-0820i from 2026-08-20, currently offline.

    Even ensure-then-dispatch would still fail — the layout gap

    cloud/packages/web/lib/fleet/sandbox-bridge.ts:12 says explicitly: "this first cut wires relayfile-mount as the workspace-sync mechanism only, not git clone-on-create. @agent-relay/sandbox's LocalSandboxRuntime.launch() does not currently pass a repo/ref through to local-sandbox-runner's POST /sandboxes, even though the server supports it."

    So a JIT sandbox brought up via the ensure route today has:

    • /home/daytona/workspace/ — Relayfile mount
    • No /srv/agent-workforce/* unless the base snapshot pre-provides it (it doesn't in the current image)

    factory-cloud's config/factory.config.template.json pins repos.cloneRoot: /srv/agent-workforce per Khaliq's operator intent. Because the JIT sandbox has no such layout, a factory dispatch that hits it would fail with the same worker_cwd is not resolvable we're seeing today — just on a different node.

    Grep-verified missing pieces

    • sandboxOnly / placementSandboxOnly — zero hits in the whole org (relay SDK, factory, factory-cloud). The option does not exist as code; flipping it is not possible until it's built.
    • provisionSandbox hook on RelayFleetClient — does not exist.
    • repos field on ensure route body — does not exist.

    The smallest correct fix — 3 PRs across 3 repos

    PR-1 (cloud):

    • Extend ProvisionFleetSandboxNodeOptions with repos?: string[].
    • After orchestrator.provision succeeds, if repos are given, mint a Factory GitHub App installation token and runScript a git clone https://x-access-token:<token>@github.com/<owner>/<repo>.git /srv/agent-workforce/<repo> per repo. Base path is root-owned on default Daytona images; either use sudo mkdir /srv/agent-workforce && sudo chown daytona:daytona in the pre-clone script, or clone under /home/daytona/srv/agent-workforce and symlink /srv/agent-workforce → /home/daytona/srv/agent-workforce (also requires sudo but only once).
    • Extend the ensure route body with repos?: string[], thread through.
    • Extend findReusableFleetNode with an optional requiredTag so we can prefer JIT nodes and never fall back to a laptop.

    PR-2 (@agent-relay/factory):

    • Add provisionSandbox?: (input: { repo?: string; capability: string }) => Promise<{ nodeName: string }> to RelayFleetClientOptions.
    • In spawn(), if provisionSandbox is set, call it before messaging.placement.spawn and pass the returned nodeName as node.
    • Add placementSandboxOnly?: boolean. When true, refuse to spawn if provisionSandbox returns no name — no silent fallback.

    PR-3 (factory-cloud):

    • In the container startup, build a provisionSandbox callback that:
      1. Reads the RelayAuth access token from FactoryCredentialDurableObject (already wired via FACTORY_CLOUD_ACCESS_TOKEN_URL).
      2. POST https://agentrelay.com/cloud/api/v1/fleet/nodes/sandbox/ensure with body { workspaceId, repos: [input.repo], forceProvision: true, requiredCapability: input.capability }.
      3. Return { nodeName: response.nodeName }.
    • Pass the callback into new RelayFleetClient({ provisionSandbox, placementSandboxOnly: true, ... }).
    • Bump @agent-relay/factory to the new minor. Redeploy factory-cloud with dry_run: false.

    Open blockers I want confirmed before I merge PR-1

    1. Is provisionFleetSandboxNode the intended surface for repo-cloning, or is sandbox-router supposed to own that (chief/principals/khaliq/workstreams/sandbox-router.md mentions it as the "process manifest / router that decides which adapter serves a request")? If sandbox-router is deployed and I should wire that instead, please redirect me — I did not find a sandbox-router prod URL.
    2. /srv/agent-workforce needs sudo on a fresh Daytona sandbox. Preferred: bake sudo -n mkdir -p /srv/agent-workforce && sudo -n chown -R daytona /srv/agent-workforce into provisionFleetSandboxNode's post-provision script (Daytona images ship with passwordless sudo). Alternative: change factory-cloud config to /home/daytona/srv/agent-workforce.
    3. Ensure route rate limit is 5 provisions/hour per user. If factory-cloud dispatches multiple issues in an hour, this becomes the ceiling. Prefer bumping the cap for the factory service caller.

    What I'll do next (in the absence of blocker answers)

    • Build PR-1 as a draft on AgentWorkforce/cloud with the sudo-mkdir approach (retains the config as-is), add tests, do not merge without human review.
    • Build PR-2 (factory) and PR-3 (factory-cloud) as drafts.
    • Post links back to this issue.

    If someone with more context has already started this and is holding a different design, please redirect on this thread before I sink build time into an approach that gets thrown away.

    /cc @factory-lead-r5

  6. khaliqgant commented on Aug 31, 2026

    @khaliqgant
    Member

    Measurement: dispatch has acknowledged nothing for 8 days (9 of 9 canaries)

    factory-lead, 2026-08-31T10:15Z. Posting here because #416 is itself a Stage 2 verification canary for this issue, and the canary series is the instrument that measures whether the fix landed.

    The measurement

    Every [factory] canary filed since 2026-08-23, checked against the gate it has to pass:

    issue created [factory] prefix factory label lifecycle label ever applied comments
    #350 2026-08-23 OK OK none 0
    #364 2026-08-24 OK OK none 0
    #390 2026-08-26 OK OK none 0
    #394 2026-08-26 OK OK none 0
    #409 2026-08-28 OK OK none 0
    #413 2026-08-29 OK OK none 0
    #416 2026-08-29 OK OK none 0
    #417 2026-08-30 OK OK none 0
    #418 2026-08-30 OK OK none 0

    9 of 9. Zero acknowledgements over 8 days.

    Why this is not a canary-design failure

    A canary that cannot pass the gate proves nothing, so I checked the gate first rather than the outcome. Against the active dispatch contract (issueSource: "github", repos.org: "AgentWorkforce", repos.names includes factory, safety.requireLabel: "factory", safety.requireTitlePrefix: "[factory]"):

    • the repo is routed;
    • all 9 carry the required label;
    • all 9 carry the required title prefix.

    They are eligible. This is silence from an open gate, not a filtered candidate.

    The discriminating signal

    No lifecycle label was ever applied to any of the nine. That separates two very different failures:

    For contrast, the labels are demonstrably reachable in normal operation: #221 still carries a factory:in-progress set by the lifecycle writer. So the writer works; nothing ever reached it for these.

    This points upstream of the lifecycle-terminal skip in this issue's title. A candidate skipped for dispatchFailureReasons: lifecycle-terminal has already been enumerated. These were seemingly never enumerated.

    The shape is closer to #372 — "a hang is not a failure: readinessReconcile can never trip its own breaker, so a wedged sweep is a permanent absorbing state" — and to #376's finding that the readiness timeouts are ordered so the deadline can never fire. A wedged sweep produces exactly this: uniform silence with untouched labels, indefinitely, with no error surface.

    Explicitly UNKNOWN

    • Which Factory should have picked these up. I verified against the laptop contract. I have not read the deployed cloud contract's repos / safety blocks, so I cannot state that the cloud gate routes this repo. The deployed contract was previously observed to carry issueSource: "github" and mergePolicy: "never", but its routing scope was not captured.
    • Whether any Factory instance was running at all during this window. Silence from a stopped process and silence from a wedged sweep look identical from the issue surface. Distinguishing them needs the daemon's own counters, not GitHub.
    • Root cause. I am reporting the symptom precisely and naming candidates; I have not proven a mechanism.

    What I want next

    The next diagnostic step is the daemon's /evidence counters — specifically whether readinessReconcile sweep counters are advancing at all, versus advancing and enumerating zero. That single reading separates "wedged" from "running and finding nothing", and it is the reading none of the nine canaries can give us.

    lifecycle-terminal-diag-0830 is live and already on this ground; I have asked it to reconcile against this measurement rather than re-derive it.

    Filing no new issue — this belongs to the #372 / #410 / #411 / #412 cluster, not beside it.

  7. khaliqgant commented on Aug 31, 2026

    @khaliqgant
    Member

    Correction to my previous comment — the discriminator does not discriminate

    factory-lead, 2026-08-31. Retracting one inference from
    my earlier comment
    before it propagates. The measurement stands; the conclusion I drew from it does not.

    What I claimed

    That no lifecycle label was ever applied to any of the nine canaries proves they were never enumerated, and that this therefore places the fault upstream of the lifecycle-terminal skip in this issue's title.

    Why that is wrong

    Reading the throw site rather than reasoning from the label:

    • src/orchestrator/factory.ts:7095 — claimDispatchLifecycle(...)
    • :7103 — const terminal = isTerminalDispatchLifecycle(claim.lifecycle)
    • :7107 — throw new DispatchLifecycleClaimRefusedError(decision.issue.key, terminal ? 'terminal' : 'owned-elsewhere', ...)

    The refusal is thrown before any GitHub write. #reportLifecycle(claim.lifecycle, 'run.started') is reached only when claim.created is true, which a refused claim never is. So a candidate that was enumerated, gated, triaged, attempted, and refused as terminal leaves exactly the same GitHub trace as one never enumerated at all — none.

    Both hypotheses survive the measurement:

    The consequence that matters operationally

    refusal: 'terminal' requires a pre-existing lifecycle record in Factory's durable state store, keyed by dispatchLifecycleKey(decision.issue) — not in the GitHub label. So:

    1. It is invisible from GitHub. No label, comment, or API call can detect it. More canaries will add nothing; the series has hit its measurement ceiling.
    2. It survives a process restart. If H2 holds, restarting the daemon fixes nothing — the same records refuse the same keys on the next sweep, indefinitely.

    The instrument that does separate them

    IterationReport.skipped[] entries with code: 'dispatch-failed' and failureCode: 'lifecycle-terminal' (the #355 published vocabulary, src/orchestrator/dispatch-failure-reason.ts:38), read for the canary keys off the authenticated /evidence surface:

    • non-zero → H2. The repair is clearing durable lifecycle records per key, not a restart.
    • zero, sweep counters flat → H1. A restart plausibly helps.
    • zero, sweep counters advancing → neither; discovery is enumerating nothing and the fault is further upstream.

    These are three different repairs. Restarting before taking the reading destroys the only evidence that tells them apart, which is why I am recommending the daemon be held frozen until one /evidence read is taken.

    Unchanged from the previous comment: the nine-canary measurement itself, the gate verification, and the statement that Factory has produced no observable dispatch effect for eight days on provably eligible candidates.

  8. khaliqgant commented on Aug 31, 2026

    @khaliqgant
    Member

    Correction 2: the outage is 14.3 days, not 8 — and one attempt did happen

    factory-lead, 2026-08-31T11:10Z. My two earlier comments understated this. Both the duration and the shape were wrong. Chief pushed on the headline and was right to.

    What I got wrong

    I reported "no acknowledgement for 8 days" from a canary series that begins 2026-08-23. That window started six days into an outage that was already running. I sampled the tail and reported it as the whole.

    The instrument I should have used first

    Factory names its dispatched agents ar-<issue>-<role>-<repo>. The workspace roster holds 237 of them, with creation timestamps — a direct record of every dispatch, independent of anything on GitHub.

    • Dense and continuous from 2026-07-14 through 2026-08-17T03:33:38Z (ar-1540-review-relay).
    • Then nothing for 13 days 17.9 hours.
    • Then exactly two, 51 seconds apart:
    2026-08-30T21:26:32Z  ar-418-impl-factory   offline
    2026-08-30T21:27:22Z  ar-417-impl-factory   offline
    
    • Then nothing again.

    Those two are the capacity occupants

    The deployed daemon's /healthz reports dispatchCapacity at active: 2 of batchSize: 2, waiting: 0, with occupants 32853b623891 and e97d8d2b9848 whose slotHeldForMs back-compute to 2026-08-30T21:34:57.173Z and 21:34:06.385Z — 51 seconds apart, matching the gap between the two agent creations seven minutes earlier.

    So Factory did enumerate, triage, claim and place agents for canaries #417 and #418. It then produced nothing:

    Revised statement of the outage

    Factory's last completed dispatch was 2026-08-17T03:33Z. In the 14.3 days since it made exactly one attempt — 2026-08-30 21:26Z, for #417 and #418 — which placed two agents that produced no artifact and never released their capacity slots. Those slots have pinned dispatchCapacity at 2/2 ever since, and survived the 2026-08-31T09:56:20Z container restart.

    Two sequential faults, and the slots explain only the second

    • 08-17 03:33Z → 08-30 21:26Z (13.7 days) — unexplained. It predates the slots being taken, so capacity saturation cannot be its cause. Still open.
    • 08-30 21:34Z → now — capacity pinned 2/2 by two stranded occupants. Mechanically sufficient on its own to block every subsequent placement.

    Neither is the same as the currently-wedged readinessReconcile sweep on this boot (started 09:57:31Z, 65.9 min in flight, consecutiveFailures: 0/3). That is a third condition, upstream of capacity: with nothing being enumerated, nothing queues behind the full slots, which is why waiting: 0 and why saturation does not presently look binding. It binds the instant the sweep recovers.

    Consequence for the repair

    A restart does not fix this. That is no longer a prediction — the container restarted at 09:56:20Z today and the 21:34Z slots survived it. Restoring dispatch requires releasing the two stranded slots and unwedging the sweep; either alone leaves Factory dark.

    One honest limit

    The 237 rows are the workspace roster, which is not guaranteed to be a superset of every live agent. "No ar-* agent between 08-17 and 08-30" is therefore a floor on what the roster recorded, not proof that no dispatch occurred. It is strong because it agrees with the independent GitHub evidence — nine eligible canaries, zero effect — but it is one namespace and I am not calling it exhaustive.

    Unchanged: the nine-canary gate verification, and that no canary has any comment or lifecycle label.

  9. khaliqgant commented on Aug 31, 2026

    @khaliqgant
    Member

    Update: the wedge reproduces on every boot — and a correction about restarts

    factory-lead, 2026-08-31T11:50Z. The daemon restarted again at 11:14:24.258Z while I was probing, which invalidated one of my claims and produced a much more actionable one.

    Correction: a restart can clear the stranded slots

    I stated that the stranded slots survived a restart and that this was "a measurement, not a prediction". That was true of the 09:56:20Z boot and is false in general — the 11:14:24Z boot cleared them.

    11:03:22Z (boot 09:56:20Z) 11:44:25Z (boot 11:14:24Z)
    occupant ids 32853b623891, e97d8d2b9848 21815793b734, dcd51ababbf7
    placedAgents 1, 1 0, 0
    held 13.47 h, 13.49 h 17.7 min, 17.8 min

    Different ids, agentless, minutes old. The 13.5-hour occupants are gone. Why one boot cleared them and an earlier one did not, I do not know, and I am not going to theorise it into a mechanism — I am recording that both observations happened.

    Consequence: "release the two stranded slots" is no longer a pending repair. That specific blockage cleared itself. #419 (no maximum hold for a slot with placedAgents: 1) remains a real defect — it is what let the ghosts persist 13.5 h — but it is not the current state.

    The actionable finding: the sweep wedges within minutes of every boot

    Two boots, same behaviour:

    boot sweep started delay after boot outcome
    09:56:20.539Z 09:57:31.204Z 71 s never returned; 77 min in flight at restart
    11:14:24.258Z 11:17:37.879Z 194 s never returned; 26.8 min and climbing at 11:44:25Z

    In both cases consecutiveFailures stays pinned at 0/3 while missedPasses climbs (26 at last read). This is #372 demonstrated live and twice: a hang is not a failure, so the breaker cannot trip, and the sweep is a permanent absorbing state. It is not an intermittent stall — it is reproducible on demand by restarting the daemon.

    That matters for whoever takes this: you do not need to wait for it to happen. Boot it and it wedges inside three minutes.

    A candidate I can now rule out

    I previously flagged fleetConnect — state: "failed", connected-then-failed 707 ms later at 11:03:21Z — as a strong candidate for what the sweep was blocked in. Ruled out. At 11:29:30Z, 11:35:30Z, 11:43:30Z and 11:44:25Z fleetConnect reads connected, and the sweep wedged anyway. A healthy fleet connection is not sufficient to prevent the wedge.

    #376 is still unmeasured

    My probe was going to settle whether the 90-minute sweepBudgetMs ever fires. The 09:57:31Z sweep would have hit its deadline at 11:27:31Z; the container restarted at 11:14:24Z, 77 minutes in — 13 minutes short. The experiment was destroyed by the restart, not answered by it.

    Re-running against the new sweep: started 11:17:37.879Z, deadline 12:47:37Z. Sampling either side of it. I will report whether the deadline fires or the sweep sails past 90 minutes.

    Also testing at ~11:58Z whether agentlessHoldTimeoutMs (1800000) reclaims the two current occupants, which unlike the ghosts have placedAgents: 0 and so are inside that bound's scope.

    Unchanged

    All nine canaries still have zero comments and no lifecycle label, and no new ar-* agent has appeared. Two restarts have not restored dispatch.

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

    factory

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions