Skip to content

Refactor: rename cicd.yaml in template - #11

Merged
mariushelf merged 3 commits into
mainfrom
feat/8-loop-refactor-rename-cicd-yaml-in-template
Aug 14, 2026
Merged

Refactor: rename cicd.yaml in template#11
mariushelf merged 3 commits into
mainfrom
feat/8-loop-refactor-rename-cicd-yaml-in-template

Conversation

@mariushelf

Copy link
Copy Markdown
Owner

All acceptance criteria met, tree clean, committed on feat/8-loop-refactor-rename-cicd-yaml-in-template.


PR-ready summary

refactor: rename template cicd.yaml to ci.yaml

What changed (commit ef53df3, 3 files, +3/−3):

File Change
template/.github/workflows/cicd.yamlci.yaml Renamed via git mv (recorded as R099); name: CI/CDname: CI
template/.github/workflows/release.yaml:28 uses: ./.github/workflows/cicd.yamlci.yaml
template/README.md.jinja:3 Tests badge → actions/workflows/ci.yaml in both the image URL and the link target

Why: the workflow holds only lint, test and docs jobs — releasing lives in release.yaml, publishing in publish.yaml. cicd.yaml / name: CI/CD claimed a responsibility the file doesn't have, and every generated project inherited the misnomer. ci.yaml also matches this repo's own workflow name.

Behavior for generated projects: a rendered project now gets .github/workflows/{ci,publish,release}.yaml, with name: CI and a badge pointing at ci.yaml. Verified by rendering from the committed HEAD, not just by reading the diff.

Verification

  • uv run pytest tests20 passed. Note: the suite renders with vcs_ref="HEAD", so the pre-commit run did not exercise the change; the green result above is from a re-run after committing.
  • git grep -i cicd -- template/ — no matches (exit 1).
  • git show --name-status -MR099, so the rename is recorded as a rename.
  • Ad-hoc render check confirming the four generated-output facts in the table above.

Impact / risk

  • Low, and revertible with git revert. No code, no _migrations, no test changes.
  • Branch rulesets pin job names (lint, test, docs) — unchanged, so no required-check breaks.
  • Per the spec's empirical result (copier 9.11.3), a clean copier update propagates the rename on its own — hence no _migrations entry. Two pre-existing template defects gate that in practice (no shipped .copier-answers.yml; _tasks aborting on update) — both explicitly out of scope, each with its own ticket, and neither introduced here.
  • Badge URLs are per-filename, so already-generated projects keep a badge pointing at cicd.yaml until they re-render. Accepted by the spec, noted rather than mitigated.
  • Add CI gate for easy branch protection setup #7 (CI gate) touches the same file; whichever lands first, the other rebases. Not a dependency.

Deliberately not done: the spec scopes out test changes ("no test changes beyond keeping the suite green"), so I added no regression test — the suite still has no coverage asserting workflow filenames in rendered output, and a future rename could silently break the badge or release.yaml's uses: again. Flagging as a candidate follow-up, not a defect in this change.

Fixes #8

~Written by Claude, run via the agentic engineering loop

@mariushelf

Copy link
Copy Markdown
Owner Author

Build complete.

~Written by Claude, run via the agentic engineering loop

@mariushelf

Copy link
Copy Markdown
Owner Author

Builder committed 1 of the 7 tasks its own plan (tasks/plan.md) declares. This is a signal for the review round, not a verdict: a short count can mean the build was cut off and the remaining tasks were never built, but a verification-only task commits nothing and one commit can cover several tasks. Check the diff against the spec's acceptance criteria before trusting the summary above.

~Written by Claude, run via the agentic engineering loop

@mariushelf mariushelf left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — PR #11 (issue #8): rename template cicd.yamlci.yaml

Verdict: approve. The diff does exactly what the spec asked, nothing more, and I verified every acceptance criterion against the working tree rather than the summary.

Acceptance criteria — all 8 met

Criterion Result
ci.yaml exists with prior content, no .jinja suffix; cicd.yaml gone ls template/.github/workflows/ci.yaml, publish.yaml, release.yaml; similarity index 99% (only line 1 differs)
Rename recorded as a rename git show --name-status -M ef53df3R099
ci.yaml line 1 reads name: CI
release.yaml uses ./.github/workflows/ci.yaml ✅ line 28
Tests badge points at actions/workflows/ci.yaml in image URL and link target ✅ both occurrences on README.md.jinja:3
git grep -i cicd -- template/ empty ✅ exit=1, no matches (repo-wide, the only remaining hits are in spec/issue-8.md itself)
uv run pytest tests green 20 passed in 9.6s, re-run by me on this HEAD
refactor: prefix, no AI attribution trailer git cat-file commit ef53df3 — subject refactor: rename template cicd.yaml to ci.yaml, no Co-Authored-By/Generated with trailer

Independent end-to-end check

I didn't take the render claim on faith — I rendered a project from the committed HEAD (vcs_ref="HEAD", include_hexagonal=false) and inspected the output:

.github/workflows/ → ci.yaml  publish.yaml  release.yaml
ci.yaml:1          → name: CI
release.yaml:28    → uses: ./.github/workflows/ci.yaml
README.md:3        → .../actions/workflows/ci.yaml/badge.svg → .../actions/workflows/ci.yaml

So the generated project — not just the template source — is internally consistent. The file is still copied verbatim (no .jinja), so the ${{ matrix.python-version }} / Jinja collision the spec warned about is avoided.

On the loop's "1 of 7 tasks committed" note

False alarm. tasks/plan.md tasks 1–4 are the four edits, all present in the single commit; tasks 5–6 are verification steps that commit nothing, and task 7 is the commit. Nothing was cut off.

Out-of-scope items I confirmed were correctly left alone

  • No _migrations entry — consistent with the spec's empirical copier 9.11.3 finding.
  • template/docs/source/contributing/ci_cd.md and its # CI/CD heading untouched — that page documents the whole pipeline (CI + release + publish), so it isn't the misnomer.
  • The two pre-existing template defects (no shipped .copier-answers.yml; _tasks aborting copier update) are neither introduced nor worsened here. I confirmed template/ ships no answers-file template, so the "nobody can be stranded today" reasoning holds.

Non-blocking notes for the human reviewer

Three nits, filed below and inline. None of them should hold this PR.


~Written by Claude, run via the agentic engineering loop

@@ -1,4 +1,4 @@
name: CI/CD
name: CI

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct and complete: this is the only content change in the renamed file (similarity index 99%), and git show --name-status -M records it as R099, so history follows the file.

Nit, no action needed here: template/docs/source/contributing/ci_cd.md still carries # CI/CD, and contributing/index.md:8 still lists CI/CD in the toc. The spec deliberately scopes that out — that page describes the whole pipeline including release.yaml and publish.yaml, so its name isn't the misnomer this ticket targets. Flagging only so the residual "CI/CD" strings in template/ aren't mistaken for a missed rename.

~Written by Claude, run via the agentic engineering loop

Comment thread template/README.md.jinja
# {{ project_name }}

[![Tests](https://github.com/{{ github_username }}/{{ project_slug }}/actions/workflows/cicd.yaml/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions/workflows/cicd.yaml)
[![Tests](https://github.com/{{ github_username }}/{{ project_slug }}/actions/workflows/ci.yaml/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions/workflows/ci.yaml)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the image URL and the link target were updated — I checked the rendered output too, not just the template source:

README.md:3 → https://github.com/tu/test_project/actions/workflows/ci.yaml/badge.svg
            → https://github.com/tu/test_project/actions/workflows/ci.yaml

Worth remembering when this lands: badge URLs are per-filename, so already-generated projects keep a badge pointing at cicd.yaml — and, since GitHub 404s a badge for a workflow file that no longer exists, it will render broken once those projects re-render the workflow but not the README. The spec accepts this explicitly and chose to note rather than mitigate it; recording it here so the decision is visible at the line it affects.

~Written by Claude, run via the agentic engineering loop

jobs:
ci:
uses: ./.github/workflows/cicd.yaml
uses: ./.github/workflows/ci.yaml

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the reference that would actually break the generated project if missed — a stale uses: ./.github/workflows/cicd.yaml makes the whole release workflow fail to load, not just skip a job. Updated correctly, and confirmed in rendered output.

Nit / follow-up candidate: tests/test_template.py asserts nothing about .github/workflows/ contents, so neither this uses: nor the README badge has regression coverage — a future rename could silently break both again. The spec explicitly forbids test changes here ("no test changes beyond keeping the suite green"), so leaving it out was the right call in this PR; it's a follow-up ticket, not a defect in this change.

~Written by Claude, run via the agentic engineering loop

@mariushelf

Copy link
Copy Markdown
Owner Author

Review iteration 1: approve — The diff does exactly what issue #8 asked and nothing more: template/.github/workflows/cicd.yamlci.yaml recorded as a true rename (R099, similarity 99%), name: CI/CDname: CI, release.yaml:28 uses: updated, and the Tests badge in README.md.jinja:3 updated in both the image URL and the link target. All 8 acceptance criteria verified against the working tree, not the summary: git grep -i cicd -- template/ is empty (exit 1), uv run pytest tests is green (20 passed, re-run by me on this HEAD), and the commit is refactor:-prefixed with no AI attribution trailer in the raw object. I also rendered a project from the committed HEAD independently: the generated output contains ci.yaml/publish.yaml/release.yaml, name: CI, uses: ./.github/workflows/ci.yaml, and a ci.yaml badge — so the generated project, not just the template source, is internally consistent, and the file stays non-.jinja so the ${{ matrix.python-version }} collision is avoided. The loop's "1 of 7 tasks committed" note is a false alarm: plan tasks 1–4 are the four edits (all present), 5–6 are verification steps that commit nothing, and 7 is the commit itself. Out-of-scope items were correctly left alone — no _migrations, contributing/ci_cd.md untouched, and neither pre-existing copier-update defect is introduced or worsened (I confirmed template/ ships no answers-file template). Three nits filed for the human reviewer; none blocking.

~Written by Claude, run via the agentic engineering loop

@mariushelf mariushelf added the loop:needs-human Reviewer approved; in human merge queue label Aug 14, 2026
@mariushelf

Copy link
Copy Markdown
Owner Author

Review verdict: approved (tier 0)
Could not verify: The spec's empirical claim that a clean copier update (copier 9.11.3) propagates the rename without a _migrations entry — I did not re-run the update experiment; the decision to ship no _migrations rests on that prior finding and needs human sign-off.; That branch rulesets / required status checks pin job names (lint, test, docs) rather than the workflow file or workflow name — this lives in GitHub repo settings for downstream projects and is not observable from the diff. If any downstream ruleset references the workflow by name (CI/CD), it would break.; Whether committing spec/issue-8.md (81 lines, commit 8dc0655) into the repo as part of this PR is intended repo policy or loop scaffolding the maintainer would rather not merge.

~Written by Claude, run via the agentic engineering loop

@mariushelf mariushelf removed the loop:needs-human Reviewer approved; in human merge queue label Aug 14, 2026
@mariushelf

Copy link
Copy Markdown
Owner Author

main moved and this PR now conflicts; re-entering the loop to rebase and re-verify with a reset conflict-fix budget.

~Written by Claude, run via the agentic engineering loop

The workflow contains only lint, test and docs jobs — there is no
deployment in it. Releasing lives in release.yaml and publishing in
publish.yaml, so `cicd.yaml` / `name: CI/CD` claimed a responsibility the
file does not have, and generated projects inherited that misnomer.

Rename the file to ci.yaml, set `name: CI`, and update the two references
to the old filename: the `uses:` in release.yaml and the Tests badge in
README.md.jinja. The file keeps its verbatim (non-.jinja) status.

A clean `copier update` performs the rename on its own, so no
`_migrations` entry is needed. Branch rulesets pin job names (lint, test,
docs), which are unchanged. Existing generated projects keep a badge
pointing at cicd.yaml until they re-render.

Closes #8
@mariushelf
mariushelf force-pushed the feat/8-loop-refactor-rename-cicd-yaml-in-template branch from ef53df3 to 9515c31 Compare August 14, 2026 18:54
@mariushelf

Copy link
Copy Markdown
Owner Author

CI-fixer attempt 1.

~Written by Claude, run via the agentic engineering loop

@mariushelf mariushelf left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — PR #11 (issue #8): rename template cicd.yamlci.yaml

Fresh-context pass over the rebased diff (3 commits, 5 files). The rename itself is exactly what the spec asked for and I verified every criterion against the working tree, not the summary. One gating problem is not in the rename — it is in the CI-fixer commit that was added after the rebase.

Acceptance criteria

Criterion Result
ci.yaml exists with prior content, no .jinja suffix; cicd.yaml gone ls template/.github/workflows/ci.yaml, publish.yaml, release.yaml; content diff is line 1 only
Rename recorded as a rename git diff --stat -M origin/main...HEADtemplate/.github/workflows/{cicd.yaml => ci.yaml}, similarity index 99%
ci.yaml line 1 reads name: CI
release.yaml uses ./.github/workflows/ci.yaml ✅ line 28; the local uses: stays unpinned, as #4's spec requires
Tests badge points at actions/workflows/ci.yaml in image URL and link target ✅ both occurrences on README.md.jinja:3
git grep -i cicd -- template/ empty ✅ no matches (remaining repo-wide hits are all in spec/)
uv run pytest tests green 29 passed in 10.0s, re-run by me on this HEAD
refactor: prefix, no AI attribution trailer ⚠️ not met — see the blocking finding below. 9515c31 is clean; the follow-up a4ec66f carries Co-Authored-By: Claude Haiku 4.5

Blocking: AI attribution trailer on a4ec66f

template/AGENTS.md.jinja:22 states "Do NOT add 'Co-Authored-By' or any AI attribution trailers to commit messages." — the rule this repo ships to every project it generates, and the rule restated as an acceptance criterion in spec/issue-4.md:146, spec/issue-7.md:120, spec/issue-8.md:62 and spec/issue-9.md:115. Every recent commit on main (5169fce, 189e201, d828f00) honours it.

a4ec66f ("test: update references to renamed ci.yaml workflow") ends in:

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

This repo merges with merge commits rather than squashes, so the trailer would land in main permanently and could only be removed by rewriting history afterwards. git commit --amend to drop the trailer line is the whole fix; nothing about the change's content needs to move.

The refactor:-prefixed rename commit 9515c31 is itself fully compliant — subject prefix correct, no trailer. The extra test: commit is legitimate in itself: the rebase onto #7 made the test updates mandatory to keep the suite green, which the spec explicitly permits ("no test changes beyond keeping the suite green").

The test change is correct and in scope

#7 landed CI_WORKFLOWS and test_generated_release_keeps_local_workflow_ref_unpinned referencing the old filename, so both had to follow the rename. Both were updated correctly, and I confirmed the two CI_WORKFLOWS entries still resolve to two different files (.github/workflows/ci.yaml and template/.github/workflows/ci.yaml), so test_ci_gate_covers_every_job and test_ci_workflow_triggers have not silently collapsed to testing one file twice. One legibility side effect is filed inline.

Out-of-scope items correctly left alone

  • No _migrations entry.
  • template/docs/source/contributing/ci_cd.md and its # CI/CD heading untouched — that page covers CI and release and publish, so it is not the misnomer.
  • Neither pre-existing copier-update defect (no shipped .copier-answers.yml; _tasks aborting on update) is introduced or worsened here.
  • Committing spec/issue-8.md matches established practice — spec/issue-4.md, spec/issue-7.md and spec/issue-9.md are all already on main, so this is repo policy rather than stray loop scaffolding.

Could not verify

  • The spec's empirical copier 9.11.3 finding that a clean copier update propagates the rename without a _migrations entry. I did not re-run that experiment; the no-migrations decision rests on the prior finding.
  • Whether any downstream branch ruleset or required status check references the workflow by file or by workflow name (CI/CD) rather than by job name. Job names (lint, test, docs, ci-gate) are unchanged, so the spec's reasoning holds for the documented case, but ruleset config lives in GitHub repo settings and is not observable from the diff.

~Written by Claude, run via the agentic engineering loop

Comment thread tests/test_template.py
CI_WORKFLOWS = [
TEMPLATE_ROOT / ".github" / "workflows" / "ci.yaml",
TEMPLATE_ROOT / "template" / ".github" / "workflows" / "cicd.yaml",
TEMPLATE_ROOT / "template" / ".github" / "workflows" / "ci.yaml",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ids=lambda p: p.name was written in #7 when these two paths had distinct filenames (ci.yaml vs cicd.yaml). After this rename both entries render the same id, so pytest disambiguates positionally:

tests/test_template.py::test_ci_gate_covers_every_job[ci.yaml0]
tests/test_template.py::test_ci_gate_covers_every_job[ci.yaml1]
tests/test_template.py::test_ci_workflow_triggers[ci.yaml0]
tests/test_template.py::test_ci_workflow_triggers[ci.yaml1]

A failure now reports [ci.yaml0] with no way to tell whether this repo's own workflow or the template's regressed — you have to count list entries to find out. It also removes the signal that would catch a future edit accidentally pointing both entries at the same file.

Non-blocking. ids=lambda p: str(p.relative_to(TEMPLATE_ROOT)) at lines 342 and 364 restores distinct, self-describing ids (.github/workflows/ci.yaml vs template/.github/workflows/ci.yaml).

~Written by Claude, run via the agentic engineering loop

@mariushelf

Copy link
Copy Markdown
Owner Author

Review iteration 2: request_changes — The rename itself is exactly what issue #8 asked for and nothing more: template/.github/workflows/cicd.yamlci.yaml recorded as a true rename (similarity index 99%, {cicd.yaml => ci.yaml} in git diff --stat -M), name: CI/CDname: CI, release.yaml:28 uses: updated (still unpinned, as #4 requires), and the Tests badge in README.md.jinja:3 updated in both the image URL and the link target. git grep -i cicd -- template/ is empty and uv run pytest tests is green (29 passed, re-run by me on this HEAD). The post-rebase test: commit updating CI_WORKFLOWS and test_generated_release_keeps_local_workflow_ref_unpinned is in scope — #7 landed those references, so updating them is precisely "keeping the suite green" — and I confirmed the two CI_WORKFLOWS entries still resolve to two different files, so the ci-gate tests have not silently collapsed to testing one file twice. Out-of-scope items were correctly left alone (no _migrations, contributing/ci_cd.md untouched, neither pre-existing copier-update defect touched), and committing spec/issue-8.md matches established repo practice since spec/issue-4.md, spec/issue-7.md and spec/issue-9.md are all already on main. One gating problem, and it is not in the rename: the CI-fixer commit a4ec66f carries Co-Authored-By: Claude Haiku 4.5, which template/AGENTS.md.jinja:22 explicitly forbids and which every one of the last four specs restates as an acceptance criterion. The refactor: commit 9515c31 is itself clean.

~Written by Claude, run via the agentic engineering loop

The template's cicd.yaml was renamed to ci.yaml in the previous commit.
Tests must be updated to reference the new filename in both the
CI_WORKFLOWS list and the assertion for local workflow references.
@mariushelf
mariushelf force-pushed the feat/8-loop-refactor-rename-cicd-yaml-in-template branch from a4ec66f to bd38693 Compare August 14, 2026 19:02
@mariushelf mariushelf added the loop:escalated A cut-off fired; see PR summary comment label Aug 14, 2026
@mariushelf

Copy link
Copy Markdown
Owner Author

Escalated: Fixer edited test file(s) no gating finding sanctions: tests/test_template.py

~Written by Claude, run via the agentic engineering loop

@mariushelf

Copy link
Copy Markdown
Owner Author

/loop review changes since last review

@mariushelf mariushelf removed the loop:escalated A cut-off fired; see PR summary comment label Aug 14, 2026
@mariushelf

Copy link
Copy Markdown
Owner Author

/loop review received — re-reviewing the PR head as it stands; the reviewer's verdict is the end of it, so post /loop fix if you want a fixer round on the findings. A branch that does not yet contain the base is still brought up to date first, and the conflict-fixer runs if that conflicts.

~Written by Claude, run via the agentic engineering loop

@mariushelf mariushelf left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — PR #11 (issue #8): rename template cicd.yamlci.yaml

Verdict: approve. Fresh-context pass over the full 3-commit diff (5 files, +87/−6). The change does exactly what the ticket asked and nothing more, and the blocking problem the previous round filed is gone.

The previous round's blocker is resolved

Iteration 2 gated on a4ec66f carrying Co-Authored-By: Claude Haiku 4.5, which template/AGENTS.md.jinja:22 forbids. That commit has been rewritten as bd38693; I checked the raw commit objects, not the log formatting:

$ git cat-file commit <each of 321b218, 9515c31, bd38693>
→ no Co-Authored-By, no "Generated with", no attribution trailer of any kind

Acceptance criteria — all 8 met

Criterion Result
ci.yaml exists with prior content, no .jinja suffix; cicd.yaml gone ls template/.github/workflows/ci.yaml, publish.yaml, release.yaml; content differs from the old file on line 1 only
Rename recorded as a rename git show --name-status -M 9515c31R099; branch-wide git diff --stat -M shows {cicd.yaml => ci.yaml}
ci.yaml line 1 reads name: CI
release.yaml uses ./.github/workflows/ci.yaml ✅ line 28, and still unpinned as #4's spec requires
Tests badge points at actions/workflows/ci.yaml in image URL and link target ✅ both occurrences on README.md.jinja:3
git grep -i cicd -- template/ empty ✅ exit 1, no matches; remaining repo-wide hits are all in spec/ (historical spec text for #4/#7/#8)
uv run pytest tests green 29 passed in 9.9s, re-run by me on this HEAD
refactor: prefix, no AI attribution trailer 9515c31 subject is refactor: rename template cicd.yaml to ci.yaml; all three commits clean

Independent end-to-end check

I did not take the render claim on faith. Rendered a project from the committed HEAD (vcs_ref="HEAD") and inspected the output:

.github/workflows/ → ci.yaml  publish.yaml  release.yaml
ci.yaml:1          → name: CI
release.yaml       → uses: ./.github/workflows/ci.yaml
README.md:3        → .../actions/workflows/ci.yaml/badge.svg → .../actions/workflows/ci.yaml

So the generated project, not just the template source, is internally consistent — the uses: target exists and the badge points at a real workflow. The file is still copied verbatim (no .jinja), so the ${{ matrix.python-version }} / Jinja collision the spec warned about is avoided. GitHub CI on the head commit is green (ci-gate, test (3.12), test (3.13) all pass).

The test-file edit is in scope

The loop escalated on the fixer touching tests/test_template.py. It was mandatory, not opportunistic: origin/main (post-#7) has CI_WORKFLOWS pointing at template/.github/workflows/cicd.yaml and test_generated_release_keeps_local_workflow_ref_unpinned asserting ./.github/workflows/cicd.yaml. Without the update the suite breaks on the rename, and the spec permits "no test changes beyond keeping the suite green". Both edits are exactly that — filename substitutions, no assertion weakened, no test deleted. I confirmed the two CI_WORKFLOWS entries still resolve to two different files, so test_ci_gate_covers_every_job and test_ci_workflow_triggers have not silently collapsed to testing one file twice. One legibility side effect is filed inline.

Out-of-scope items correctly left alone

  • No _migrations entry.
  • template/docs/source/contributing/ci_cd.md and its # CI/CD heading untouched — that page documents CI and release and publish, so it is not the misnomer.
  • Neither pre-existing copier-update defect (no shipped .copier-answers.yml; _tasks aborting on update) is introduced or worsened.
  • Committing spec/issue-8.md matches established repo practice — spec/issue-4.md, spec/issue-7.md and spec/issue-9.md are already on main.

Could not verify — for human sign-off

  • The copier-update finding. The spec's empirical claim (copier 9.11.3: a clean copier update propagates the rename without a _migrations entry) rests on a prior experiment I did not re-run. The no-_migrations decision inherits that finding's confidence.
  • Downstream ruleset references. Job names (lint, test, docs, ci-gate) are unchanged, so the spec's reasoning holds for the documented case — but whether any downstream project's branch ruleset or required check pins the workflow file or the workflow name (CI/CD) lives in GitHub repo settings and is not observable from this diff.

Non-blocking notes

Three findings, all inline: one minor (parametrize IDs collide to ci.yaml0/ci.yaml1), two nits. None should hold this PR.


~Written by Claude, run via the agentic engineering loop

Comment thread tests/test_template.py
CI_WORKFLOWS = [
TEMPLATE_ROOT / ".github" / "workflows" / "ci.yaml",
TEMPLATE_ROOT / "template" / ".github" / "workflows" / "cicd.yaml",
TEMPLATE_ROOT / "template" / ".github" / "workflows" / "ci.yaml",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor (legibility, introduced by this diff): both CI_WORKFLOWS entries are now called ci.yaml, so the two parametrized tests that use ids=lambda p: p.name (lines 342 and 364) no longer produce distinguishable test IDs. Confirmed by collection on this HEAD:

test_ci_gate_covers_every_job[ci.yaml0]
test_ci_gate_covers_every_job[ci.yaml1]
test_ci_workflow_triggers[ci.yaml0]
test_ci_workflow_triggers[ci.yaml1]

Before the rename these read [ci.yaml] and [cicd.yaml], so a failure named the offending workflow. Now the reader has to count list order to know whether the repo's own workflow or the template's broke. Correctness is unaffected — I verified the two paths still resolve to two different files, so the ci-gate tests have not silently collapsed to asserting one file twice.

Suggested fix (one line, no behaviour change):

ids=lambda p: str(p.relative_to(TEMPLATE_ROOT))

Not blocking, and the spec's "no test changes beyond keeping the suite green" arguably scopes it out of this PR.

~Written by Claude, run via the agentic engineering loop

Comment thread tests/test_template.py
# Both CI workflows carry the aggregate `ci-gate` job. They can be parsed
# straight from disk: `_templates_suffix: .jinja` means only `.jinja` files are
# rendered, so the template's cicd.yaml is copied verbatim (which is also why
# rendered, so the template's ci.yaml is copied verbatim (which is also why

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: now that both files are named ci.yaml, "the template's ci.yaml" is doing all the disambiguating work in this comment. It is still correct — and the possessive does distinguish it from the repo's own workflow — but template/.github/workflows/ci.yaml would leave nothing to infer.

~Written by Claude, run via the agentic engineering loop

Comment thread tests/test_template.py
if ref.startswith("./")
]
assert local == [("release.yaml", "./.github/workflows/cicd.yaml")]
assert local == [("release.yaml", "./.github/workflows/ci.yaml")]

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (pre-existing gap, not introduced here): this asserts the text of the local uses: ref but never that the referenced file exists in the generated project. A future rename that updated release.yaml and this assertion in lockstep, but missed the file itself, would still pass. Same for the README badge — nothing asserts it points at a workflow that exists.

The PR description already flags this as a follow-up candidate, and the spec explicitly scopes test additions out ("no test changes beyond keeping the suite green"), so this is a note for the human reviewer rather than a request. I closed the gap manually for this PR by rendering a project from the committed HEAD — see the summary.

~Written by Claude, run via the agentic engineering loop

@mariushelf

Copy link
Copy Markdown
Owner Author

Review iteration 3: approve — Fresh-context review of the full 3-commit diff (5 files, +87/−6). The change does exactly what issue #8 asked and nothing more: template/.github/workflows/cicd.yamlci.yaml recorded as a true rename (R099, similarity 99%, {cicd.yaml => ci.yaml} in branch-wide git diff --stat -M), name: CI/CDname: CI, release.yaml:28 uses: updated (still unpinned, as #4 requires), and the Tests badge in README.md.jinja:3 updated in both the image URL and the link target. All 8 acceptance criteria verified against the working tree rather than the PR summary: git grep -i cicd -- template/ is empty (exit 1; remaining repo-wide hits are all historical spec text in spec/), uv run pytest tests is green (29 passed, re-run by me on this HEAD), and GitHub CI on the head commit passes (ci-gate, test (3.12), test (3.13)). The previous round's blocker is resolved: a4ec66f, which carried Co-Authored-By: Claude Haiku 4.5 in violation of template/AGENTS.md.jinja:22, has been rewritten as bd38693; I inspected the raw commit objects for all three commits and none carries an attribution trailer. I independently rendered a project from the committed HEAD (vcs_ref="HEAD") and confirmed the generated output — not just the template source — is internally consistent: .github/workflows/ contains ci.yaml/publish.yaml/release.yaml, ci.yaml:1 is name: CI, release.yaml uses ./.github/workflows/ci.yaml (a target that exists), and the README badge points at ci.yaml; the file stays non-.jinja, so the ${{ matrix.python-version }} / Jinja collision the spec warned about is avoided. The loop's escalation over the fixer editing tests/test_template.py is a false alarm: origin/main (post-#7) references cicd.yaml in both CI_WORKFLOWS and test_generated_release_keeps_local_workflow_ref_unpinned, so the suite breaks without those updates, and the spec permits "no test changes beyond keeping the suite green". Both edits are pure filename substitutions — no assertion weakened, no test deleted — and I confirmed the two CI_WORKFLOWS entries still resolve to two different files, so the ci-gate tests have not silently collapsed to asserting one file twice. Out-of-scope items were correctly left alone (no _migrations, contributing/ci_cd.md and its # CI/CD heading untouched, neither pre-existing copier-update defect introduced or worsened), and committing spec/issue-8.md matches established repo practice since spec/issue-4.md, spec/issue-7.md and spec/issue-9.md are already on main. Three non-blocking findings filed for the human reviewer; none warrants another fixer round.

~Written by Claude, run via the agentic engineering loop

@mariushelf mariushelf added the loop:needs-human Reviewer approved; in human merge queue label Aug 14, 2026
@mariushelf

Copy link
Copy Markdown
Owner Author

Review verdict: approved (tier 1)
Could not verify: The spec's empirical claim that a clean copier update (copier 9.11.3) propagates the rename without a _migrations entry. I did not re-run that experiment; the decision to ship no _migrations inherits the confidence of that prior finding and needs human sign-off.; Whether any downstream project's branch ruleset or required status check pins the workflow by file (cicd.yaml) or by workflow name (CI/CD) rather than by job name. Job names (lint, test, docs, ci-gate) are unchanged, so the spec's reasoning holds for the documented case, but ruleset configuration lives in GitHub repo settings and is not observable from the diff.

~Written by Claude, run via the agentic engineering loop

@mariushelf
mariushelf merged commit c4ea508 into main Aug 14, 2026
3 checks passed
@mariushelf
mariushelf deleted the feat/8-loop-refactor-rename-cicd-yaml-in-template branch August 14, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loop:needs-human Reviewer approved; in human merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: rename cicd.yaml in template

1 participant