Repository navigation
Conversation
init --verification-workflow wrote a blocking workflow that checks out the repository, sets up Node and runs diffci verify, which runs the repository's tests. Nothing installed the dependencies first, so in a fresh checkout every selected or full test command failed (for a Vitest project: npx canceled due to missing packages) and the check was red on every push and pull request. The workflow now installs dependencies before verify, with the repository's package manager: npm ci (npm install without a lockfile), or corepack enable and pnpm/yarn install --frozen-lockfile. When the manager is unknown, or is Bun, a comment marks where to add it. Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 18, 2026 00:55
adityankale190895
pushed a commit
that referenced
this pull request
Nov 18, 2026
…#297) verify runs the repository's tests, which a fresh checkout cannot run before its dependencies are installed. The generated workflow now installs them with the detected package manager: a frozen install only when the matching lockfile exists, and --immutable on Yarn 2+. Fixes #296. Signed-off-by: FredApps <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
|
Merged to main as 92f4dff (squashed, authorship kept). One change on top: a frozen install is used only when the matching lockfile exists. pnpm and Yarn 2+ install frozen by default in CI, so without a lockfile the workflow now uses |
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.
Fixes #296
init --verification-workflownow adds an "Install dependencies" step before "Verify changed code". The step uses the repository's package manager, fromdetectPackageManagerininstall.ts:npm ci, ornpm installwithout a lockfile.corepack enableandpnpm install --frozen-lockfile.corepack enableandyarn install --frozen-lockfile.When there is no
package.json, or the manager is Bun or cannot be detected (for example, conflicting lockfiles), the workflow gets a comment where the step goes:# Install the repository's dependencies here: verify runs its tests..diffciVerificationWorkflow(version)without install commands produces that comment, so existing callers keep working.Validation:
tests/cli-workflow-templates.test.ts: the step's place and commands, the commands for npm (with and without a lockfile), pnpm, Yarn, Bun, conflicting lockfiles and nopackage.json, and the comment. They fail onmainand pass here.npm run typecheck,npm run build,npm run audit:boundary,npm run agent:checkandnpm test(1170 pass) at the root. Inpackages/diffci-cli:npm run typecheck,npm run package:check, andnpm test(517 of 519 pass; the 2 failures are the known CLI tests: cli-agent.test.ts expects the old verify usage line and fails on main #193 and CLI tests: the init --install test looks for npm-cli.js under npm's global prefix #196, as onmain).Unsupported: Bun (no install command emitted), Go/Python/Maven dependency setup, and workflows already written by an earlier
init. They are not rewritten.