Skip to content

ci: budget-friendly defaults + templates for gitguardex-managed projects#571

Merged
NagyVikt merged 1 commit into
mainfrom
agent/claude/budget-friendly-ci-templates-2026-05-14-00-52
May 13, 2026
Merged

ci: budget-friendly defaults + templates for gitguardex-managed projects#571
NagyVikt merged 1 commit into
mainfrom
agent/claude/budget-friendly-ci-templates-2026-05-14-00-52

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Summary

Coordinated budget posture across the gitguardex repo's own workflows + seed templates/github/workflows/ so every downstream gitguardex-managed project inherits the same defaults.

Live workflows:

  • ci.yml — drop push: main + Node matrix from per-PR; add paths-ignore for docs/openspec/changeset paths; add concurrency: cancel-in-progress; gate test job on pull_request.draft == false; add ready_for_review to trigger.
  • ci-full.yml (new) — weekly schedule + workflow_dispatch runs the cross-version Node 18/22 matrix that no longer runs per-PR.
  • codeql.yml — drop push and pull_request triggers; keep weekly schedule + branch_protection_rule + workflow_dispatch; add concurrency.
  • cr.yml — skip on draft AND on agent/* head branches (the largest single CR-bill cut for agent-heavy repos); add concurrency; add ready_for_review trigger.
  • scorecard.yml — drop push: main; keep weekly schedule + branch_protection_rule + workflow_dispatch.

Templates seeded under templates/github/workflows/:

  • ci.yml, ci-full.yml, cr.yml mirror the same posture with placeholder steps.
  • README.md documents the four trims, when to keep them, and when to relax.

OpenSpec change: agent-claude-budget-friendly-ci-templates-2026-05-14-00-52 records the contract.

Test plan

  • npm test green
  • bash scripts/check-script-symlinks.sh green
  • All 8 modified/new workflow YAMLs parse via js-yaml
  • openspec validate agent-claude-budget-friendly-ci-templates-2026-05-14-00-52 --type change --strict valid
  • Verify on next merge to main: CodeQL/Scorecard do not run; only the lean ci.yml runs
  • Verify weekly: ci-full.yml, codeql.yml, scorecard.yml all fire on their schedules

🤖 Generated with Claude Code

Agent flows land high-volume PRs per month. Without these trims every
PR + every post-merge push fans out across CI, CodeQL, Scorecard, and
Code Review — which has dominated this month's Actions bill and
blocked merges on multiple downstream repos when the org spending
limit tripped.

Live workflows:
- ci.yml: drop push:main + Node matrix from per-PR; add paths-ignore
  + concurrency + draft-skip + ready_for_review.
- ci-full.yml (new): weekly cron + workflow_dispatch carrying the
  cross-version Node 18/22 matrix that no longer runs per-PR.
- codeql.yml: schedule + workflow_dispatch only (drops push/PR).
- cr.yml: skip on draft AND on agent/* head branches; add concurrency.
- scorecard.yml: drop push:main (keep schedule + branch_protection_rule
  + workflow_dispatch).

Templates under templates/github/workflows/:
- ci.yml, ci-full.yml, cr.yml mirror the live posture so downstream
  gitguardex-managed projects inherit it.
- README.md documents the four trims, when to keep them, and when to
  relax them.

OpenSpec change agent-claude-budget-friendly-ci-templates-2026-05-14-00-52
records the contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@NagyVikt NagyVikt merged commit 8e00460 into main May 13, 2026
1 of 2 checks passed
@NagyVikt NagyVikt deleted the agent/claude/budget-friendly-ci-templates-2026-05-14-00-52 branch May 13, 2026 23:00
NagyVikt added a commit that referenced this pull request May 13, 2026
Adds escape hatches for the budget-friendly defaults. Both apply
identically in the live workflows AND the templates ship to downstream
projects.

- cr.yml: agent/* PRs still skip AI review by default, but the
  `needs-review` label overrides the skip for that one PR.
- ci-full.yml: weekly schedule + workflow_dispatch unchanged, plus
  per-PR opt-in via the `needs-ci-full` label.

Both workflows add `labeled` to their pull_request.types so applying
the label fires the run immediately — no re-push required. README
documents the labels and points at `gh label create` for setup.

Pre-existing test/metadata.test.js failures (4) are stale assertions
from PR #571 and remain out of scope here.

Co-authored-by: NagyVikt <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
NagyVikt added a commit that referenced this pull request May 14, 2026
…trims (#576)

The four metadata.test.js failures predated this PR — three are stale
assertions that drifted out of sync with intentional repo changes, one
is a legitimately missing release-notes entry for v7.0.43.

- Add `### v7.0.43` release-notes section covering the
  budget-friendly CI templates, gx ci-init, gx budget, label-based
  opt-in, and the pre-flight gate in gx branch finish.
- Loosen the cosign-installer assertion from `# v4.1.1` to `# v4.1.\d+`
  so a patch bump (already present at v4.1.2) doesn't break the gate;
  major/minor bumps still do.
- Split the "About copy + problem-solution visuals" test into two:
  - keep enforcing the problem/solution image links in README
  - retire the README->about_description.txt link assertion that
    PR #564 obsoleted; package.json description must still match
    about_description.txt
- Split the "CI and CodeQL workflows run on PRs" test into two:
  - keep the CI-on-PR check (still required)
  - replace the CodeQL-on-PR check with a schedule + workflow_dispatch
    + "no pull_request trigger" check matching the post-PR-#571 reality

Verification: `node --test test/metadata.test.js` now reports 27/27
passing (was 21/25 before this PR).

Co-authored-by: NagyVikt <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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