Repository navigation
fix(pack-test): a deadline on every wait, and each pack in a process it can stop - #110
Merged
Merged
Conversation
…it can stop The Packs job on #107 ran 40+ minutes and ignored cancel; a rerun of the same commit passed in 10.5. Every pack passes locally at that commit, alone and all in one process as CI runs them (19 min, 5.7 GB peak), so nothing in the analysis loops. What could wait without end was the network: registry requests carried no deadline of ours (undici's 300 s header and body timeouts, times four attempts), and the shallow fetch of a ground-truth repository ran through a synchronous git with no timeout. - Registry requests: a deadline per attempt that covers the body (REQUEST_TIMEOUT_MS, 120 s). A stall fails with REGISTRY_TIMEOUT, which falls back to an expired cache entry like REGISTRY_UNREACHABLE. - Child processes: local git commands time out (5 min), the ground-truth fetch runs through `command()` so its whole process group is killed at its deadline (10 min), and the remaining sync git calls have one too. - `uptide pack test` runs each pack in a child process. Past --pack-timeout (default 20 min) the child's process group is killed and the pack fails by name with the last line it logged; the other packs still run. A cancelled job takes the child down with it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RniwUAvitpghJF4MuodRZz Signed-off-by: Claude <[email protected]>
Merged
lucasbraum
pushed a commit
that referenced
this pull request
Oct 13, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - [#109](#109) [`7cf3bb8`](7cf3bb8) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Uptide no longer opens a pull request for an upgrade it could not analyze. A major upgrade that no verified pack covers is never published: `uptide fix --pr` refuses it before anything changes, `uptide pr` refuses a stored run of one, and the Action reports it as `skipped` with `analysis: "none"` and the reason `no pack yet` instead of migrating it. A minor or patch without a pack is published only when the repository's own `build` script and tests pass after the bump; `fix` now runs the build for runs without a pack and records it in `verification.build`. Every PR description has a **Verified by** row naming what vouched for it (the pack, the type-check, the build, the tests) and what did not run. ### Patch Changes - [#110](#110) [`bb4c4d3`](bb4c4d3) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Nothing Uptide waits on can hang a run any more. Every registry request has a deadline that covers its body, and a stalled one fails with `REGISTRY_TIMEOUT` (answered from the cache when an expired entry exists). Local git commands have one too, and so does the shallow fetch of a ground-truth repository. `uptide pack test` runs each pack in a process of its own: one that runs longer than `--pack-timeout` (minutes, default 20) is stopped with everything it started and fails with the pack's name, and the other packs still run. Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
This was referenced Oct 13, 2026
lucasbraum
added a commit
that referenced
this pull request
Oct 14, 2026
Release-group members now move with the lead even when they have no dependency/peer edge or their installed range already accepts the target. This fixes the exif-photo-blog and wortkarte shapes where Next companions remained on 15.x. Adds the source-backed `releaseGroup` pack contract and uses one planner in check, peer/range preflight, fix, and pack verification. List reports declared members through `movesWith`. The lead's exact version wins; if unpublished for a member, the newest stable release with a published dependency/peer range accepting the lead is selected. A missing compatible release blocks the plan. Ordinary companions retain their existing behavior. Regression tests cover exif-photo-blog @3f1a363 (three members), wortkarte @e3bd367, compatible installed peers, missing edges, compatible fallback, missing compatible releases, unused-member compilation, fix installation, inventory-independent list grouping, and contract validation. The four planner regressions failed before the implementation. Core suite: 1,418 passed / 32 skipped; additional focused integration and contract tests passed. Core typecheck, changed-file Biome, and diff checks passed. ## Full pack gate Ran `pnpm uptide pack test` with per-pack process isolation from #110, exit 0. All five verified packs retain exactly their recorded breaking metrics. No ground-truth expectations or verification records changed. | Pack | Status | Public repos | Breaking TP / FP / FN | Precision | Recall | Recorded recall | Overall TP / FP / FN | | --- | --- | ---: | --- | ---: | ---: | ---: | --- | | ai | verified | 2 | 9 / 0 / 2 | 100% | 81.82% | 81.82% | 54 / 0 / 7 | | react | verified | 2 | 89 / 0 / 40 | 100% | 68.99% | 68.99% | 92 / 6 / 40 | | stripe | verified | 2 | 18 / 0 / 2 | 100% | 90% | 90% | 18 / 0 / 2 | | vitest | verified | 2 | 16 / 0 / 16 | 100% | 50% | 50% | 16 / 18,938 / 16 | | zod | verified | 3 | 59 / 0 / 21 | 100% | 73.75% | 73.75% | 120 / 0 / 21 | The overall score includes non-breaking findings: React has six false positives and Vitest has 18,938 `unverified` false positives. These do not count toward the recorded breaking gate. A separate clean-main run (`d0dea2a`) reproduced exactly the same Vitest overall counts (16 TP / 18,938 FP / 16 FN) and breaking counts (16 / 0 / 16). This overall noise predates the PR; no expectations have been adjusted. Next's candidate is still on #114, not main. Its release-group declaration will use eslint-config-next, @next/eslint-plugin-next, @next/bundle-analyzer, @next/mdx, and @next/third-parties when the requested post-merge follow-up is applied. This PR does not activate the candidate or change its expectations. UPT-6 Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
added a commit
that referenced
this pull request
Oct 14, 2026
Packs can declare `requiresBuild: true` when compiler checks cannot establish that the upgraded repository builds. Fix runs the existing repository build runner after migration, using the same credential-filtered environment as tests. Missing, failed, timed-out, or unrun required builds block publication with a reason. The PR's **Verified by** row displays the build result, and reverification reruns the required build rather than reusing a stale pass. Other packs retain their existing behavior. Regression tests cover successful, failed and missing builds; actual execution without inherited secrets; failure during reverification; and unchanged behavior for ordinary packs. The four initial regression cases failed before implementation. Core suite: 1,417 passed / 32 skipped. Six focused required-build tests, the existing generic-build tests, core typecheck, changed-file Biome, and diff checks passed. ## Full pack gate Ran `pnpm uptide pack test` with per-pack process isolation from #110, exit 0. All five verified packs retain exactly their recorded breaking metrics. No ground-truth expectations or verification records changed. | Pack | Status | Public repos | Breaking TP / FP / FN | Precision | Recall | Recorded recall | Overall TP / FP / FN | | --- | --- | ---: | --- | ---: | ---: | ---: | --- | | ai | verified | 2 | 9 / 0 / 2 | 100% | 81.82% | 81.82% | 54 / 0 / 7 | | react | verified | 2 | 89 / 0 / 40 | 100% | 68.99% | 68.99% | 92 / 6 / 40 | | stripe | verified | 2 | 18 / 0 / 2 | 100% | 90% | 90% | 18 / 0 / 2 | | vitest | verified | 2 | 16 / 0 / 16 | 100% | 50% | 50% | 16 / 18,938 / 16 | | zod | verified | 3 | 59 / 0 / 21 | 100% | 73.75% | 73.75% | 120 / 0 / 21 | The overall score includes non-breaking findings: React has six false positives and Vitest has 18,938 `unverified` false positives. These do not count toward the recorded breaking gate. A separate clean-main run (`d0dea2a`) reproduced exactly the same Vitest overall counts (16 TP / 18,938 FP / 16 FN) and breaking counts (16 / 0 / 16). This overall noise predates the PR; no expectations have been adjusted. Next's candidate remains on #114, not main. Set `requiresBuild` there in the requested follow-up after the first two engine PRs merge, then rerun its unchanged ground truth. No pack expectations or verification records are edited here. UPT-6 Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
added a commit
that referenced
this pull request
Oct 14, 2026
Packs can declare a scoped file inventory independent of imported usages, so runtime rules can inspect configuration, scripts and file conventions even when the dependency has no imported call sites. Rules can return writes, creates, deletes and renames together. The engine prevalidates all paths, applies the edits as one verified transaction, and restores all affected files when compilation or related tests reject it. Renames retain the old path as the finding anchor, and formatting handles the resulting paths. Regression tests cover inventory-only check results, brace/glob scopes, all four edit operations, executable-mode preservation, rollback after rejected verification or exceptions, invalid paths, and a real fix rename that preserves its old anchor. The initial inventory and multi-file regression tests failed before implementation. Core suite: 1,419 passed / 32 skipped, then the additional executable-mode regression passed with the six transaction tests. Core typecheck, Biome and diff checks passed. ## Full pack gate Ran `pnpm uptide pack test` with per-pack process isolation from #110, exit 0. All five verified packs retain exactly their recorded breaking metrics. No ground-truth expectations or verification records changed. | Pack | Status | Public repos | Breaking TP / FP / FN | Precision | Recall | Recorded recall | Overall TP / FP / FN | | --- | --- | ---: | --- | ---: | ---: | ---: | --- | | ai | verified | 2 | 9 / 0 / 2 | 100% | 81.82% | 81.82% | 54 / 0 / 7 | | react | verified | 2 | 89 / 0 / 40 | 100% | 68.99% | 68.99% | 92 / 6 / 40 | | stripe | verified | 2 | 18 / 0 / 2 | 100% | 90% | 90% | 18 / 0 / 2 | | vitest | verified | 2 | 16 / 0 / 16 | 100% | 50% | 50% | 16 / 18,938 / 16 | | zod | verified | 3 | 59 / 0 / 21 | 100% | 73.75% | 73.75% | 120 / 0 / 21 | The overall score includes non-breaking findings: React has six false positives and Vitest has 18,938 `unverified` false positives. These do not count toward the recorded breaking gate. A separate clean-main run (`d0dea2a`) reproduced exactly the same Vitest overall counts (16 TP / 18,938 FP / 16 FN) and breaking counts (16 / 0 / 16). This overall noise predates the PR; no expectations have been adjusted. Next's middleware/proxy and removed eslint configuration rules remain a follow-up commit on #114 after this engine PR merges. No Next expectations are changed here. UPT-6 Signed-off-by: Lucas Braum <[email protected]>
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.
UPT-19
What and why
The first Packs run on #107 (job 115419620128) spent 40+ minutes in
uptide pack testand ignored cancel and force-cancel. Its log was never uploaded (404). A rerun of the same commit passed in 10.5 minutes.I reproduced
pack testlocally at #107's head (3a63539) and no pack hangs:I also ran every pack in one process, as CI does: 1,135 s, all pass. Memory levels off at 5.7 GB rather than growing across packs.
The companion fetching added in #107 is bounded: each dependency is decided once and the compile loop is capped at 5 rounds. Nothing in the analysis loops.
What could wait without end was the network:
fetchfalls back to undici's 300 s header and 300 s body timeouts, and we retry 4 times, so one stalled connection could block for about 20 minutes. Two in a row exceed the 40 minutes observed.git fetchof a ground-truth repository ran through a synchronousexecFileSyncwith no timeout, and that also blocks the event loop.A runner whose network degraded would also miss the cancel and fail to upload its log, which matches the 404. That last point is an inference: the log that would prove it does not exist.
What changed
fetch/registry.ts): every request attempt gets its own deadline,REQUEST_TIMEOUT_MS(120 s), and it also covers reading the body. A stall fails with the newREGISTRY_TIMEOUT, which is handled likeREGISTRY_UNREACHABLE: an expired cache entry still answers,listmarks the package blocked, and the CLI groups it with registry failures.command(), which kills the whole process group at its deadline (10 min,fetchTimeoutMs). That includesgit-remote-https, which could otherwise hold the pipe open.git()gets a 5-minute timeout for local work.version.ts,verify.ts) get 30 to 60 s.uptide pack testruns each pack in a child process, in its own process group. Past--pack-timeout <minutes>(default 20) the group is killed with SIGKILL. The pack then fails by name with the last line it logged, through the newunfinishedPack, sopack-test-report.tsrenders it like any failure. The other packs still run. A SIGINT or SIGTERM to the parent kills the child's group first, then the parent exits on the same signal. The parent only waits, so the deadline fires even when the child is stuck in a synchronous compile or GC thrash.docs/packs.mddescribes the deadlines and the option, and a changeset is included.How it was verified
pack-isolate.test.ts:npm-fetcher.test.ts: a registry that never answers and one whose body stalls halfway both end withREGISTRY_TIMEOUTinstead of hanging.pnpm uptide pack test ai --pack-timeout 0.5stopped at 32 s and printedpack test ai: timed out after 30s and was stopped; last: checking ai 6.0.116 → 7.0.9 in vercel/chatbot@77d362e596e2. Exit was 1 and no process was left behind.pnpm uptide pack test zodthrough the child-process path: verified, passed, 110 s, rendered byscripts/pack-test-report.ts.pnpm lint && pnpm typecheck && pnpm testpass on top of main: core 1395 passed (32 skipped), CLI 437. Lint has one warning, which is already on main.scripts/public-tree.mjsandscripts/check-links.mjsare clean.Also seen in the passing rerun's log, and not fixed here: the job summary was 2,163 KB, over GitHub's 1,024 KB limit, so it was dropped (
$GITHUB_STEP_SUMMARY upload aborted). It predates this change and belongs in its own PR.Checklist
pnpm lint && pnpm typecheck && pnpm testpassdocs/packs.md)pnpm changeset)🤖 Generated with Claude Code
https://claude.ai/code/session_01RniwUAvitpghJF4MuodRZz
Generated by Claude Code