Skip to content

fix: v0.3.1 one footer per check, not one per step - #6

Merged
fatherlinux merged 1 commit into
mainfrom
fix/one-footer-per-check
Nov 4, 2026
Merged

fatherlinux merged 1 commit into
mainfrom
fix/one-footer-per-check

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

The bug, from trentina's first lane run

trentina run 41851894249, sdlc ci on gloval:

== image passed in 8s
== image-tests passed in 0s
== image-tests passed in 56s

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-image is 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 spurious 0s line, and a 56s that 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.sh grew 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/sdlc and the new assertions fail with

FAIL a two-step check printed 2 footers, want 1
FAIL the footer does not sum the check's steps

How 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

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found no issues.

Full review.

2 finding(s) dropped: their evidence is not in the diff.

@fatherlinux
fatherlinux merged commit a4281cf into main Nov 4, 2026
10 checks passed
@fatherlinux
fatherlinux deleted the fix/one-footer-per-check branch November 4, 2026 15:03
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.

1 participant