From 12565b95e08188904561869dee5ebaedc3278e81 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 08:05:47 +0000 Subject: [PATCH 1/3] ci(mutation): leave test files out of the push path filter A push to master that changed only *_tests.rs or *.test.ts files started the whole mutation run (cargo mutants and Stryker) although no mutated file had changed: 3.6.0 did, for one more unit in a test loop. The paths filter now excludes them with "!" patterns after the positive ones, the order GitHub's workflow syntax requires ("Including and excluding paths"; docs/**/*.md matches docs/README.md, so **/ also matches no directory). Checked by applying the documented rules to git ls-files: all 22 test files are out, every source file stays in; the PR #21 diff still starts the run, a tests-only diff does not. Not measured on GitHub: the next push to master is the first real evaluation of the filter. Trade-off: a test edit that stops catching a mutant is now reported by the weekly run (or the next push to the code), not by its own push. Tests inside a source file (mod tests) still start the run. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013Rdii2xv4WTmCWzFBdAPnv --- .github/workflows/mutation.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 542a3a2..9832f0d 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -4,10 +4,21 @@ name: Mutation # (Stryker). Too slow for every push: runs on master, weekly and on demand. # Caching follows Aura's ci.yml: a measurement is cached per commit (a re-run reuses it), and # Stryker runs incrementally from the last report of the same test toolchain. +# +# A push that changes only test files does not start it: nothing mutated changed. A test edit +# that stops catching a mutant shows at the weekly run, or at the next push to the code. on: push: branches: ["master"] - paths: ["src-tauri/src/**", "src/lib/**", "stryker.config.json", "src-tauri/.cargo/mutants.toml"] + # Order matters: a "!" pattern excludes what the pattern before it matched (GitHub docs, + # workflow syntax, "Including and excluding paths"). + paths: + - "src-tauri/src/**" + - "!src-tauri/src/**/*_tests.rs" + - "src/lib/**" + - "!src/lib/**/*.test.ts" + - "stryker.config.json" + - "src-tauri/.cargo/mutants.toml" schedule: - cron: "13 5 * * 1" workflow_dispatch: From e14e96ba856bbfbc22841ff73df9a68197ebd49b Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 08:14:22 +0000 Subject: [PATCH 2/3] ci(mutation): keep test files in the filter, add Cargo.toml and Cargo.lock The push filter now matches chetto1983/Twinova's mutation.yml, as the user chose after comparing the two: - Test files are back in, undoing 12565b9: a test edit can stop catching a mutant, and the push that makes it should report it, not the weekly run. - src-tauri/Cargo.toml and Cargo.lock start the run too: dependencies and build profiles change the code the tests run (Twinova's PR #29 touched only Cargo.toml); until now such a change waited for the weekly run. Checked by applying GitHub's documented paths rules to sample diffs: a Cargo.lock bump and a tests-only change start the run, a change to tauri.conf.json alone does not. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013Rdii2xv4WTmCWzFBdAPnv --- .github/workflows/mutation.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 9832f0d..66f8d9c 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -4,21 +4,19 @@ name: Mutation # (Stryker). Too slow for every push: runs on master, weekly and on demand. # Caching follows Aura's ci.yml: a measurement is cached per commit (a re-run reuses it), and # Stryker runs incrementally from the last report of the same test toolchain. -# -# A push that changes only test files does not start it: nothing mutated changed. A test edit -# that stops catching a mutant shows at the weekly run, or at the next push to the code. on: push: branches: ["master"] - # Order matters: a "!" pattern excludes what the pattern before it matched (GitHub docs, - # workflow syntax, "Including and excluding paths"). + # Test files stay in: a test edit can stop catching a mutant. paths: - "src-tauri/src/**" - - "!src-tauri/src/**/*_tests.rs" - "src/lib/**" - - "!src/lib/**/*.test.ts" - "stryker.config.json" - "src-tauri/.cargo/mutants.toml" + # Dependencies and build profiles change the code the tests run (as in chetto1983/Twinova, + # whose PR #29 touched only Cargo.toml). + - "src-tauri/Cargo.toml" + - "src-tauri/Cargo.lock" schedule: - cron: "13 5 * * 1" workflow_dispatch: From a5a2d4089733fa600c7bbbbf8359cef2e23583ab Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 08:14:22 +0000 Subject: [PATCH 3/3] ci: skip prose-only changes and run pushes on master only The scheme of chetto1983/Twinova and chetto1983/Aura ci.yml, ported on the user's request: - paths "**", "!**.md", "!docs/**" on push and pull_request, shared with a YAML anchor (supported by Actions: workflow syntax, "YAML anchors and aliases"). Nothing CI runs reads a Markdown file or docs/ (grep, 2026-11-11: Prettier ignores both; docs/screenshots feeds only the site, pages.yml), so a change made only of them starts no run. - push only on master: a working branch is checked by its pull_request run, so one SHA no longer runs twice (PR #21 ran CI for its push and for its pull request). - bundle only on push: the MSI was the longest job of master run 42981578708 (4 min 52 s), and on a pull request the E2E already builds and drives the app on both platforms. CLAUDE.md's push discipline now says a working branch needs an open PR to be checked, as Twinova's does. Not measured on GitHub yet: the pull_request run of this change is the first evaluation of the new triggers. If a check were ever made required by branch protection, a prose-only PR would wait on it (checks of a workflow skipped by paths stay pending, per the docs). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013Rdii2xv4WTmCWzFBdAPnv --- .github/workflows/ci.yml | 17 +++++++++++++++++ CLAUDE.md | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06d5444..9e08c5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,21 @@ name: CI +# Prose runs nothing: no build, test or workflow step of this CI reads a Markdown file or anything +# under docs/ (grep, 2026-11-11: Prettier ignores both; docs/screenshots is read only by the site, +# pages.yml), so a change made only of them skips the run. The scheme is Aura's and Twinova's +# (chetto1983/Aura, chetto1983/Twinova ci.yml): `paths` with negations, where a file a test reads +# could be re-included. Pushes run on master only; a working branch is checked by its pull_request +# run, so one SHA does not run twice. No tag trigger here, so `paths` cannot swallow a tag push. on: push: + branches: ["master"] + paths: &code-paths + - "**" + - "!**.md" + - "!docs/**" pull_request: + branches: ["master"] + paths: *code-paths permissions: contents: read @@ -82,7 +95,11 @@ jobs: persist-credentials: false - run: bash scripts/check-file-size.sh + # Only on master, as in Twinova (user, 2026-11-11): the MSI was the longest job of run 42981578708 + # (4 min 52 s, the E2E 4 min 15 s and 4 min 28 s), and on a pull request the E2E already builds + # and drives the app on both platforms. bundle: + if: github.event_name == 'push' needs: [rust, frontend, file-size] strategy: fail-fast: false diff --git a/CLAUDE.md b/CLAUDE.md index 5e2b486..452edfe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -123,7 +123,10 @@ data types, byte orders) and backend texts stay in English - **DEFINITION OF DONE.** A job is complete only when validated E2E on a real scenario (app running, real master↔slave exchange, ideally against an independent reference implementation). - **GIT PUSH DISCIPLINE.** Push at the end of a task or completed job, then check that all CI runs - on the pushed SHA are green. Never leave work only in a local branch. + on the pushed SHA are green. Never leave work only in a local branch. CI runs on pushes to + `master` and on pull requests (the Aura scheme), so a working branch needs an open PR to be + checked; a change made only of Markdown files or of `docs/` runs nothing (nothing in CI reads + them). ## Post-edit validation (Gate 2)