Skip to content

Stamp the release script's progress lines with the local time - #1159

Merged
JacobStephens2 merged 4 commits into
mainfrom
issue-1041
Oct 23, 2026
Merged

JacobStephens2 merged 4 commits into
mainfrom
issue-1041

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Every release: line from scripts/release.sh now has the local time as HH:MM:SS after its prefix, the same shape as thirdshift's own progress lines. A long wait can now be told from a stalled one.

 release: waiting for CI on main at a9a6509
-release: opened https://github.com/JacobStephens2/thirdshift/pull/980
-release: waiting for CI on https://github.com/JacobStephens2/thirdshift/pull/980
+release: 18:20:41 opened https://github.com/JacobStephens2/thirdshift/pull/980
+release: 18:20:41 waiting for CI on https://github.com/JacobStephens2/thirdshift/pull/980
 thirdshift: 18:20:32 writing the release summary with codex · gpt-6.1-sol · high
stamp()            # 'release: ' + printf %(%H:%M:%S)T: the one place the format lives
progress <msg>     # stamp + msg + newline, on stderr (refusals, warnings, every step)
review_summary     # stamp + "open the PR with this summary? [y]es / [e]dit / [n]o "

docs/guide.md (and the generated site/docs/index.html) say so. The tests read stderr through unstamped(), which fails on any release: line without a stamp.

Lines that other programs print and the script passes through, such as git push's remote: lines and gh's Warning:, stay unstamped. The release: line printed before each of them is stamped.

Evidence

  • Before (main's scripts/release.sh, new tests):
    test a_progress_line_is_stamped_with_the_local_time_it_was_printed ... FAILED
      no HH:MM:SS stamp in "release: waiting on 100% of %s runs\n"
    test each_step_prints_a_progress_line_on_stderr ... FAILED
      no HH:MM:SS stamp in "release: bumping the version to 0.2.0 on release-0.2.0 from main at b9f6171"
    
    After: cargo test --test release: 74 passed, 0 failed, 2 ignored.
  • The focused test runs progress under TZ=Pacific/Kiritimati (UTC+14) and checks the stamp against that clock. A version that stamps UTC (TZ=UTC printf …) fails it: 14:24:45 not in 04:24:45..04:24:45.06.
  • scripts/affected-tests main picks the full suite plus the site tests:
    • Site tests: 44 passed.
    • cargo clippy --test release -- -D warnings and cargo fmt --check pass. node generate-docs.mjs --check passes.
    • cargo test: 1240 of the 1243 --bin thirdshift tests passed. The other 3, the worktree::synchronization_tests::*_shadowing_branch_and_tag_names tests, fail only on this machine: its global git config has tag.gpgsign true, so git tag asks for a message. All 3 pass with GIT_CONFIG_GLOBAL pointed at a config without signing. This branch doesn't change src/worktree/.
    • cargo test stopped at that failure, so the other integration-test files did not run locally. CI runs them. This change touches only tests/release*, and that file passed in full.
    • test_generate_release.py fails here because this host has Python 3.9, which has no tomllib. This branch doesn't change scripts/generate-release.py.

Merge Danger

Door: two-way

Only the text of the maintainer's release script output changes. Reverting removes the stamps.

Blast Radius: maintainer-only

Only someone running scripts/release.sh sees it. No thirdshift command, CI workflow or release artifact reads these lines. %(…)T needs bash 4.2; the script already needs 4.4 for inherit_errexit.

Review coverage

Both reviews read all five changed files. site/docs/index.html is generated from docs/guide.md; both reviewers also read its one-line diff and confirmed that generate-docs.mjs --check passes. The review ran at 0315f8a. 656689e then changed scripts/release.sh, tests/release.rs and tests/release/lifetime.rs to address its findings. No reviewer re-read those changes, but they are files the review had read.

Unaddressed findings

Standards

  • Portability: %(…)T needs bash 4.2 (judgement call). The script already needs bash 4.4: scripts/release.sh:51 runs shopt -s inherit_errexit, which fails under set -e on any older bash. The script's tests are also Linux-only. No new requirement.
  • The review prompt is stamped, but thirdshift's own prompts are not (judgement call). On main the prompt was already a release:-prefixed line (printf 'release: open the PR with this summary? …'). Stamping it keeps every release: line the same shape, which the issue asks for ("add timestamps to release script output"). The Spec review found it in scope.

Spec

  • Lines from child commands, the usage line and the --review summary block are unstamped. The issue asks how long it had been "since that last output". The line printed before each wait is now a stamped release: line, so that time can be read. Stamping other programs' output would mean wrapping every git, gh and cargo call. thirdshift's own lines, relayed through cargo run, are already stamped. The usage line exits 2 before any work. The summary block is the PR text the maintainer is reviewing, not a progress line.
  • The review prompt runs into the next line when stdin is piped. This is not new: the prompt on main ends without a newline too (printf 'release: open the PR with this summary? [y]es / [e]dit / [n]o ' >&2). On a terminal, the maintainer's Enter ends the line.

Closes #1041

Built with claude · claude-opus-5-5 · high

Security review outcome

No unaddressed introduced findings.

Each release: line now carries HH:MM:SS after its prefix, as thirdshift's
own progress lines do, so a long wait can be told from a stalled one.
The --review prompt is stamped too.
Review follow-up: stamp() is the one format, the focused test pins TZ
so a UTC stamp fails it, and refusal and lifetime checks assert the
stamp too.
@JacobStephens2
JacobStephens2 merged commit 46f464a into main Oct 23, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1041 branch October 23, 2026 15:43
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add timestamps to release script output

1 participant