Skip to content

triage template feedback: worktree-safe checks, settled ARG002, example lifecycle - #111

Merged
seebi merged 3 commits into
developfrom
feature/template-feedback-triage
Oct 17, 2026
Merged

seebi merged 3 commits into
developfrom
feature/template-feedback-triage

Conversation

@seebi

@seebi seebi commented Oct 17, 2026

Copy link
Copy Markdown
Member

Triage of the open template-feedback issues — one commit per issue.

Accepted

  • Exclude .claude/ from deptry, so a git worktree inside the repo does not fail task check #109 — check:deptry gets --extend-exclude '\.claude' and check:trivy gets --skip-dirs .claude. A git worktree under .claude/worktrees/ is a complete second checkout inside the repository, and both checks walk the tree rather than named targets, so task check failed in the parent for as long as a worktree existed. Contrary to the report, trivy fails too: check:trivy passes --exit-code 1, and with the lock committed the scan picks up both copies, so a worktree on an older branch brings that branch's findings into the parent's check. check:ruff and check:mypy are unaffected — they are given tests and the package explicitly.
  • List ARG002 on framework-fixed execute()/transform() signatures as a standing exception #108 — ARG002 on an argument whose presence a framework fixes is now named as settled in .claude/rules/copier-template.md, beside PLR0913/PLR0917, with a section in the plugin-implementation skill. The _inputs escape is ruled out on evidence: it passes ruff and mypy (which treats an underscore-prefixed override parameter as positional-only), but tests/test_example.py and the plugin-testing skill both call execute(inputs=(), context=…) by keyword, so the rename would raise TypeError against the template's own test. The example's # noqa also lacked the reason comment the rules require, and now carries it.
  • Say that the example plugins are replaced by the first real task, not deleted beforehand #107 — all five example files, plugin and generic, say to replace them with the first real task or module in the same change instead of removing them after bootstrapping. An emptied package fails task check three times over: DEP002 on the now unused cmem-plugin-base, pytest exit 5 on collecting no tests, and genbadge's Computed line rate (0) is different from the one in the file (1.0).

Declined

The second half of #107 — skipping the coverage badge step on a package with no statements — is declined and recorded under Deliberate decisions in CLAUDE.md. pytest dies before genbadge is reached and deptry is right as well, so silencing the badge alone changes nothing a user notices, and the shell conditional would have to hold on the Windows branch of that task too.

Not in this sweep

#99 (a cli project type) is left open. It is a new project_type with skeleton, skill, dependencies and a test case, it carries its own open design question, and it leans on the intent to move cmemc onto the template — a feature decision rather than triage.

Verification

task check green across all six cases. Beyond it, because the generated checks and the shipped agent files are its two blind spots:

  • in the rendered plugin case with a worktree at .claude/worktrees/wip, check:deptry reports success and check:trivy scans one lock file with the flag versus two without it
  • a claude -p run inside that case answered the ARG002 question from the shipped rules alone, including why _inputs is wrong

Note that #107, #108 and #109 close when a release carries these commits onto main, not when this merges into develop.

🤖 Generated with Claude Code

https://claude.ai/code/session_013pwym1cFV5jEhi7LdzKmEY

seebi and others added 3 commits October 17, 2026 15:46
Claude Code creates git worktrees under .claude/worktrees/, which puts a
complete second checkout inside the repository. Both checks that walk the
tree rather than named targets then read it as if it were this project:

  $ git worktree add .claude/worktrees/wip
  $ poetry run deptry .
  .claude/worktrees/wip/tests/test_example.py:11:8: DEP004 'pytest' ...
  Found 4 dependency issues.

deptry's default excludes cover a tests directory at the root but not a
nested copy of one, so every test import in the second checkout is
reported, and task check fails in the parent repository for as long as the
worktree exists - while the same checks pass inside the worktree.

trivy has the same exposure, and contrary to the report it fails too:
check:trivy passes --exit-code 1, and with the lock file committed the
scan picks up both copies (num=2), so a worktree on an older branch brings
that branch's findings into the parent's check.

check:ruff and check:mypy are unaffected: they are given tests and the
package as explicit targets.

Verified in a rendered plugin case - reproduced both, then confirmed
--extend-exclude '\.claude' returns deptry to "Scanning 3 files... no
dependency issues" and --skip-dirs .claude returns trivy to one target.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013pwym1cFV5jEhi7LdzKmEY
A task declaring FixedNumberOfInputs([]) never reads the inputs argument
of execute(), but WorkflowPlugin decides the signature, so ARG002 cannot
be answered by dropping it. The rules listed only PLR0913 and PLR0917 as
settled, so every project had to escalate to a human the case the shipped
example_workflow.py already resolves with a noqa.

The other escape does not hold up. Renaming the argument to _inputs
passes both linters - mypy treats an override parameter starting with an
underscore as positional-only, and ruff stops reporting it - but the name
is part of the API the caller uses: the shipped tests/test_example.py and
the plugin-testing skill both call execute(inputs=(), context=...) by
keyword, so the rename would raise TypeError against the template's own
test, and nothing here can see how DataIntegration invokes it.

The example also violated the rule it illustrates: the rules require the
reason in a comment above a noqa, and it carried none. It does now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013pwym1cFV5jEhi7LdzKmEY
The example docstrings said "Remove this and other example files after
bootstrapping your project", which reads as a step of its own. Doing it
before the first real module exists leaves a package with no code, and
task check then fails three times over - reproduced in a rendered plugin
case:

  DEP002 'cmem-plugin-base' defined as a dependency but not used
  pytest: no tests ran ... exit status 5
  genbadge: ValueError: Computed line rate (0) is different from the one
            in the file (1.0)

None of the three can be answered without a suppression or a Taskfile
edit, both of which the shipped rules forbid, so the instruction led
somewhere the project is not allowed to leave. All five example files say
the working thing instead: replace them with the first real task or
module, and delete them in that same change.

The report's second suggestion - skipping the coverage badge step on a
package with no statements - is declined and recorded under Deliberate
decisions in CLAUDE.md: pytest exits 5 before genbadge is reached and
deptry is right as well, so silencing the badge alone changes nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013pwym1cFV5jEhi7LdzKmEY
@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report
File Stmts Miss Cover Missing
init.py 0 0 100%
example_transform.py 28 0 100%
example_workflow.py 35 2 94% 60 63
TOTAL 63 2 97%  

Tests Skipped Failures Errors Time
4 0 💤 0 ❌ 0 🔥 5.495 ⏱

@seebi
seebi merged commit 6ef2d08 into develop Oct 17, 2026
2 checks passed
@seebi
seebi deleted the feature/template-feedback-triage branch October 17, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant