Skip to content

docs: add rust-test-hygiene skill capturing Phase 1-4 lessons - #131

Merged
Ziinc merged 2 commits into
claude/rust-test-cross-file-dedupfrom
claude/rust-test-hygiene-skill
Jul 30, 2026
Merged

docs: add rust-test-hygiene skill capturing Phase 1-4 lessons#131
Ziinc merged 2 commits into
claude/rust-test-cross-file-dedupfrom
claude/rust-test-hygiene-skill

Conversation

@Ziinc

@Ziinc Ziinc commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Phase 5 (final phase) of the Rust test-suite cleanup effort (stacked on #128, which now includes the merged Phase 4 table-driven-merge work). Adds .claude/skills/rust-test-hygiene/SKILL.md, a reusable skill so future Rust test changes in this repo apply the same standards as the cleanup, instead of it being a one-off pass:

  • A test must assert something real about treq — not the host OS, not serde round-tripping itself, not a #[cfg(test)]-only helper with no production caller.
  • Reuse TestRepo helpers from src-tauri/tests/e2e_test_helpers.rs instead of hand-rolled setup.
  • Check for existing coverage in the same/sibling test file before adding a new test.
  • Merge 3+ near-identical test clusters into a table-driven test instead of copy-pasting (plain Vec of cases — rstest isn't a dependency today).
    Modeled on the structure/frontmatter of this repo's existing skills (e.g. app-qa, pr-annotate), with concrete examples pulled from the actual diffs in Phases 1-4.

Test plan

  • Frontmatter validated as well-formed YAML matching other skills' shape
  • Confirmed the skill surfaces in the session's skill listing with a description that triggers naturally
    Generated by Claude Code

claude added 2 commits July 30, 2026 02:17
Several clusters of tests differed only in setup inputs and expected
outcomes (remote sync status variants, merge/squash-with-empty-commits
variants, PTY line-filtering/ANSI-stripping cases). Consolidating them
into single parameterized tests keeps all original assertions while
cutting repetitive boilerplate.
Encodes the standards applied across the Rust test-suite cleanup
(assert real treq behavior, reuse TestRepo helpers, avoid cross-file
duplication, prefer table-driven tests over copy-pasted clusters) as
a reusable Claude Code skill for future test authoring/review.
@Ziinc
Ziinc merged commit 1cc8e79 into claude/rust-test-cross-file-dedup Jul 30, 2026
4 checks passed
@Ziinc
Ziinc deleted the claude/rust-test-hygiene-skill branch July 30, 2026 02:52
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.

2 participants