Repository navigation
fix(test): pass the lifecycle, trust prompt and jj source tests on macOS - #1146
Merged
benvinegar merged 1 commit intoOct 10, 2026
Merged
Conversation
Six tests failed on macOS on upstream main; each now passes. - lifecycle "exits cleanly on SIGHUP/SIGQUIT/SIGPIPE": the test stopped reading the PTY master after its first match. Hunk's teardown writes then filled the PTY buffer and blocked, so Hunk never exited and the 2s wait timed out. drainPty keeps reading until the PTY closes; a Hunk that hangs on a signal still fails the test. - extensions "trust prompt runs repo extensions…" and "never records a denial…": Hunk records trust under the repo's canonical path, and a macOS temp dir reads as /var/folders/… but resolves to /private/var/folders/…. The lookups now use trustKey(), which resolves the same way; the toBeUndefined() check had passed for the wrong reason. - hunk-jj "logs unexpected source failures with revision and path context": without jj installed, the spawn-failure log named the revision and file and left out the repo path. Both the spawn and the stream-collect diagnostics now end with "in <repoRoot>", like the failed-read one.
|
@andrewloux is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
PR author is not in the allowed authors list. |
Member
|
Thank you. Looks like we need a macOS test runner too. |
benvinegar
enabled auto-merge (squash)
October 10, 2026 12:06
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.
six tests fail on macOS on
main, sobun run testandbun run test:integrationdon't go green on a mac. CI runs both suites onubuntu-latestonly, which is whymainstays green. #1120 fixed the install VM ones and listed the jj test as pre-existing. with this branch both suites pass on my machine. each failure has its own cause:lifecycle,
exits cleanly on SIGHUP/SIGQUIT/SIGPIPE: the test stops reading the PTY once the first screen shows up. when the signal lands, hunk's teardown output fills the PTY buffer and the write blocks, so hunk never exits inside the 2s wait.drainPtykeeps reading until the PTY closes. a hunk that hangs on the signal still fails the test.extension trust,
trust prompt runs repo extensions…andnever records a denial…: hunk records trust under the repo's canonical path. the fixture lives undertmpdir(), which is/var/folders/…on macOS and resolves to/private/var/folders/…, so the lookup byfixture.dirreturnsundefined. the three lookups now go throughtrustKey(), which resolves the same way. thetoBeUndefined()check for a dismissed prompt was passing because of that same mismatch, and now checks the real key.jj source,
logs unexpected source failures with revision and path context: withoutjjinstalled,Bun.spawnthrows, and that log line names the revision and file but leaves out the repo. only the non-zero exit branch includedin <repoRoot>. the spawn and stream-collect diagnostics now end with it too. that's the one user-visible change, so it carries a patch changeset.one command per fix, on
main(a3321c82) and on this branch:full runs on this branch:
bun run test4556 pass, 52 skip, 0 fail.bun run test:integration191 pass, 0 fail. typecheck, oxlint and oxfmt are clean.tested on macOS (Darwin 25.6.0) with Bun 1.4.2. i haven't run it on Linux. CI is green there, so i'd expect the PTY to hold the teardown output and the tmpdir to already be a real path, and
drainPtyandtrustKey()then change nothing.