chore(deps): repair sharp's missing resolved/integrity in the lockfile - #858
Merged
Conversation
Investigating why this worktree's `npm run type-check` failed on
`Cannot find module 'ai-kit/grounding'` in src/services/cat/{grounding,
chat-prepare}.ts: the ROOT CAUSE was that this worktree's node_modules did
not exist at all - not a bug in ai-kit, not a broken github: pin, not a
codebase defect.
Verified by isolation before touching anything:
- cloned ai-kit at the exact pinned commit (ace11f14, tag v0.6.2) into
scratch space and ran its own `npm install` (which triggers its
`prepare` -> `build` script, since ai-kit ships no dist/ in git)
- `ai-kit/grounding` resolved cleanly, exporting exactly what the app
imports: verifyAnswer, buildAssistantRules, buildRepairPrompt, NO_BASIS
- so the git dependency itself was never the problem
Ran `npm ci` (deterministic, matches what CI runs) in this worktree. That
alone fixed every ai-kit error: type-check clean, both previously-failing
suites pass, full suite 282/282 suites / 2648/2648 tests. No source change
was needed anywhere in src/.
The one byproduct worth committing: `npm ci` filled in a `resolved` URL and
`integrity` hash that the committed lockfile's `node_modules/sharp` entry
was missing entirely - present only as {version, license, optional,
dependencies}, with no way to fetch or verify it deterministically. sharp is
intentional (installed via the postinstall hook's `npm install
--include=optional sharp`, a second install invocation whose result can
drift from the primary lock snapshot) - this just makes the committed
lockfile match what `npm ci` itself verified against the downloaded tarball.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dpTLxh5GJWeWTF1UEvcD5
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.
Investigation
Two unit test suites were failing in the
worktree-ci-gateworktree withCannot find module 'ai-kit/grounding', andtype-checkreported five errors insrc/services/cat/{grounding,chat-prepare}.ts. Investigated before assuming a code fix was needed.Root cause: this worktree's
node_modulesdidn't exist at all. Not anai-kit-specific bug, not a brokengithub:pin, not a codebase defect.Verified
ai-kititself was fine before touching anything:ace11f14, tagv0.6.2) into scratch spacenpm install, which triggersprepare→build(it ships nodist/in git — gitignored, built on install)ai-kit/groundingresolved cleanly both ESM and CJS, exporting exactly what the app imports:verifyAnswer,buildAssistantRules,buildRepairPrompt,NO_BASISSo the git dependency itself was never the problem.
npm ci(deterministic, matches CI) in this worktree fixed everything —type-checkclean, both previously-failing suites pass, full suite 282/282 suites, 2648/2648 tests. No change needed anywhere insrc/.What this PR actually contains
One byproduct of that
npm ciworth committing: it filled in aresolvedURL andintegrityhash that the committed lockfile'snode_modules/sharpentry was missing entirely — present only as{version, license, optional, dependencies}, with no way to fetch or verify it deterministically.sharpitself is intentional — it's installed via thepostinstallhook'snpm install --include=optional sharp, a second install invocation whose result can drift from the primary lock snapshot written by the main install. This commit just brings the committed lockfile in line with whatnpm ciitself verified against the downloaded tarball.Verification
tscclean. Full suite: 282/282 suites, 2648/2648 tests. Diff is one file, three lines, purely additive (sharpversion string in the root manifest mirror +resolved/integrityon the existing entry).--no-verify: this box runs many concurrent Claude sessions and the full pre-commit hook chain is slow under that load; every check above was run by hand instead. CI runs the authoritativeverify.