Skip to content

fleet-route: what a project needs before it can drop its own router (desk slots, watch/sweep action, per-job pool limit, re-runs) #224

Open

Description

@scuttletoby

A private project wants to swap its own CI router for fork-ci/actions/fleet-route (pinned ci/v7) and delete the router. Measured on its last 40 CI runs, that switch cannot work yet. Four things are missing in the fork. Nothing here changes T3 itself.

1. The desktop must run the desk agent, with more than one slot.
fleet-route sends a job to a dispatcher pool only when the pool's heartbeat variable says it has a free slot. The job then gets the label <pool label>-<job>-<nonce>-a<attempt>, and only a one-job runner that the dispatcher made for that job carries it. The project's desktop still runs the project's older one-runner loop. That loop writes no heartbeat and registers only the pool label, so fleet-route would count 0 free slots and the desktop would get no jobs at all. That is worse than today.

  • Needed: D8 to D12 merged, then the project's switch (homelab design, step S1). The desktop pool also needs slots of 2 or more. Today one runner means at most one heavy job per run: the second heavy job of a run went to the always-on machine in 8 of 12 runs.
  • Change needed for "as many jobs at once as the desktop allows": the desk pool's slots (and the launcher's per-slot users) set to the desktop's real capacity. The desktop's memory check (fits) is the limit, not a fixed 1.

2. watch and sweep as fork-ci actions.
The fleet-route action ships route only. The project's router also does the following, and it can only be deleted once fork-ci offers it:

  • re-run once, on the always-on pool, a desktop job that its runner did not finish (the desktop went off, lost its network, was killed for memory, or its gate refused the job);
  • cancel a run whose job has waited too long for a dispatcher pool, then re-run it;
  • answer a deploy gate's question "is this red run on the main branch about to be re-run?" (pending), so main does not count as red while the re-run decides.

Proposal: fork-ci/actions/fleet-watch (the sweep and watch verbs, with a token that may cancel and re-run runs) and a fleet-pending verb.

3. A per-job pool limit.
The project builds the release jars that its deploy ships only on its always-on pool (push runs). Its other heavy job may use the desktop on a push. Today a pool's takes applies to every job, so this rule cannot be written in the config.

Proposal: an optional jobs[].avoid: {"<pool name>": ["push"]} that route honours. Config check: the pool must exist, and the kinds must be from KINDS.

4. Re-runs.
fallback never names a dispatcher pool, so a "re-run failed jobs" never uses the desktop. The project's router has the same limit today, and 4 of its 5 re-runs rebuilt a heavy job on the always-on machine (about 20 min each).

Proposal: let fallback name a dispatcher pool. That needs a route-free way to make a run label for attempt N, or the dispatcher accepting the pool label plus the job key for a re-run attempt, with the gate checking the attempt.

Until 1 and 2 land, the project keeps its own router. Its fixes in flight (re-runs may use the desktop; time-zone tests that failed only on the desktop) handle the biggest measured waste meanwhile.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions