Skip to content

ci: paths-ignore + cancel-in-progress on CI + Coverage Floor#83

Merged
topcoder1 merged 1 commit into
mainfrom
ci/quick-wins-budget-optimize
May 24, 2026
Merged

ci: paths-ignore + cancel-in-progress on CI + Coverage Floor#83
topcoder1 merged 1 commit into
mainfrom
ci/quick-wins-budget-optimize

Conversation

@topcoder1

Copy link
Copy Markdown
Owner

Summary

  • Adds paths-ignore: ["**/*.md", "docs/**"] to both ci.yml and coverage-floor.yml so docs-only commits don't burn CI minutes
  • Adds top-level concurrency: block to both workflows to cancel in-progress runs on PR updates (superseded pushes are wasted spend)
  • No job/step logic touched — trigger config only

Mirrors topcoder1/webcrawl#221 as the proven fleet precedent. nanoclaw is the #6 fleet spender (~123 runs/wk); est ~$2–3/mo saved.

Auto-merge rationale: CI-only YAML change touching .github/workflows/** which is on the high-risk surface — defers to manual click-merge per claude-author-automerge.yml policy. No production code touched.

Preflight notes

  • bb-preflight working-tree warning: pre-existing uncommitted source changes on main (stashed, not part of this PR — stash residue shows as untracked). The 2 changed files pass npx prettier --check cleanly.
  • Prettier warning: 70 pre-existing files fail prettier in this repo; neither changed file is among them.

Test plan

  • actionlint passes on both modified workflow files (no syntax errors in trigger config)
  • On next PR to nanoclaw, both CI and Coverage Floor workflows fire correctly
  • A docs-only PR (touching only .md files) skips both workflows
  • A superseded push to a PR branch cancels the previous in-progress run
  • Monitor weekly run count vs ~123 runs/wk baseline over next 2 weeks

🤖 Generated with Claude Code

Mirrors topcoder1/webcrawl#221 — paths-ignore for docs-only PRs and
concurrency.cancel-in-progress on PR events. Cuts wasted runs from
docs commits and superseded pushes. nanoclaw is the #6 fleet spender
(~123 runs/wk); est ~$2-3/mo saved.

Auto-merge rationale: CI-only YAML change touching .github/workflows/**
which is on the high-risk surface — defers to manual click-merge per
claude-author-automerge.yml policy. No production code touched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Auto-merge blocked — risk-tier paths touched.

This Claude-authored PR modifies files matching the risk-tier patterns
defined in the global CLAUDE.md policy (auth / secrets / migrations /
billing / production infra). Manual click-merge required, OR use one of
the bypass paths below.

Matched files:

.github/workflows/ci.yml (matched: ^\.github/workflows/.*)
.github/workflows/coverage-floor.yml (matched: ^\.github/workflows/.*)```

**Bypass options (no PR detail navigation needed):**

- Apply the `auto-merge-approved` label to this PR. The workflow will re-run on
  the label event and enable auto-merge. One click from the PR list page.
- Wait for the `review / Codex Review` status check to pass. If Codex Review is
  installed on this repo and it returns SUCCESS, the workflow auto-bypasses
  the risk gate on its next run (e.g. on push of a fixup commit).

If a path is misclassified, fix the regex in
`topcoder1/ci-workflows/.github/workflows/claude-author-automerge.yml`.

@github-actions github-actions Bot added the risk:blocked Risk class: blocked label May 24, 2026
@github-actions

github-actions Bot commented May 24, 2026

Copy link
Copy Markdown

Risk class: blocked — manual merge required.

This PR touches one of the blocked path categories from .github/risk-paths.yml (Dockerfiles, docker-compose, .github/workflows/**, **/.env*, **/secrets*, infra/, terraform/, k8s/, or the classifier config itself).

Auto-merge is refused by claude-author-automerge.yml. A maintainer should review the diff and click "Squash and merge" themselves.

(This is a policy notice, not a code-quality failure. The classify job itself does not fail — required CI checks remain authoritative for "is the code green.")

@github-actions

Copy link
Copy Markdown

Coverage Floor — mode: enforce

metric value
measured %
floor (current) 70.8%
target 80.0%
last bumped 2026-05-22

@claude

claude Bot commented May 24, 2026

Copy link
Copy Markdown

No issues found. CI-only trigger config change — paths-ignore and concurrency logic are correct.

@topcoder1 topcoder1 merged commit 27c7dc0 into main May 24, 2026
13 of 15 checks passed
@topcoder1 topcoder1 deleted the ci/quick-wins-budget-optimize branch May 24, 2026 05:35
topcoder1 added a commit that referenced this pull request May 24, 2026
## Summary
- Add `reportOnFailure: true` to vitest's coverage config so
`coverage/coverage-summary.json` gets written even when tests fail.
- Without this, the [Coverage Floor
reusable](https://github.com/topcoder1/ci-workflows/blob/main/.github/workflows/coverage-floor.yml)
fails with `no coverage/coverage-summary.json produced` on every PR that
has even one flaky test (the workflow's `|| true` on `vitest --coverage`
swallows the exit code, but vitest never wrote the file in the first
place).

## Why now
Coverage Floor has been failing on every nanoclaw PR since 2026-05-24
(one test in `src/brain/__tests__/wiki-projection.test.ts` started
failing intermittently — fixing it is a separate task). PR #83 was
admin-bypass-merged for this same reason. With this fix, Coverage Floor
will produce a real measurement regardless of test failures, and the
main-protection required check can gate PRs cleanly.

## Repro / verification
Locally with the prior config (no `reportOnFailure`):
```
$ npx vitest run --coverage  # 3 test files fail
$ ls coverage/
ls: coverage: No such file or directory
```

With the fix:
```
$ npx vitest run --coverage  # same 3 test files fail
$ jq '.total.lines' coverage/coverage-summary.json
{ "total": 14258, "covered": 10277, "skipped": 0, "pct": 72.07 }
```

Above the current floor of 70.8 — no recalibration needed.

## Auto-merge rationale
Trivial test-config tweak (1 option in `vitest.config.ts`). Not in any
high-risk surface (no auth/secrets/migrations/billing/destructive
ops/prod infra/customer-facing copy).

## Codex pre-review
Skipped — 1-line config change (5 LOC including comment), far below the
threshold.

## Test plan
- [ ] CI confirms Coverage Floor reports a `measured coverage:` value
(not the `no coverage-summary.json` error)
- [ ] Coverage Floor check passes (measured ≥ 70.8 floor)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:blocked Risk class: blocked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant