Repository navigation
fix: stop publishing from running the agent tooling tests - #207
Merged
Merged
Conversation
The 3.2.0 release failed when a slow agent-tooling test timed out inside npm publish's prepublishOnly. `npm test`, which publishing runs, now covers only the package's tests in src/. The agent tooling's tests run with `npm run test:agents`, from their own vitest config, as a separate step in test.yml on every pull request. `npm run verify` runs them only when something they read changed since main, and says when it skips them. This releases 3.2.1, which ships the confirmation-flow change from #205.
doistbot
reviewed
Dec 3, 2026
doistbot
left a comment
Member
There was a problem hiding this comment.
This change cleanly splits the agent tooling's tests out of npm test so a release can't fail on prepublishOnly running them, moves them to a new vitest.agents.config.ts with a dedicated CI step, and gates them in npm run verify behind an onlyWhenChanged path list so local verification stays fast while every PR still runs them.
Few things worth tightening:
pre-pushstill runs onlynpm test, so a person pushing an agent-tooling change no longer exercises those tests locally — consider adding atest:agentsjob to the hook (or running both in one job), or noting indocs/agents.mdthat pre-push covers onlysrc/.- Worth double-checking the
onlyWhenChangedpath list against what the agent tests actually read, since a gap would let verify report success locally for a change (like a doc deletion) that CI's tests would catch.
I also included a few optional follow-up notes in the details below.
Optional follow-up notes (2)
.agents/scripts/lib/steps.ts:29: Deleting or renaming
CHANGELOG.mdnow skips the agent tooling tests, though.agents/scripts/lib/tree.tsclassifies a doc deletion as code precisely becauseinstructions.test.tschecks every file the agent docs name (docs/agents.mdnames bothCHANGELOG.mdandCONTRIBUTING.md). In that scenario verify runs the other steps, records a pass, and the push check allows the push; only CI fails. AddingCHANGELOG.mdhere is exact: a changelog-only edit still returns earlier as docs-only, so only its deletion reaches this step.CONTRIBUTING.mdwould need adding too if its rename should be caught locally..agents/scripts/lib/steps.test.ts:188: Nothing checks that every
onlyWhenChangedentry still names a file or folder in the checkout.nothingItReadsChangedmatches withpath.startsWith(prefix), so a rename (docs/agents.md,CODEBASE.md,lefthook.yml) or a typo leaves an inert entry: verify silently stops running the agent tooling's tests for that path even thoughdocs/agents.mdsays it does, and no test fails. A loop over the step's list withexistsSync(join(REPO_ROOT, path))in this test would pin it.
…n unchanged tree Verify now runs the agent tooling tests when a file was deleted or renamed (the agent docs may name it) and when nothing changed since the base, as it does every step then. They start after the package tests, so two vitest runs don't slow each other into timeouts. test.yml runs on every push to main and next as well, so both suites run on each merge, apart from publishing. AGENT_DOCS and the test helper folder move to tree.ts, shared by instructions.test.ts and the step's path list, and a test checks every path in that list exists. The docs say pre-push runs only the package's tests.
doist-release-bot Bot
added a commit
that referenced
this pull request
Dec 3, 2026
## [3.2.1](v3.2.0...v3.2.1) (2026-12-03) ### Bug Fixes * stop publishing from running the agent tooling tests ([#207](#207)) ([4dbabf3](4dbabf3))
Contributor
|
🎉 This PR is included in version 3.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
The 3.2.0 release failed because publishing ran the agent tooling's tests:
prepublishOnlyrunsnpm test, which included.agents/scripts/**, andlib/patches.test.tstimed out on the release runner. Publishing should test what it is about to publish, not the tooling that checks our own work.npm test(and soprepublishOnlyandpre-push) now covers onlysrc/. The agent tooling's tests run withnpm run test:agentsfrom a newvitest.agents.config.ts, as a separate "Run agent tooling tests" step intest.yml, which now also runs on every push tomainandnext, so both suites run on every pull request and every merge without being on the publish path.npm run verifygains atests:agentsstep that starts after the package tests and hasonlyWhenChanged: it runs when a path the agent tests read changed sincemain(.agents/,vitest.agents.config.ts,package.json,package-lock.json,.github/workflows/,lefthook.yml,.claude/,.codex/,.cursor/,.pi/, the agent docs,src/_fixtures/,.oxfmtrc.json,tsconfig.json,.gitignore), when a file was deleted or renamed (the agent docs may name it), and when nothing changed. Otherwise it prints that it skipped them and that CI runs them on every pull request. A skipped step counts as passed, so steps after it still run. A test checks every path in the list exists, apart from.cursor/, which must stay free of a hooks file.This releases 3.2.1, which ships the confirmation-flow change from #205.