Skip to content

fix: keep generated projects' CI green#4

Merged
lilabrooks merged 1 commit into
mainfrom
claude/suspicious-zhukovsky-982d2d
Jul 19, 2026
Merged

fix: keep generated projects' CI green#4
lilabrooks merged 1 commit into
mainfrom
claude/suspicious-zhukovsky-982d2d

Conversation

@lilabrooks

Copy link
Copy Markdown
Owner

Problem

Projects generated from this template inherited CI that referenced the template's single-use generator scripts. After create-project deleted scripts/create-project and scripts/rename-project, three CI things still pointed at them and failed on every push:

  • tests.yml template-smoke ran bash scripts/create-project … (deleted) → fail.
  • tests.yml package-smoke asserted the template's own version and built/tested the sdist — a chassis self-test with no meaning downstream.
  • code-quality.yml "Check shell syntax" ran bash -n scripts/create-project scripts/rename-project (both deleted) → exit 127.

So every generated project shipped red CI until the owner pruned those by hand.

Fix

  • Move the chassis self-tests into their own workflow. template-smoke and package-smoke move from tests.yml into a dedicated .github/workflows/template-chassis.yml. tests.yml keeps only the pytest job, which is meaningful in both the template and a generated project.
  • create-project deletes the workflow. A clean file removal (added to the existing rm -f line), consistent with how it already drops the single-use files — no fragile in-place YAML surgery.
  • Shell check self-heals. code-quality.yml now runs make shell, whose target already guards with $(wildcard …) and no-ops once the generator scripts are gone.
  • Manual path kept in sync. README rm list + layout note and rename-project's printed next-steps now include template-chassis.yml.
  • Test guard. New test_generated_project_ci_has_no_template_only_references asserts a generated project has no template-chassis.yml, keeps exactly {tests, code-quality, coverage}.yml, and that no surviving workflow references the removed scripts.
  • Docs. Entries added to CHANGELOG.md (Unreleased → Fixed) and docs/log.md.

The schemas/ / sdist-include suggestion doesn't apply here — this template has no schemas/ dir or non-src test assets missing from the sdist; package-smoke is relocated unchanged.

Verification

Full make check on this exact tree: ruff, mypy, 68 passed / 2 skipped, coverage 95% (floor 90), okf docs ok. A real create-project run produced a project whose .github/workflows/ holds only code-quality.yml, coverage.yml, tests.yml with zero references to removed scripts and make shell as the shell step.

🤖 Generated with Claude Code

Generated projects inherited template-only CI that referenced the
single-use generator scripts, so their GitHub Actions were red until the
owner pruned them by hand.

Move the chassis self-tests (template-smoke, package-smoke) out of
tests.yml into a dedicated .github/workflows/template-chassis.yml that
create-project deletes from the target and the manual setup path removes
by hand. Point the code-quality "Check shell syntax" step at `make
shell`, whose target already no-ops when the generator scripts are
absent, instead of a hardcoded `bash -n` that exited 127 downstream.

Guard the invariant in test_create_project.py and record the change in
CHANGELOG.md and docs/log.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lilabrooks
lilabrooks merged commit a9d847e into main Jul 19, 2026
11 checks passed
@lilabrooks
lilabrooks deleted the claude/suspicious-zhukovsky-982d2d branch July 19, 2026 01:59
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