fix(ci): install prettier via mise; ignore agent tooling output - #126
Merged
Conversation
The pre-commit prettier hook ran `npm exec --yes --package prettier@3.8.1`,
which reinstalls prettier into ~/.npm/_npx on every invocation. Nothing caches
that directory, so CI refetched it each run and the install raced with itself:
npm error ENOTEMPTY: directory not empty, rename
.../node_modules/prettier -> .../node_modules/.prettier-rObPqhmw
and, on another run, a truncated module:
node_modules/prettier/internal/legacy-cli.mjs:3630
SyntaxError: Unexpected end of input
That failed 2 of 4 runs on PR #125 and passed on re-run each time -- a pure
infrastructure flake with no relation to the content being checked.
prettier now comes from .mise.toml like every other QA tool, and the hook uses
`mise exec --locked`, matching the sibling stylua hook. mise installs it once
into a versioned directory that mise-action already caches, so CI stops
refetching and the lockfile pins what runs.
The old comment justified avoiding pre-commit's mirrors-prettier node
environment. That reasoning does not apply to mise, which manages its own
install prefix rather than reusing a pre-commit node env.
`agents code-review` and `agents triage` write .agents-code-review/ and .agents-triage/ into the repo root. Both are disposable local output and must never be committed. They were only being kept out of commits by a machine-local ~/.gitignore_global, so any other checkout -- or this one after a fresh clone -- would see them as untracked and could commit them by accident. The run directories also contain full context bundles of the working tree. Uses the .agents-* glob so future agents subcommands are covered without another edit. Nothing tracked matches the pattern. .review-agent/ stays for the legacy CLI layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent repo-hygiene fixes, one commit each.
1. Prettier CI flake (
acd19051)The pre-commit prettier hook ran
npm exec --yes --package prettier@3.8.1,reinstalling prettier into
~/.npm/_npxon every invocation. Nothing cachesthat directory, so CI refetched it each run and the install intermittently raced
itself:
and on another run, a half-written module:
This failed 2 of 4 runs on #125 and passed on re-run each time — pure
infrastructure noise, unrelated to the content being checked.
prettier now comes from
.mise.tomllike every other QA tool, and the hook usesmise exec --locked, matching the siblingstyluahook.mise-actionalreadyruns with
install: true/cache: true, so the install is provisioned once andcached instead of refetched per run.
Verified:
deliberately mangled file both with and without the repo's
.prettierrc.json(
printWidth: 80,proseWrap: "always").MISE_EXPERIMENTAL=0,MISE_PARANOID=1,MISE_TRUSTED_CONFIG_PATHS) — the npm backend does not require experimentalmode.
mise install prettier@3.8.1 --force) succeeds withexperimental off.
vs 2 failures in 4 runs on the old path. First run 41s while mise installed
prettier fresh; 10-12s thereafter on a warm mise cache. CI logs confirm
prettier resolving from
~/.local/share/mise/installs/prettier/3.8.1/with no
_npxinvolvement.One caveat worth knowing: mise's npm backend records only the version in
mise.lock, not a checksum, so--lockedpins what version runs but not ahash. The old
npm exec --yesgave no hash either, so this is not a regression —but it is weaker than the aqua-backed tools.
2. Ignore agent tooling output (
7b6c6581)agents code-review/agents triagewrite.agents-code-review/and.agents-triage/into the repo root. These were only being kept out of commitsby a machine-local
~/.gitignore_global, so a fresh clone would see them asuntracked and could commit them by accident. The run directories contain full
context bundles of the working tree.
Added
.agents-*/so futureagentssubcommands are covered without anotheredit. Verified with
git check-ignoreagainst an empty global excludes file;dot_agents/is unaffected and nothing tracked matches the pattern.Gates
pre-commit --all-files, both Neovim suites,qa.just verify-shell(23 unit + 4 integration), and
qa.just verify-nvim-luaall pass locally.