Skip to content

fleet-queue: sweep_wiring_runs_the_detective_beside_the_recheckers fails on main (whitespace-sensitive source assertion) #13215

Closed

Description

@dezren39

Problem

On current main (c22ec1948eb), the fleet-queue test suite has one failing test:

turso_queue::closed_bound::tests::sweep_wiring_runs_the_detective_beside_the_recheckers
thread '...' panicked at crates/fleet-queue/src/turso_queue/closed_bound.rs:822:9:
assertion failed: flat.contains("run_closed_bound_checks( t, req_i64(req, \"closed_bound_limit\")")

Root cause

The test flattens turso_queue/core.rs by splitting on whitespace and joining with single spaces, then asserts the call appears as run_closed_bound_checks( t, ... — with a space after the open paren, which only holds when the call is formatted across multiple lines.

The call in core.rs (line 1654) is currently formatted on one line:

match run_closed_bound_checks(t, req_i64(req, "closed_bound_limit").unwrap_or(200)) {

so the flattened text contains run_closed_bound_checks(t, and the assertion fails. The wiring itself is correct — the detective does run beside the recheckers; only the whitespace-sensitive source assertion broke, most likely when the call was reformatted onto one line.

Evidence

Found while running the full fleet-queue suite for the #13191 repair-verb work: 556 passed, 1 failed (this test). Both core.rs and closed_bound.rs are untouched by that change — the failure is pre-existing on main.

Fix options

  • Make the assertion whitespace-insensitive (e.g. strip all whitespace from both sides before comparing), or
  • Reformat the call in core.rs back to multi-line form.

The first is more durable: source-shape assertions should not depend on formatter line-breaking.

{
  "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-23T11:03:04Z",
    "session_id": null,
    "lane": null,
    "host": "amd",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "oc-code-01",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 23, 2026

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

    @dezren39
    MemberAuthor

    Claim — Lane SJ (archer): taking this. The failing assertion is in crates/fleet-queue/src/turso_queue/closed_bound.rs; fix = make the source-shape assertion whitespace-insensitive (strip all whitespace both sides) rather than reformatting the call in core.rs, per the issue's preferred durable option. Worktree off current main on the laptop; will verify the test fails pre-fix and passes post-fix, then run the fleet-queue suite.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Progress — Lane SJ: PR #13228 open (head b4d5c3fa0ba). The assertion now strips all whitespace from both sides. Verified on the laptop: pre-fix failure reproduced at closed_bound.rs:822; post-fix the named test passes and the full fleet-queue suite (--features client,queue-broker) is green — lib 564/564. Remote dispatch attempted (run 45165675392); the container's missing-cargo gap (code#13170) makes the laptop run the verifying route.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Done — Lane SJ. PR #13228 merged (70423c0e035a, head SHA-guarded at b4d5c3fa0ba); issue closed as completed (verified by read-back).

    The fix: sweep_wiring_runs_the_detective_beside_the_recheckers now strips all whitespace from both the core.rs source and the needle before comparing, so the assertion pins the closed-bound call's shape rather than the formatter's line-breaking.

    Verification (laptop route):

    • Pre-fix failure reproduced first-hand in the worktree: FAILED at closed_bound.rs:822 with the issue's exact assertion.
    • Post-fix: named test passes; full cargo test -p fleet-queue --features client,queue-broker green — lib 564 passed / 0 failed, integration suites green (2 + 5).
    • Mutation check: restoring the old whitespace-joined assertion fails the test; the new one passes.
    • rustfmt --check clean on the touched file.
    • Remote dispatch attempted first-class (dezren39/fleet run 45165675392): failed with cargo: command not found, exit 127 — the fleet-build container toolchain gap tracked as code#13170 (family of flag-held code#13159). An environment failure, not a test result; the laptop run is the verifying route.
  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Fixed by PR #13226 (branch queue/code-h-13215, commit 342ac0e). Focused verification: cargo +1.99.1 test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --locked --features queue-broker sweep_wiring_runs_the_detective_beside_the_recheckers — passed (1 passed, 0 failed): https://github.com/dezren39/fleet/actions/runs/45176386271

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions