Skip to content

Show how long a scheduled Pass has been skipping, and why #1960

Open

Description

@JacobStephens2

This was generated by AI during triage.

From a 2026-11-10 investigation of why the Fix run Pass never repaired the Merge conflicts on #1823 and #1935.

Agent Brief

Category: enhancement
Summary: A Pass that skips every time it fires looks healthy. The Console's Cron jobs page says "Fix run last fired 89 sec ago", and the Activity log only records a skip when its reason changes. A Fix run Pass skipped for 11 days on thirdshift.app and nobody saw it.

Current behavior:

  • The cron line 1-59/2 * * * * cd ~/repos/thirdshift && thirdshift fix base main on thirdshift.app fired every two minutes. Since its Pass shipped, it started no Fix run: no commands/fix/ directory existed under its logs.
  • Its Activity log had only these lines, one per change of reason: Fix run skipped: at the Command limit on JacobStephens2/thirdshift: 1 Command is running, pass.command_limit is 1, and Fix run skipped: Base branch CI is reserved on origin (an orphaned ci-red reservation held since 2026-10-30).
  • Cron jobs' "Last fired by repository" counts a skipped Pass as fired.
  • Keep repositories visible on Inbox rows without an issue #1823 and Spec: in-progress marks only a live Run #1935 showed a Merge conflict pill and a Copy fix command in Ready for review, with nothing saying that the scheduled Fix run Passes kept skipping.

Desired behavior:

Show how long a scheduled Pass has gone without doing work, and why:

  • Cron jobs ("Last fired by repository") separates the last start that did work from the last skip, and gives the current skip reason and how long it has held, e.g. "Fix run: last did work never; skipping since 2026-10-30 10:21: Base branch CI is reserved on origin".
  • A Ready for review row with a Merge conflict or CI red, on a repository where a Fix run Pass is firing, says why no Fix run has taken it, e.g. "Fix run Passes have skipped for 11 days: Base branch CI is reserved on origin".
  • Optional: once a Pass has skipped for the same reason past a threshold, it shows up in Needs you. This is not a timer on any reservation; it only reports.

Key interfaces:

  • src/logs/pass_starts.rs and the per-repository <kind>.last-fired files: record the outcome (worked or skipped, and the reason) and the time it began, not just the last start.
  • src/console/cronjobs.rs: shows them.
  • Inbox Ready for review rows with Merge conflict or CI red.
  • cronjobs --json and status --json pass_starts: add the outcome, reason and since-when, keeping the existing fields.

Acceptance criteria:

  • After several skips for one reason, Cron jobs shows the reason and when the run of skips began, apart from the last fired time.
  • A Pass that starts work resets the run of skips.
  • A Ready for review row with a Merge conflict shows the current Fix run Pass skip reason on that machine when there is one.
  • activity.quiet_skips still keeps skips out of the Activity log. The Console's state is recorded either way.
  • Existing pass_starts JSON fields are unchanged.

Out of scope:

  • Changing why Passes skip.

Activity

  1. added
    needs-triage
    on Nov 10, 2026
  2. JacobStephens2 commented on Nov 10, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    A related case to cover here: a Ready issue that every Pickup run passes over is invisible too.

    On 2026-11-10, Spec #1901 was labelled ready-for-agent, and Pickup runs on test, orchestrate and lima-thirdshift logged #1901 every Ticket is closed every two minutes. The Console's Overview showed nothing about it: it lists Commands, not issues, and its two dead Spec run rows had been dismissed to Resolved. From the Console and GitHub alone, it looked as if #1901 should have been running.

    The passed-over reasons already exist: Pickup prints them on stderr (blocked by, every Ticket is closed, has no Ticket that can start, started: …). The ready.rs search computes them.

    Proposed addition to this issue's Desired behavior:

    • The Console shows each Ready issue that Pickup runs keep passing over, with the reason and since when, e.g. "Ready but passed over: Spec: in-progress marks only a live Run #1901, every Ticket is closed (3 machines, since 13:03)".
    • status --json exposes the same, beside pass_starts.

    Additional acceptance criterion:

    • A ready-for-agent issue that a Pickup run passed over on its last pass appears in the Console with the pass-over reason, and disappears once a Command takes it or its label changes.

    Taking such a Spec when its Spec branch is on origin is tracked separately (#1964).

  3. added
    in-progress
    and removed
    needs-triage
    on Nov 11, 2026
  4. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Investigation summary

    Confirmed the visibility gap against selected Base commit 960513a, which equals local main. The expanded request needs a Spec split and decisions about observation freshness before unattended implementation.

    Evidence:

    • src/launch.rs:354 records a firing before admission. src/logs/recording.rs:198 atomically replaces .last-fired with a timestamp; src/logs/pass_starts.rs:11 exposes only repository, kind, last_fired_at and age_seconds. These records cannot distinguish work from skips or preserve a skip streak.
    • Some skip visibility already exists: src/logs/reading.rs:638 derives idle_passes, including reason and recorded_at, from the last Activity line of each kind. src/console/inbox.html:55 displays these. This provides neither a last-work timestamp nor structured per-issue Pickup observations.
    • src/ready.rs:333 emits pass-over explanations through a string callback and stops at the first Ready issue. src/pickup.rs:261 also reports reservation/recheck failures. A Pass can pass over one issue and successfully take another; a Pass-level skip record alone cannot represent the requested issue view. An issue not examined by a later search cannot safely be treated as cleared.
    • src/logs/status/inbox.rs:111 adds CI, Merge conflict and Fix-command presentation to Ready for review rows, but no Fix Pass explanation. src/logs/status/fleet.rs merges remote Commands without aggregating remote pass_starts or idle_passes; the proposed multi-machine issue count needs explicit Fleet support.

    Acceptance correction: activity.quiet_skips suppresses terminal output, not Activity logging. Reason changes remain recorded, as required by ADR 0011 and docs/guide.md:3043. Preserve that behavior while recording the new state independently.

    Recommended next steps

    Keep #1960 open as ready-for-human and shape the four Tickets proposed in the questionnaire. Preserve existing pass_starts fields and legacy timestamp readability; represent unavailable historical work information as unknown rather than asserting never. Cover unchanged skips, changed reasons, work-start reset, overlapping Passes, legacy records, partial Pickup searches, issue removal and stale Fleet observations.

    Keep selection changes outside this work: #1964 covers completed-Spec pickup, #1958 covers the Fix CI-reservation gate, #1959 covers orphaned reservations, #1962 covers Review-specific explanations, and #1969 covers Fleet schedule inventory. These are related, not duplicates. Update the guide, generated manual and relevant hand-written site descriptions with implementation.

    Questionnaire

    For the Day shift shaping #1960: investigation confirms the missing Pass history and per-issue Pickup observations. Existing idle_passes already expose the last recorded reason, and quiet_skips preserves Activity reason changes. Please settle these decisions before handing the expanded work to agents.

    1. Approve this four-Ticket Spec split, or identify a smaller first delivery: (A) persist Pass firing/work/skip history and expose it through cronjobs/status JSON and Cron jobs; (B, blocked by A) annotate applicable Ready for review rows with the owning machine's observed Fix Pass reason; (C) persist structured per-issue Pickup pass-over observations and expose them locally through status and the Console; (D, blocked by C) aggregate those observations across the Fleet with machine counts and freshness. Coordinate schedule inventory with make a view in thirdshift console web ui which lets you see by repository which host in the fleet runs which cronjob / which type of thirdshift run on schedule #1969. This establishes independently testable scope and dependencies.
    2. Should 'did work' mean reaching the existing logs::started boundary, even if the Command subsequently fails? Recommended: yes; track time without work separately from time holding the current skip reason, and show historical work as unknown for legacy records. This determines reset and migration behavior.
    3. Which issues should the Pickup view include: every observed pass-over reason, or only Trusted, top-level issues labelled ready-for-agent? Recommended: the latter, including blocked, previously started and all-closed Specs. The glossary's Ready issue excludes several of these cases. This determines the view's population without changing selection rules.
    4. Approve clearing observations through fresh evidence of a Claim, label removal, closure or successful selection, while retaining unexamined observations with their last-observed time. For unavailable GitHub answers or Fleet machines, should observations remain visibly stale and be excluded from current machine counts? This resolves partial-search and offline-host behavior without implying that every Pass examines every issue.
    5. Defer the optional Needs you escalation? Recommended: defer it. If required in this Spec, specify which reasons deserve escalation and the threshold; elapsed idle time alone also includes healthy 'nothing to do' skips.
  5. added
    enhancement
    ready-for-human
    and removed
    in-progress
    on Nov 11, 2026
  6. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Moved to ready-for-human for a grill with the Day shift, not a machine triage. The body and the comment above describe the gap, but the remaining choices are about Console design and policy:

    • Where the skip state and passed-over Ready issues appear: Cron jobs, the Overview, Needs you, the Ready for review row, or several of these.
    • Whether a long run of skips reaches Needs you, and after how long.
    • How the record of a run of skips is kept across hosts and versions without changing the existing pass_starts fields.
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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions