Skip to content

feat(packs): verified redis pack; scan cursors of a client behind a local module (UPT-66) - #168

Merged
lucasbraum merged 3 commits into
mainfrom
lucasbraum/upt-66-redis-wrapper-call-sites
Oct 16, 2026
Merged

lucasbraum merged 3 commits into
mainfrom
lucasbraum/upt-66-redis-wrapper-call-sites

Conversation

@lucasbraum

Copy link
Copy Markdown
Collaborator

Linear: UPT-66. Redis gap 1 from #151/#160.

What

  • Finder. scan-cursor also reads files that never import redis but import a value from a repository module that depends on it (getRedisClient from ../config/redis, redisClient from ~/utils/redis.server), resolved the way the compiler does it (tsconfig paths, export * chains). This is the fix(zod): report formErrors and errors read off untyped catch bindings #127 approach. zod's resolver moves to check/importers.ts as packageImports and projectFiles, parameterized by package; zod's behavior is unchanged. scan(cursor) after let cursor = 0 counts as a numeric cursor (fixture scan-cursor line 9 marked).
  • Promotion. pack test redis --write on this branch measures verified under UPT-48's gate, so verification.json now says verified. README table regenerated. Ground truth is unchanged: the record's digest matches the committed file, and the old candidate record's digest was stale.
  • Tests came first (e2904cb): the FCM layout (getter typed off createClient, relative import) and the blog layout (~/ alias, file not among the usages).

Score

before (#151/#160) after
breaking P / R 100% / 61% (11/18) 100% / 83% (15/18)
scan-cursor recall 30% 70%
behavior notes P / R 50% / 50% 50% / 50%

5 repos, 20 real breaking sites, 0 breaking false positives. keep-alive, quit-disconnect, scan-iterators and unstable-resp3 have no real site and run as assisted.

Remaining misses (3, blog)

  • refresh-cache.ts:204, :206: compile errors only. The importer memory cap (IMPORTER_GROWTH 0.2) leaves the file out of the program; the run reports it as not analyzed. 0.5 would include it. The cap is not changed here.
  • utils.ts:106: a helper with a local structural client type and no redis-related import. Following imports can't reach it.

Checks

Core suite: one failure, in fix/assisted.test.ts (a known timeout flake); it passes on its own (24/24). Lint and typecheck are clean (the one lint warning is already on main). public:check is clean.

🤖 Generated with Claude Code

lucasbraum and others added 3 commits October 15, 2026 20:40
…(UPT-66)

Failing first: the FCM layout (a getter typed off createClient, imported
by relative path) and the blog layout (the client behind a ~/ alias, in a
file the importer cap leaves out of the program), plus a scan call whose
cursor variable starts as a number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lucas Braum <lucasbraum@gmail.com>
…UPT-66)

The scan-cursor detector read only files that import redis. A file that
takes the client from the repository's own module (getRedisClient from
../config/redis, redisClient from ~/utils/redis.server) was skipped, and
when the importer memory cap also left it out of the program, nothing
reported it at all.

The redis pack now also reads project files that import a value from a
repository module depending on redis, resolved the way the compiler
resolves it (tsconfig paths, export * chains). The resolver is the zod
error-members one, moved to check/importers.ts as packageImports and
parameterized by package. scan(cursor) after `let cursor = 0` counts as
a numeric cursor.

Re-scored once (ground truth unchanged, verification.json untouched):
breaking recall 61% (11/18) -> 83% (15/18), precision 100%, no new
false positive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lucas Braum <lucasbraum@gmail.com>
pack test redis --write on this branch, under UPT-48's gate: 5 repos,
20 real breaking sites, breaking precision 100%, recall 83% (15/18),
behavior notes 50%/50%. keep-alive, quit-disconnect, scan-iterators and
unstable-resp3 have no real site and run as assisted. The record's truth
digest is the committed ground-truth.json's (the candidate record's was
stale); ground truth unchanged.

RESEARCH.md: the recorded numbers, the unexercised rules, the three
remaining blog misses and the importer-cap note. README table
regenerated (docs:packs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lucas Braum <lucasbraum@gmail.com>
@lucasbraum
lucasbraum merged commit 7c14ad0 into main Oct 16, 2026
28 checks passed
@lucasbraum
lucasbraum deleted the lucasbraum/upt-66-redis-wrapper-call-sites branch October 16, 2026 04:24
@uptide-release uptide-release Bot mentioned this pull request Oct 16, 2026
lucasbraum pushed a commit that referenced this pull request Oct 16, 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
## uptide@0.14.0

### Minor Changes

- [#160](#160)
[`2062939`](2062939)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - The typescript 5
to 6 and express 4 to 5 packs are now verified, so `check`, `list` and
`fix` use them by default. Both measure verified under the stricter gate
on unchanged ground truth: typescript across 7 public repositories
(1,399 real breaking sites, no breaking false positive; its
`downlevel-iteration`, `import-assertions` and `module-keyword` rewrites
stay assisted until a real site exercises them), express across 4 (86
real breaking sites, no breaking false positive).

### Patch Changes

- [#168](#168)
[`7c14ad0`](7c14ad0)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - The redis
(node-redis) 4 to 5 and 5 to 6 pack is verified: 5 public upgrades, 20
real breaking sites, breaking precision 100% and recall 83%; its four
rewrites no real site exercises (`keepAlive`, `quit`/`disconnect`, scan
iterators, `unstableResp3`) run as assisted. It now reports numeric SCAN
cursors in files that use the client through the repository's own module
(`getRedisClient` from `../config/redis`, `redisClient` from
`~/utils/redis.server`) without importing redis, including files the
compile scope left out under the importer memory cap, and treats
`scan(cursor)` after `let cursor = 0` as a numeric cursor. The resolver
behind it, shared with the zod pack's form-error rule, moves to
`check/importers.ts` as `packageImports`.

- [#160](#160)
[`2062939`](2062939)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide pack
test` counts a ground-truth site that a folded finding lists as its
evidence as covered by that finding, so recall reflects what `check`
reports. The typescript pack's breaking recall goes from 17% to 99% on
unchanged ground truth: its TypeScript 6 `types` default errors fold
into one tsconfig finding each.

Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant