Skip to content

add timestamps to thirdshift stderr output to see if stalled #153

Closed

Description

@JacobStephens2

this got me wondering:

thirdshift: waiting up to 60s for CI on 43c638c
thirdshift: CI on 43c638c: 3 of 3 checks still running
thirdshift: CI on 43c638c: 4 of 5 checks still running
thirdshift: CI on 43c638c: 3 of 5 checks still running
thirdshift: CI on 43c638c: 2 of 5 checks still running
thirdshift: CI on 43c638c: 1 of 5 checks still running
thirdshift: CI on 43c638c: 2 of 7 checks still running
thirdshift: CI on 43c638c: 1 of 9 checks still running
thirdshift: CI failed on 43c638c: test-macos
thirdshift: CI red; starting Repair 1 of 5
thirdshift: logging the session to /home/jacob/.thirdshift/logs/JacobStephens2-thirdshift-issue-130-20260929T231726Z-repair-1.jsonl
thirdshift: repair-1: session started
thirdshift: repair-1: $ gh run view 36645841730 --log-failed | tail -80
thirdshift: repair-1: $ TMPDIR=$(mktemp -d) XDG_CACHE_HOME=$TMPDIR gh run view 36645841730 --log-failed 2>&1 | tail -80 || g…
thirdshift: repair-1: $ sed -n 220,245p tests/support/mod.rs
thirdshift: repair-1: $ sed -i '233,234s/std::ptr::null()/std::ptr::null_mut()/' tests/support/mod.rs && sed -n 229,235p tes…
thirdshift: repair-1: commit and push
thirdshift: repair-1: session ended after 4m 7s: 6 turns, $0.24 at API prices
thirdshift: merging origin/main into issue-130
thirdshift: pushing issue-130
thirdshift: waiting up to 60s for CI on 6ecb849
thirdshift: CI on 6ecb849: 3 of 3 checks still running
thirdshift: CI on 6ecb849: 4 of 5 checks still running
thirdshift: CI on 6ecb849: 3 of 5 checks still running
thirdshift: CI on 6ecb849: 4 of 7 checks still running
thirdshift: CI on 6ecb849: 1 of 13 checks still running
thirdshift: CI passed on 6ecb849
thirdshift: origin/main moved while CI ran; merging it again
thirdshift: merging origin/main into issue-130
thirdshift: pushing issue-130
thirdshift: waiting up to 60s for CI on dec637d
thirdshift: CI on dec637d: 3 of 3 checks still running
thirdshift: CI on dec637d: 4 of 5 checks still running
thirdshift: CI on dec637d: 3 of 9 checks still running
thirdshift: CI on dec637d: 1 of 13 checks still running

Activity

  1. JacobStephens2 commented on Sep 30, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: Every thirdshift stderr line carries the local time, so a user can tell a stalled Run from a busy one

    Current behavior:
    thirdshift's progress lines on stderr have no times. That covers its own steps ("pushing issue-148", "CI on 26c8b06: 2 of 5 checks still running") and the one-line summaries of a session's events ("implement: $ cargo test …"). When the terminal goes quiet, the user can't tell whether the last line came a minute ago or twenty. They end up opening the session log or checking ps to find out if the Run is stalled. This came up for real on 2026-09-30: a #148 session's test suite ran for more than ten minutes behind a single progress line.

    Desired behavior:
    Each line thirdshift writes to stderr starts with the local wall-clock time (HH:MM:SS) right after the thirdshift: prefix:

    thirdshift: 12:14:49 implement: $ cargo test 2>&1 | tail -40
    thirdshift: 12:25:03 CI on 26c8b06: 2 of 5 checks still running
    

    This covers thirdshift's own steps and the condensed session lines. In a Spec run, a Ticket's child thirdshift already stamps its own lines, so its relayed lines are not stamped a second time.

    Key interfaces:

    • The single function that prints thirdshift's own steps, and the path that prints a session's condensed lines: both go through the new stamp
    • The relay of a Ticket's Run stderr in a Spec run: it keeps the child's stamp and doesn't add one
    • Tests that assert on exact stderr lines: they need a way to match with the time removed or ignored (e.g. a helper that strips the stamp), not a fixed clock baked into the binary's behavior

    Acceptance criteria:

    • Every stderr line thirdshift prints during a Run, whether its own step or a condensed session line, has the form thirdshift: HH:MM:SS <message> in local time
    • In a Spec run, each relayed Ticket line has exactly one timestamp
    • Lines printed after the terminal has closed still fail silently, as they do now
    • The Run notification, the Failed run comment, the PR body and session logs are unchanged
    • The existing stderr assertions in the test suite pass, adjusted to ignore the time

    Out of scope:

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

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions