Repository navigation
fix: migrate the local HEAD commit instead of the remote's default branch - #15
Merged
Merged
Conversation
…al repository uptide fix switched its private clone to the remote's default branch. In a repository whose local branch was ahead of origin (origin held only an initial commit), that left a clone without package.json and the run failed with "no package.json; run fix at the project root". The clone is now checked out at the local HEAD commit. Before any clone, install or LLM call, fix settles what differs from the remote: a branch ahead of or behind its upstream is migrated as it is, with one line saying so; uncommitted files are left out and listed; and a --pr run stops when the base branch on origin does not contain the commit (--base names another base) or the working tree is dirty (--allow-dirty). A package.json that is not committed is reported with the commit and the repository it would have been cloned from. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
Review of #15. The CLI prints the preflight notes before the run and tells the engine so, which then leaves them out of the report instead of repeating them. A --pr run whose commit is behind its base on origin gets a warning, not a refusal. The refusal for a commit ahead of the base says to fetch when the push was made from elsewhere, since the remote is compared as last fetched. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
7 of 8 tasks
lucasbraum
added a commit
that referenced
this pull request
Oct 15, 2026
## Pack `ioredis` `>=5 <6` → `>=6 <7` (queue entry `ioredis`, now `blocked`). **Candidate, not verified.** No breaking false positive on five public merged upgrades. But none of them has a compiler diagnostic or a breaking site in application code; the only breaking expected sites are two lines of test data, which the pack doesn't predict. So the gate (≥1 predicted breaking finding) can't be met honestly. Evidence: `packages/core/src/packs/ioredis/RESEARCH.md`. **Rebased on main `3c8902d` (2026-10-15).** The only conflicts were `registry.ts` (both entries kept, alphabetical) and the generated README table (regenerated). The rebase also picks up #145's re-recorded react-router `verification.json`; the Packs workflow had been red on main since #143 without it. After the rebase, #143 and #144 changed scoring and the ground-truth rule: - I re-ran `pnpm packs:truth` on all five repositories: still no compiler diagnostic. - I added the four ioredis insertion anchors it now drafts, unchanged. - I dropped one anchor from the @sentry/node bump. - No earlier site was moved or removed. - The revision is recorded in the truth's `$comment` and in RESEARCH.md. ## Sources All read 2026-10-14 and pinned: - the official [Upgrading from v5 to v6](https://github.com/redis/ioredis/wiki/Upgrading-from-v5-to-v6) (wiki `e859962`) - the CHANGELOG and README at `v6.0.0` - #2127 (RESP3), #2160 (defaults), #2206 (String.prototype, only in 6.1.0-beta.1) - the BullMQ 6.0.0 changelog - the published `ioredis` 5.11.1/6.0.0 and `@ioredis/commands` 1.10.0/2.0.0 tarballs, diffed - the dependents' registry manifests v6 removes **no** command (373 → 382 methods) and no public export. Reply shapes and types are unchanged for default (`"legacy"`) clients, and so are event names and `exec()` types. Breaking changes: Node ≥20, RESP3 by default, plus new `retryStrategy`/`keepAlive` defaults. ## Rules and behavior notes **Assisted rules** (no rewrite): - `bundled-ioredis`: TS2322/2345/2739-41 naming `Redis<"legacy">` not assignable, i.e. a dependent that installs its own ioredis 5. The guide gives options (a)–(d), so the agent's choice lands in *Decisions for you*. Never a cast. - `duplicate-signature`: TS2416/2430 on `'duplicate'` overrides. **Finding notes** (syntactic, binding-aware): - `client-defaults` (deprecated, also a decision): constructions that leave `protocol`/`retryStrategy`/`keepAlive` at the changed defaults. Tests are skipped. - `subscriber-mode` (breaking): `mode === 'subscriber'`. - `offline-queue-connect` (breaking): a `connect` listener sending a command when `enableOfflineQueue: false`. - `handshake-auth` (breaking): AUTH recognized by command name. v6 sends credentials inside `HELLO 3 AUTH`. **Decision notes** (with `applies()` evidence): - `node-20` - `bundled-copies`: bullmq <6, bull, @hocuspocus/extension-redis, @chat-adapter/state-ioredis, cache-manager-ioredis-yet - `instrumentation`: OTel `instrumentation-ioredis` <0.70 / `auto-instrumentations-node` <0.80 - `stale-types`: `@types/ioredis` - `string-prototype`: target exactly 6.0.0 - `also-review` **Not declared:** - No release group: ioredis ships alone. - No `requiresBuild`: no case of a build failing where tsc passes. - Explicit peers rejecting 6 (typeorm, ioredis-mock, @liaoliaots/nestjs-redis) are left to the engine's peer-conflict report. ## Ground-truth repositories | Repository | Parent | Upgrade | Findings | | --- | --- | --- | --- | | ferni-ai/voiceai | `c59ed09` | `c6838d5` (#703) | 7 `client-defaults` (protocol: 2 pins, 2 of them insertion anchors) | | syzygyhack/open-foundry | `7391001` | `a466e0d` | 2 `client-defaults` (1 anchor) | | simondietschi/dokunc | `83681ed` | `c475390` (#15) | 2 `client-defaults` (v5 retryStrategy, 1 anchor), 2 `handshake-auth` | | safe-global/safe-client-gateway | `14bd05b` | `80135d2` (#3409) | 0 (control, Yarn Berry) | | kazumadev619-dev/FishingConditionsApp | `8ba3f0d` | `cdecc03` (#235) | 0 (control, npm) | Screened out: elie222/inbox-zero#3821. Its TS2322 (two copies via bullmq 5) is a `packs:truth` linking artifact; a real scripts-off install compiles it. Its upgrade also moved bullmq 5 → 6. ## `uptide pack test` output ``` uptide pack test ioredis · candidate fixtures 6 cases, 19 sites · pass ground truth ferni-ai/voiceai@c59ed0982f96 ioredis 5.8.2 → 6.0.0 predicted 6, expected 7, false positives 2, false negatives 3 syzygyhack/open-foundry@73910018b5e8 ioredis 5.10.1 → 6.0.0 predicted 1, expected 2, false positives 0, false negatives 1 simondietschi/dokunc@83681ed0ccc5 ioredis 5.11.1 → 6.0.0 predicted 2, expected 4, false positives 0, false negatives 2 ✗ blocked: @hocuspocus/extension-redis 4.7.0 depends on ioredis ~5.6.1; no release accepts ioredis 6.0.0 safe-global/safe-client-gateway@14bd05b98bf4 ioredis 5.11.1 → 6.0.0 predicted 0, expected 0, false positives 0, false negatives 0 kazumadev619-dev/FishingConditionsApp@8ba3f0d24bc7 ioredis 5.11.1 → 6.0.0 predicted 1, expected 0, false positives 1, false negatives 0 with @types/ioredis 4.28.10 → 5.0.0 rule precision recall tp fp fn client-defaults 70% 64% 7 3 4 handshake-auth n/a 0% 0 0 2 overall (sites) 70% 54% 7 3 6 behavior notes (sites) 70% 54% 7 3 6 breaking (sites) n/a 0% 0 0 2 PASS ioredis: candidate ``` The dokunc "blocked" line is the engine's own report (#142) of the bundled hocuspocus copy that `bundled-copies` describes; the repository upgraded anyway, keeping both copies. **Remaining false positives:** - voiceai `:101`/`:92` against truth `:98`/`:89`: the anchor is at the first line of the rewritten run. - FishingConditionsApp `client.ts:13`: a client deliberately left on RESP3. **Remaining false negatives:** - voiceai `embedding-cache.ts:134`: the module name is hidden from static scans. - voiceai `:98`/`:89` and open-foundry `:136`: anchor offsets. - dokunc `log.test.ts:20/28`: `handshake-auth`, test data. **Engine gaps still open** (RESEARCH.md): 1. A runtime-only major can't reach `verified`. 2. Detection reaches only files with static usages. 3. There is no "remove a package" outcome (`@types/ioredis`). 4. `with` can't model a required dependent major. 5. `packs:truth` links per workspace, and `--directory` fails with a root lockfile. Gaps 2 and 3 of the original list were resolved by #143 and #144. ## Checklist - [x] Every rule and note comes from a source listed in `meta.sources` - [x] Every rule that rewrites or detects has a fixture case, with a site it must leave alone (`keep`). The two compiler-claim rules are unit-tested instead, because a `message:` marker can't contain `"`. - [x] Ground truth: public repositories at the commit before their upgrade; expected findings read from their own upgrade commit and the compiler, never copied from Uptide's output - [ ] At least two public repositories for `verified`; otherwise the pack ships as a candidate (5 repos, still a candidate: no predicted breaking site) - [x] `pnpm uptide pack test ioredis` passes and its output is pasted above; `verification.json` written with `--write` - [x] `pnpm lint && pnpm typecheck && pnpm test` pass: core 1727 passed / 32 network-skipped, CLI 454 passed; lint at baseline; `docs:packs --check` current. All 10 CI checks pass on `30579da`, Pack test included. - [x] Changeset added - [x] No private code, names or paths anywhere: fixtures are synthetic, ground truth is public No third-party repository was pushed to, commented on or modified. Every install ran with scripts off, and no bare `npx` was used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017BYqQRCpXk6jz9vcCnx21H --------- Signed-off-by: Claude <[email protected]> Co-authored-by: Claude <[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.
What and why
A real run:
uptide fix vitest --pr --yesin a repository whose localmainwas 23 commits ahead oforigin/main. The private clone was switched toorigin/main(an "Initial commit" with only a README), so the run failed with "no package.json; run fix at the project root".fixPreflightruns before any clone, install or LLM call.--pr: one line, for examplemain is 23 commits ahead of origin/main; migrating your local state.--pr: when the base branch on origin does not contain local HEAD, the run stops:main is 23 commits ahead of origin/main. Push it first (git push origin main) so the PR only contains the migration, or pass --base <branch>.Exit 1.--prit refuses unless--allow-dirty. Previously any dirty tree was refused.--base <branch>(also used as the PR base) and--allow-dirty.Behaviour changes to review
--prnow includes unpushed local commits in the migration branch. Before, it branched fromorigin/<default>and left them out with a note.origin, a--prrun is not refused by the preflight; the publish step fails as before.How it was verified
packages/core/src/fix/isolate.test.ts: ahead of upstream, behind, no upstream, dirty tree and uncommittedpackage.json, with and without--pr. The refused runs assert no clone, no check and no publish.--prrun exits 1 without calling the engine, and--base/--allow-dirtyare passed through.pnpm lint,pnpm typecheckandpnpm testpass locally (783 core, 286 CLI).pnpm smokewas not run.Checklist
pnpm lint && pnpm typecheck && pnpm testpassdocs/cli.md,fix --help)🤖 Generated with Claude Code