Repository navigation
Stamp each stderr line with the local time - #185
Merged
Merged
Conversation
A Spec run relays a Ticket's lines with the Ticket's own stamp rather than adding a second one. Tests match stderr with the stamps removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every line thirdshift prints on stderr now starts with the local time, so a quiet terminal shows how long the Run has been on its last step:
branch.rs's one directeprintln!goes throughprogress::stepnow, so it gets stamped as well.RunResult.stderrhas the stamps removed byunstamped(), so the existing stderr assertions pass unchanged. The stamped text is kept asstamped_stderr.The Run notification, the Failed run comment, the PR body and session logs don't change: none of them read the stamped stderr.
Evidence
New tests, which fail on
mainand pass here:cargo clippy --all-targetsis clean. Withcargo test, every test file passes exceptspec_run: in two full-suite runs, one timing-sensitive concurrency test failed each time, a different one each run. Both passed when run alone, and all 44spec_runtests passed on a separate run:the_parallel_flag_wins_over_spec_parallel: its sessions wait up to 10s for each other, and it failed under full-suite load.without_a_limit_at_most_three_tickets_run_at_once:#23: git fetch origin issue-20 failed: fatal: bad object worktrees/widgets-issue-21/HEAD. This is a git race between parallel Tickets sharing the Launch directory, and this change doesn't touch it.Merge Danger
Door: two-way
Blast Radius: cosmetic
The format of stderr lines changes. A script that matches lines starting with
thirdshift: <message>now has to allow for the time. stdout, exit codes and everything posted to GitHub or sent by email stay the same.Unaddressed findings
Standards
HH:MM:SScheck is written twice, insrc/progress.rsandtests/support/mod.rs: thirdshift is a binary crate, so the integration tests can't callprogress::split_stamp. The test copy now has the same name and shape, and its doc comment says which function it mirrors.progress::relayboth prints and returns the message: removing the prefix and stamp belongs inprogress, next to the code that adds them. Splitting it would makespec_runhandle the stamp format itself.Spec
thirdshift:prefix. Stamping every line would mean changing how multi-line errors print, which the issue doesn't ask for.questions.rs) and the help text after an argument error are printed unstamped: these are interactive prompts and usage text, not progress lines during a Run.claude's own stderr passes through unstamped: it is output from claude, not a line thirdshift prints.Closes #153
🤖 Generated with Claude Code