refactor: extract bundled Jujutsu provider - #1002
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR extracts the bundled Jujutsu VCS provider into the private
Confidence Score: 4/5The PR is not safe to merge until the newly added Jujutsu package smoke test can load its isolated consumer successfully. The extraction’s production bundling and workspace registration are consistent with the existing Git-provider pattern, but the new test deterministically launches an environment without Files Needing Attention: scripts/hunk-jj-package.test.ts Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
H[Hunk bundled VCS entry] --> JJ["@hunk/jj"]
JJ --> VCS["@hunk/vcs leaves"]
JJ --> API["hunkdiff/extension host contract"]
Build[Production Bun build] -->|bundles| H
Test[Isolated smoke-test consumer] --> JJ
Test --> VCS
Test -. missing .-> API
Prompt To Fix All With AI### Issue 1
scripts/hunk-jj-package.test.ts:58-63
**Isolated Consumer Cannot Load**
This test installs only `@hunk/jj` and `@hunk/vcs`, but importing `@hunk/jj` also loads `hunkdiff/extension`. Because that module is absent from the isolated consumer, the spawned process exits with `Cannot find module 'hunkdiff/extension'`, causing the default test suite to fail. This violates the repository requirement that the test suite pass; the fixture must provide the host contract or exercise the package in its intended bundled environment.
---
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 Jujutsu provid..." | Re-trigger Greptile |
| cpSync(PACKAGE_ROOT, join(consumerRoot, "node_modules", "@hunk", "jj"), { | ||
| recursive: true, | ||
| }); | ||
| cpSync(VCS_PACKAGE_ROOT, join(consumerRoot, "node_modules", "@hunk", "vcs"), { | ||
| recursive: true, | ||
| }); |
There was a problem hiding this comment.
This test installs only @hunk/jj and @hunk/vcs, but importing @hunk/jj also loads hunkdiff/extension. Because that module is absent from the isolated consumer, the spawned process exits with Cannot find module 'hunkdiff/extension', causing the default test suite to fail. This violates the repository requirement that the test suite pass; the fixture must provide the host contract or exercise the package in its intended bundled environment.
Context Used: guidelines.mdc Cursor rule (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/hunk-jj-package.test.ts
Line: 58-63
Comment:
**Isolated Consumer Cannot Load**
This test installs only `@hunk/jj` and `@hunk/vcs`, but importing `@hunk/jj` also loads `hunkdiff/extension`. Because that module is absent from the isolated consumer, the spawned process exits with `Cannot find module 'hunkdiff/extension'`, causing the default test suite to fail. This violates the repository requirement that the test suite pass; the fixture must provide the host contract or exercise the package in its intended bundled environment.
**Context Used:** guidelines.mdc Cursor rule ([source](https://github.com/modem-dev/modem/blob/main/.cursor/rules/guidelines.mdc))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.83e8424 to
362cb78
Compare
Summary
packages/hunk-jj(@hunk/jj)Validation
This is PR 3 of 4 and is stacked on the Git provider extraction.
This PR description was generated by Pi using GPT-5.6 Sol