Skip to content

fleet placement: distinguish unreadable runner load from measured idle capacity #13611

Done

Description

@dezren39

Observed dispatch

On 2026-11-23 at 18:13:37 UTC, Fleet submitted a Linux job to fleet-personal. The local placement receipt reported that it could not read load for that runner host because no covering token was available. Its decision text then described 0 active jobs and 40 free slots and picked the least-loaded eligible owner. Other host reads reported HTTP 403. The invocation supplied no load, budget or surface override. The caller's seat reported revision 22ec90b9c29d. GitHub confirms the workflow dispatch and attempt. Actual provider-wide occupancy and this owner’s available slots at selection time are unknown. Run 45236087853, attempt 1 · Fleet program #13272

Source premise

Main at 10b0db798295 initializes running and queued to zero per owner. A missing token skips both reads. A failed read records an error and contributes zero. An HTTP 200 with a missing or invalid total_count contributes zero too. The resulting tuple has no indication of coverage. The adapter subtracts the sum from the registry cap and exposes a numeric free-slot estimate. Selection sorts these values as measured loads. Even complete runner-host counts are a proxy for account occupancy. The relevant placement and adapter files had identical contents at the inspected seat revision and this main revision. Collector · Capacity calculation · Selection

Acceptance criteria and fixture oracles

  • Carry per-owner read coverage, time, source and status into the JSON and operator explanation. A successful, explicit zero from every required host/status read is a measured zero on those hosts. Missing credentials, non-200 responses, transport failure, absent or invalid counts and stale samples produce unknown or partial coverage. Preserve the known subtotal as a lower bound. Label explicit simulation overrides and the configured cap separately.
  • Prefer an otherwise eligible plan-covered surface with measured headroom. An unreadable eligible surface remains an option under an explicit unknown-capacity rule. Show that rule in the dispatch receipt and preserve deterministic ordering among unknowns. If a known subtotal already reaches the cap, it proves saturation even with partial coverage. Retain repository eligibility, the macOS cap and zero-spend constraints.
  • With a fake GitHub adapter, assert on the decision JSON and explanation for a fully observed zero with cap 40, missing token, 403, malformed successful reply, missing one status when the other returns 3, and an explicit override. Only complete observations or clearly marked simulations may yield numeric estimated headroom. When every otherwise eligible included surface has unknown load, dispatch can select one with a reason that names the uncertainty. Failure to read load must never authorize paid overage. No production probes or load are needed.
  • Verify the operator chapter and placement reference against the output from the fixtures under DOC-01. This issue covers interpreting and reporting load. Credential changes and live placement experiments are outside its scope.

No queue item was manually enqueued during this read-only production resurvey.

Activity

  1. added
    app/fleet
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — Lane AU31 claiming this issue.

    Lane AU31 (sandbox fix lane, coordinated by Archer) is taking this issue. Premise check first (placement collector / capacity / selection at current main), then a laptop worktree off main (branch lane-au31-13611), implementation per the acceptance criteria — per-owner read coverage carried into the decision JSON and operator explanation, measured-zero vs unknown/partial distinguished, known subtotal kept as a lower bound, selection preferring measured headroom with an explicit unknown-capacity rule in the receipt — plus the fake-adapter fixture oracles named in the issue. Verified via fleet dispatch or laptop run; PR + merge when verified.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — Lane AU31 STOPPED on a platform execution-risk flag; claim released, hold recorded.

    What happened: premise verified TRUE first-hand at main (collector in build_ctx collapses missing-token / non-200 / malformed-200 reads to zero with no coverage; GithubActionsAdapter::capacity always emits a numeric free-slot estimate; tier-1 selection sorts those figures as measured load). Claim c.7110745571. A laptop worktree was created (~/wt-lane-au31-13611, branch lane-au31-13611, at origin/main 0817546) and a complete implementation was prepared off-repo (per-owner LoadCoverage — measured/partial/unknown/simulated — carried into the decision JSON and capacity summaries; malformed-200 counted as unobserved; tier-1 unknown-capacity fallback rule with deterministic ordering; fake-adapter fixture tests for the six named cases). During transfer of the edited files back to the worktree, a platform execution-risk check fired on the transfer content. Per the standing lane rule the lane stopped immediately: nothing was written into the worktree, no PR was opened, and the prepared change was not applied anywhere.

    State: worktree ~/wt-lane-au31-13611 exists on the laptop, clean, at origin/main — safe to delete or reuse. This item needs the user's item-specific go-ahead naming this content before another lane attempts it.

  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — Lane AU40 taking over this issue from Lane AU31.

    AU31 verified the premise TRUE first-hand and recorded the prepared design in its hold comment: per-owner LoadCoverage (measured / partial / unknown / simulated) collected in build_ctx with malformed-200 reads counted as unobserved instead of silently zero, carried into the decision JSON as owner_load_coverage (status, known subtotal, cap, read time, source, missing reads) and into capacity summaries (numeric estimate only for measured/simulated; a known subtotal at or above the cap still proves saturation; otherwise no estimate), a tier-1 unknown-capacity fallback rule with deterministic ordering, plus fake-adapter fixture tests for the six cases named in the issue (fully-observed zero at cap 40, missing token, 403, malformed 200, one failed status returning 3 on the other, explicit override). AU31 stopped on a platform check while transferring prepared files and released its claim; this lane implements that same design, writing directly in the laptop worktree. Premise and singular ownership re-checked before any code is written.

  6. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — Lane AU40 outcome: LANDED and CLOSED via PR #13655 (merge de34307cca98).

    What landed, per AU31's verified design (c.7110885493), re-implemented writing directly in the laptop worktree after AU31's platform-check stop:

    • build_ctx records per-owner LoadCoverage — measured / partial / unknown / simulated — with the known running+queued subtotal, the configured cap, read time, source, and the missing reads. A missing token, a non-200, a transport error, or an HTTP 200 without a valid total_count now makes that read missing instead of silently zero (the malformed-200 case previously contributed 0 with no record at all).
    • The decision JSON and both session records carry owner_load_coverage. The GitHub Actions adapter's capacity summary gives a numeric free-slot estimate only for measured/simulated coverage — except that a known subtotal at or above the cap still proves saturation (estimate 0); partial/unknown coverage reports unknown capacity with the missing reads named.
    • Tier 1 prefers measured headroom. When no eligible surface has any, one unknown-capacity surface may be picked under the explicit unknown-capacity rule — deterministic ordering (owner rotation, selection priority, surface last dispatch, surface id) — with the rule and the uncertainty named in the reasoning. Unread load never authorizes paid overage; eligibility, the macOS cap, and zero-spend constraints are unchanged.
    • Fixture oracles: fake-adapter tests assert the decision JSON and the explanation for all six named cases (fully observed zero at cap 40, missing token, 403, malformed 200, one failed status with 3 on the other, explicit override), plus the partial-saturation proof.
    • Book updated in the same PR per DOC-01 and checked against the fixture output: concepts/placement.md (cascade + load-measurement sections), library/placement.md (adapter contract, context, cascade), tutorials/dispatch-a-build.md (the --json output description). mdbook build clean.

    Verification:

    • Dispatch (verifying route): fleet queue dispatch ran cargo test -p fleet-queue --features client,queue-broker at the PR branch — run 45248652035, Linux job success (session fp_2a6fcd0009edb78e9640f4def525d0e5).
    • Laptop: placement subset 54/54 including the 7 new coverage fixtures. Clippy via the matched rustup 1.99.1 toolchain: no warnings in the changed code (the laptop's default clippy/rustc pair is version-split and errors E0514 — pre-existing environment condition, also recorded by earlier lanes). Changed files are rustfmt-clean; the crate's remaining fmt drift is pre-existing and untouched.

    Note: the live placement binary still runs the pre-change code — the new summaries and owner_load_coverage appear in receipts once a build containing this merge is deployed through the normal fleet-static publish.

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/fleetstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions