Repository navigation
Make harness scripts portable and fail on failed gates - #24
Merged
Merged
Conversation
- harness.sh: exit 1 on any failed gate (2 on missing prerequisites), always write the summary (build result is a gate), keep stdout JSON-only in --report/--baseline, write the baseline at the repo root, use JaCoCo report-level totals, skip PIT after a failed build - check-new-code-coverage.sh: bash 3.2 + BSD awk, python3 XML parsing, executable lines only, include untracked files, diff from the merge base - tests for both scripts; docs, skills and changelog updated
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
Step 4 of the review. The harness now reports failures correctly, and the new-code coverage gate works on macOS.
harness.sh--baselinestill exits 0, since brownfield capture should succeedset -estopped the script whenmvn verifyfailed, before the summary was writtenmvn verifyresult is now abuildgate and the summary is always written; PIT is skipped after a failed build--report > target/harness-summary.jsonand--baseline > .specs/_baseline.json(as the commands/agents tell you to run them) captured Maven's log--module X --baselinewrote.specs/inside the module.specs/_baseline.json<counter>in the fileskippedfailjq/python3not checkedpython3added to the documented prerequisites)The summary also gains
finished_atandoverall. Theharness-report-parsingskill now documents the shape the script actually emits.check-new-code-coverage.shmapfileand gawk-onlymatch(…, arr). It now works on bash 3.2 + BSD awk, withpython3parsing the XML./build. Untracked files now count as new code.origin/main, so changes others merged to main since branching were counted; it now diffs from the merge base.BASE_REFcan't be resolved.Testing
tests/run.sh: 21 new cases (65 total). They use a fakemvnonPATHand a single-line JaCoCo report in a throwaway git repo, and pass on/bin/bash3.2 and bash 5.