refactor: extract bundled Sapling provider - #1003
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR extracts the bundled Sapling implementation into a private
Confidence Score: 4/5The PR is not safe to merge until the isolated provider package tests resolve the public extension entry from a built or source-compatible fixture. All three provider package smoke tests fail in a clean checkout because the copied Files Needing Attention: scripts/hunk-sapling-package.test.ts, scripts/hunk-git-package.test.ts, scripts/hunk-jj-package.test.ts Important Files Changed
Prompt To Fix All With AI### Issue 1
scripts/hunk-sapling-package.test.ts:70-72
**Provider smoke tests cannot load**
This copies the source `hunkdiff` workspace into the temporary consumer, but `hunkdiff/extension` resolves only to generated files under `dist/npm/extension`, which the test does not build. Importing the provider therefore fails with `Cannot find module 'hunkdiff/extension'`. Since the default suite includes `scripts/`, this breaks the test suite in a clean checkout. The Git and Jujutsu package tests use the same broken setup.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "refactor: extract bundled Sapling provid..." | Re-trigger Greptile |
| cpSync(HUNK_PACKAGE_ROOT, join(consumerRoot, "node_modules", "hunkdiff"), { | ||
| recursive: true, | ||
| }); |
There was a problem hiding this comment.
Provider smoke tests cannot load
This copies the source hunkdiff workspace into the temporary consumer, but hunkdiff/extension resolves only to generated files under dist/npm/extension, which the test does not build. Importing the provider therefore fails with Cannot find module 'hunkdiff/extension'. Since the default suite includes scripts/, this breaks the test suite in a clean checkout. The Git and Jujutsu package tests use the same broken setup.
Knowledge Base Used: Distribution and release tooling
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/hunk-sapling-package.test.ts
Line: 70-72
Comment:
**Provider smoke tests cannot load**
This copies the source `hunkdiff` workspace into the temporary consumer, but `hunkdiff/extension` resolves only to generated files under `dist/npm/extension`, which the test does not build. Importing the provider therefore fails with `Cannot find module 'hunkdiff/extension'`. Since the default suite includes `scripts/`, this breaks the test suite in a clean checkout. The Git and Jujutsu package tests use the same broken setup.
**Knowledge Base Used:** [Distribution and release tooling](https://app.greptile.com/modem/-/custom-context/knowledge-base/modem-dev/hunk/-/docs/distribution-and-release-tooling.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.1286dcf to
76539e2
Compare
Summary
packages/hunk-sapling(@hunk/sapling)jj,sl,git), Git fallback, and--no-extensionsbehaviorValidation
This is PR 4 of 4 and completes Phase 2. Sapling executable-backed tests were unavailable locally; mocked and package-isolation coverage passed.
This PR description was generated by Pi using GPT-5.6 Sol