Repository navigation
fix: v0.3.1 one footer per check, not one per step - #6
Merged
Merged
Conversation
trentina's first lane run printed this:
== image-tests passed in 0s
== image-tests passed in 56s
v0.3.0 added a per-check footer because buffering collapses the timestamps
people were reading the `== <step>` markers for -- and then wrote it per STEP.
`pytest-in-image` is two steps, installing the lock's pytest into the cache
volume and then running the tests in the image, so the check that takes the
longest was the one whose timing came out wrong, twice over.
One footer per check now, carrying the time all of its steps took. The host
contract test grew a two-step check; it fails against v0.3.0's launcher with
"printed 2 footers, want 1" and with the sum reported as the last step alone.
Found by reading the output of the thing I had just shipped, which is the only
reason it was found at all -- no test had a multi-step check in it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6
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.
The bug, from trentina's first lane run
trentina run 41851894249,
sdlc cion gloval:v0.3.0 added the per-check footer because buffering collapses the GitHub timestamps people were reading the
== <step>markers for. Then it wrote the footer per step.pytest-in-imageis two steps — install the lock's pytest into the cache volume, then run the tests inside the image — so the check that takes the longest in the whole job is exactly the one whose timing came out wrong, and wrong twice: a spurious0sline, and a56sthat is the last step rather than the check.Fix
The footer moves to
_close_check, which already existed and already ran exactly once per check. It carries_cur_took, the sum of every step's elapsed time, and the failure wording moves with it so a failed multi-step check reports one line too.Test
tests/test_host_contract.shgrew a two-step check, which no test had before — which is why this shipped. It asserts exactly one footer, that the footer sums the steps rather than reporting the last one, and that both steps still ran.Checked against the shipped launcher:
git checkout main -- bin/sdlcand the new assertions fail withHow it was found
By reading the output of the thing I had just shipped, while taking the timing measurements. No test covered a multi-step check, so nothing else would have caught it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6