diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf969cc2..b5cf1200 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,42 +122,6 @@ jobs: - name: Run tests with branch coverage run: mise run cover-py - test-bats: - name: "test-bats (${{ matrix.os }})" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-24.04 - - macos-15 - steps: - - name: Harden the runner - if: runner.os == 'Linux' - uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up mise - uses: jdx/mise-action@82a612c5ab8bcda7cc5db6b7e81a8e7584c3dc6e # v5.2.3 - with: - # renovate: datasource=github-releases depName=jdx/mise - version: 2026.10.19 - - - name: Sync Vale styles and Python dependencies - run: mise run install-tools - - - name: Run hook regression suites - run: mise run test-hooks - - - name: Run leak scanner regression suite - run: mise run test-leaks - test: name: "test (${{ matrix.os }})" runs-on: ${{ matrix.os }} diff --git a/AGENTS.md b/AGENTS.md index 19bfb795..8708137a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -301,9 +301,9 @@ The baseline drop-in pins Go 1.27.3. Scratch Git repositories in the shell suite The repository dropped its Justfile. The last recipes to leave were the Go test and coverage family, held back because the CI matrix runs them on Windows and nobody had checked mise there. A probe on windows-2025 found it running a bash-shebang body under Git Bash and resolving its own go pin, which retired both the recipes and the `actions/setup-go` step feeding them. The delegation recipes went with them once the published skills learned to spell their gates `mise run `. The committed `tools/mise-bootstrap` shim still runs in place of mise wherever PATH has none, and the prek hooks run through it. -Tasks that operate on one source language carry a `-go` or `-py` suffix, and the bare name aggregates both: `mise run test` runs `test-go`, `test-py`, `test-hooks`, and `test-leaks` in order. The `cover`, `mutate`, and `fuzz` aggregates each run their Go and Python members. Use the suffixed form while iterating on one language, and the bare form before pushing. Lint gates follow the same pattern through `lint-go-all` and `lint-py-all`, which `mise run lint` composes. A bare-name task lists its members in an ordered `run` array rather than in `depends`, because `depends` runs in parallel and interleaves the linters' findings, which defeats the one-line-per-finding output template. +Tasks that operate on one source language carry a `-go` or `-py` suffix, and the bare name aggregates both: `mise run test` runs `test-go` and `test-py` in order. The `cover`, `mutate`, and `fuzz` aggregates each run their Go and Python members. Use the suffixed form while iterating on one language, and the bare form before pushing. Lint gates follow the same pattern through `lint-go-all` and `lint-py-all`, which `mise run lint` composes. A bare-name task lists its members in an ordered `run` array rather than in `depends`, because `depends` runs in parallel and interleaves the linters' findings, which defeats the one-line-per-finding output template. -`mise run test-hooks` runs Bats recursively under `tests/`. Pass paths, such as `mise run test-hooks tests/skills/agent-pr tests/skills/pr`, to narrow it. It runs Bats files in parallel through the pinned `rush`, one job per file, with a job count equal to the CPU count capped at 8. Set `HOOKS_JOBS` to override the count within the cap, and `HOOKS_JOBS=1` for a serial run with an ordered trace. A file that can't run beside the others goes in the `serialFiles` list in `internal/bats/run.go`, with its reason beside it, and runs alone after the parallel group. `mise run test-leaks` runs `.devtools/scripts/check-leaks.bats`. CI runs both in `test-bats (ubuntu-24.04)` and `test-bats (macos-15)`. The Go jobs are `test (ubuntu-24.04)`, `test (ubuntu-24.04-arm)`, `test (macos-15)`, and `test (windows-2025)`. Python is `test (python)`. +The `test` task and CI no longer run the Bats suites. `mise run test-hooks` still runs Bats recursively under `tests/`. Pass paths, such as `mise run test-hooks tests/skills/agent-pr tests/skills/pr`, to narrow it. It runs Bats files in parallel through the pinned `rush`, one job per file, with a job count equal to the CPU count capped at 8. Set `HOOKS_JOBS` to override the count within the cap, and `HOOKS_JOBS=1` for a serial run with an ordered trace. A file that can't run beside the others goes in the `serialFiles` list in `internal/bats/run.go`, with its reason beside it, and runs alone after the parallel group. `mise run test-leaks` runs `.devtools/scripts/check-leaks.bats`. The Go jobs are `test (ubuntu-24.04)`, `test (ubuntu-24.04-arm)`, `test (macos-15)`, and `test (windows-2025)`. Python is `test (python)`. Mac measurements on 2026-10-26 used a CPU count of 16 and the same 744 cases. Wall times include discovery and the helper build. The serial run sets `HOOKS_JOBS=1`. The parallel run with 4 jobs sets `HOOKS_JOBS=4`. The default run uses the CPU count capped at 8. Existing skips cover authenticated writer probes, Rust checks without the required toolchain, and optional Renovate and Skill Scanner probes. @@ -313,7 +313,7 @@ Mac measurements on 2026-10-26 used a CPU count of 16 and the same 744 cases. Wa | Parallel | 4 | 353.35 | 735 | 0 | 9 | | Default | 8 | 267.50 | 735 | 0 | 9 | -`fix-pr` maps check names by matching text within them, in order, rather than by workflow job ID. `lint` routes to `mise run lint`. All those `test` names, including `test-bats`, route to `mise run test`. For a Bats failure, the focused CI reproducers are `mise run test-hooks` and `mise run test-leaks`. A name containing `race` routes to `test-go-race`, `cover` to `cover-go-check`, `vendor` to `vendor-check`, `vuln` to `vuln`, and `gitleaks` or `secret` to `devtools:gitleaks`. `validate` routes to `apm install --frozen && apm audit --ci`. An unknown name, including `scan-skills` and `gomodscan`, requires reading the log because the diagnosis script doesn't invent a reproducer. The Actions run and log reads still use REST. +`fix-pr` maps check names by matching text within them, in order, rather than by workflow job ID. `lint` routes to `mise run lint`. All those `test` names route to `mise run test`. A name containing `race` routes to `test-go-race`, `cover` to `cover-go-check`, `vendor` to `vendor-check`, `vuln` to `vuln`, and `gitleaks` or `secret` to `devtools:gitleaks`. `validate` routes to `apm install --frozen && apm audit --ci`. An unknown name, including `scan-skills` and `gomodscan`, requires reading the log because the diagnosis script doesn't invent a reproducer. The Actions run and log reads still use REST. `mise run lint-shell` delegates to `devtools:lint-shell`, which enables shellcheck's `check-extra-masked-returns` rule (SC2312). `devtools:lint-workflows` enables it for workflow shell blocks too. It flags command substitutions and other command uses that mask a failure status, such as testing a substitution's output directly. Capture the output separately and check the command's status first. SC2155 remains enabled for declarations that mask command failures. diff --git a/README.md b/README.md index 8bbc99b7..bfa7e51a 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ mise run build After creating a linked worktree, inspect its configuration and run `mise trust`, then run `mise run devtools:worktree-setup`. The setup task refuses an untrusted configuration. Once trusted, it prepares the worktree-local Vale styles with `vale sync` when the root has `.vale.ini`, then the Python environment with `uv sync` when the root has `pyproject.toml`. It reports each skipped sync and its missing manifest. Skill setup checks stop with these commands when the configuration is untrusted or the ignored Vale styles are absent. -The test task includes Go, Python, hook Bats, and leak Bats suites. Run `mise run test-hooks` or `mise run test-leaks` for the shell suites. CI runs them in `test-bats (ubuntu-24.04)` and `test-bats (macos-15)`. See the [task and CI routing guide](AGENTS.md#tasks) for the check names `fix-pr` recognizes. +The test task includes the Go and Python suites. The hook and leak Bats suites no longer run in the test task or in CI. Run `mise run test-hooks` or `mise run test-leaks` by hand for the shell suites. See the [task and CI routing guide](AGENTS.md#tasks) for the check names `fix-pr` recognizes. ### Review and delegated runs diff --git a/mise.toml b/mise.toml index 4790c221..3927bd3b 100644 --- a/mise.toml +++ b/mise.toml @@ -549,13 +549,11 @@ run = "mise run devtools:lint-go-deadcode-tests" # setup-go step they leaned on are gone. [tasks.test] -description = "Run every test suite and check generated skills" +description = "Run the Go and Python test suites and check generated skills" run = [ "mise run check-generated-skills", "mise run test-go", "mise run test-py", - "mise run test-hooks", - "mise run test-leaks", ] # Extra invocation args append to the run string, so `mise run test-go