Repository navigation
tests.yml: main gets a push trigger for the ubuntu job alone, so a squash landing is tested instead of only the pull request it squashed (#122) - #124
Conversation
…uash landing is tested instead of only the pull request it squashed (#122) `.github/workflows/tests.yml` ran on `pull_request` and `workflow_dispatch` only, so `main` itself was never tested by CI: a squash of several disjoint pull requests landing in one evening (tonight's #116, #117 and #121) is a tree no run had ever exercised, even though each one was green on its own run. SonarCloud already analyses every push to `main`; the test record stopped at each pull request's last run instead of following it there too. Brett Heap ruled "do option 1 on 122": `on:` gains `push: { branches: [main] }`, and `tests-windows` / `tests-macos` each gain `if: github.event_name != 'push'` so they keep running on `pull_request` and a manual `workflow_dispatch` but skip on the main push — a squash-interaction regression is not OS-specific, so the ubuntu job on `main` is the gate for that, and the two jobs GitHub bills at 2x (Windows) and 10x (macOS) stay the pull-request-only gate they already were. A top-level `concurrency:` group keyed on the PR number (falling back to `github.ref`) cancels a superseded run of the same PR or the same branch, without touching an unrelated PR's in-flight run. The header comment gets one paragraph saying so, for the next reader. Nothing under `templates/` changes; the assembly-root `validate.yml` is a project's own gate and stays digest-pinned. Lane: openreposhape-2 (openRepoShape-2) Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 2 days and 19 hours by commenting @sourcery-ai review. Upgrade to get a review now.
|
@codex review |
Reviewer's GuideUpdates the test workflow to validate the exact squashed tree on pushes to main using the Ubuntu job, preserves Windows/macOS coverage for pull requests and manual runs, and cancels superseded runs within the same PR or ref. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
There was a problem hiding this comment.
🟢 Approval recommended
The scoped workflow changes satisfy the intended CI coverage and preserve existing platform coverage.
Pull request overview
Updates CI so squash merges to main receive Linux test coverage while preserving cross-platform pull-request and manual runs.
Changes:
- Adds a
mainpush trigger. - Skips Windows/macOS jobs only on pushes.
- Adds concurrency cancellation.
File summaries
| File | Description |
|---|---|
.github/workflows/tests.yml |
Adds main-branch Linux testing, event guards, and workflow concurrency. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… workflow too, not only the assembly-root one (#127) (#129) The step that installs actionlint ran it against exactly one file -- templates/assembly-root/.github/workflows/validate.yml, the workflow this repository ships into a scaffolded project. templates/family-root's own validate.yml was in the same boat, and neither lint ever touched .github/workflows/tests.yml itself: the workflow that runs on every push and pull request here. #122/#124 just added an `if:` guard on two jobs and a `concurrency:` expression to that file, with nothing in the loop that would have caught a typo in either. Hand actionlint all three paths from the one step it already runs from, and rename it to say so. actionlint 1.7.12 finds nothing to fix in any of the three files as they stand. Lane: openreposhape-2 (openRepoShape-2) Co-authored-by: Claude Fable 5.1 <[email protected]>



Lane: openreposhape-2 (openRepoShape-2)
Claim: #122 (comment)
Closes #122.
What was wrong
.github/workflows/tests.ymlran onpull_requestandworkflow_dispatchonly.
mainitself was never tested by CI:gh run list --branch mainisempty for the repository's whole history, so a squash of several disjoint
pull requests landing in one evening (tonight's #116, #117 and #121, each
green on its own run) produces a tree no run ever exercised. SonarCloud
already analyses every push to
main; only the test record stopped short ofit.
Brett Heap ruled on #122: "do option 1 on 122" — option 1 being, in the
issue's own words,
push: branches: [main]for thetests(ubuntu) jobonly, the two OS jobs staying pull-request-gated, plus a concurrency group.
What landed
In
.github/workflows/tests.ymlonly (nothing undertemplates/touched —the assembly-root
validate.ymlis a project's own gate and staysdigest-pinned;
tests.ymlitself is not one of the digest-pinned copieslisted in
AGENTS.mdeither):on:gainspush: { branches: [main] };pull_request:andworkflow_dispatch:are unchanged.tests-windowsandtests-macoseach gainif: github.event_name != 'push'— narrower than the issue's own suggested== 'pull_request'guard, so both jobs still run on a manual
workflow_dispatch(a full,all-three-platform run on demand) and skip ONLY the automatic main push.
The ubuntu
testsjob carries no guard and runs on all three events.A comment above each guard says why, in the file's own voice: a
squash-interaction regression is not OS-specific, so the Linux job on
mainis the gate for that, and Windows (2x the Linux billing rate) /macOS (10x) stay the pull-request gate they already were.
concurrency: { group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}, cancel-in-progress: true }so back-to-back landings on
maincancel the superseded run. The groupfalls back to
github.refonly when there is no PR number, so twodifferent pull requests (or a PR versus the
mainbranch) never share agroup and never cancel each other's run — only a re-run of the SAME PR or
the SAME ref does.
pushtrigger isdeliberate and Linux-only, and why, for the next reader.
How it was proven
tests/for anything that reads.github/workflows/tests.yml:every hit (
test_cli_reference.py,test_scaffold_e2e.py,test_repo_hygiene.py,test_shape_doctor.py) is a comment or docstringciting the file for historical/illustrative reasons; none parses its
on:keys, job names, orif:guards, so none could break from thischange.
actionlintis not installed on this workstation (which actionlintfound nothing) and downloading it was not required for this task. CI's
own
actionlintstep in this same file does not covertests.ymlitself — it only lints
templates/assembly-root/.github/workflows/validate.yml— so there is no automated actionlint coverage of this change, on this
workstation or in CI. Verified instead by parsing the file with PyYAML
and asserting the exact structure landed (
on:keys includingpush,the
concurrency:block, and each job'sif:), and by manual review:the
if:guards and theconcurrency:expression are standard GitHubActions context-expression syntax, with no
secretsin anif:(theclass of defect the header comment already names as what actionlint would
have caught before it reached a real project's pull request).
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/tests.yml'))"parses cleanly.
once after rebasing onto
origin/main(3d3c155) onceupdate-shape.py apply --branchandfamily.py bumptake a repeatable--trailer, and the printedapplyalready carries the lane, so the commit they write ends with itsLane:line instead of being amended afterwards (#111) #112 landed underthis branch: 1131 passed, 1 skipped, 1 failed, identically both
times. The one failure,
tests/test_naming_policy.py::test_cli_reports_an_unread_link_as_a_warning_and_still_classifies,is the pre-existing machine-dependent flake called out for every lane in
tonight's fan-out until tests/test_naming_policy.py: give the unread-link-warning test its own tmp_path so a sibling openXdox checkout cannot flip it, and split a composite assertion so a failure names which half broke (#114) #120 lands — not caused by this change.
🤖 Generated with Claude Code
Summary by Sourcery
Run Linux CI on main-branch pushes and streamline workflow concurrency while preserving cross-platform pull-request coverage.
New Features:
Enhancements:
CI: