Repository navigation
Phase 1.1: fast discovery and explicit package analysis - #5
Merged
Merged
Conversation
7 tasks done
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
The old default
checkspent a minute compiling whichever dependencies it could reach. Discovery now has its own fast command:listreads manifests, lockfiles, source syntax and registry metadata only. It reports current → latest, major/minor/patch, tier, importing files, direct calls/new/JSX, top symbols and workspaces. Ordering is deterministic; minors/patches collapse unless--all; unused declarations have their own section;--jsonincludes every row and discovery failure.checkrequires package names and exits 2 with a pointer tolistwhen omitted. No--max-timeor implicit budgeted scan.--onlyremains a compatibility alias for explicit names;allis rejected. Tiers, generic evidence rules and partial results remain.planuses discovery plus optional--results check.json, without compilation or tarball downloads. Unchecked/partial packages have unknown effort. Saved evidence must match repository, versions and workspaces; peer metadata constrains the order. Rerun check after source edits.ANALYSIS_STACK_OVERFLOWper package. Reproduced pino on the PR Phase 1: generic mode, support tiers, uptide plan #3 baseline and opened pino analysis exceeds the recursion limit on Documenso #4; the underlying recursive extraction/diff remains an engine limitation, not a claimed fix.How it was verified
pnpm lint,pnpm typecheck,pnpm test: pass (core 586 passed / 15 network-gated skipped; CLI 180 passed).pnpm public:check: clean with the private denylist loaded only for that command.plan --resultson Umami reused the checks and produced the HTML plan in 1.3 seconds, with the expected peer blockers and no implicit deep analysis.Public-repository evaluation
Pinned to the same public revisions as PR #3:
npx [email protected] install --ignore-scripts --frozen-lockfileYARN_ENABLE_SCRIPTS=false corepack yarn install --immutable --mode=skip-buildnpx npm@11 ci --ignore-scriptsCheckouts and installations stayed in a scratch directory outside Uptide. Nothing from those repositories is committed. Outline was freshly reinstalled with
skip-buildafter discovering that Yarn'senableScripts=falsealone can still build the root workspace.Wall times below are local Node 22.20.0 runs on an 18 GB machine, with warmed registry metadata. Initial discovery measurements were also a few seconds (Outline 4.2 s, Documenso 3.5 s). JSON was captured and rendered through the same terminal formatters for the outputs below.
The memory-skip regression raised in review is fixed. Final named checks below all completed without memory skips. Measurements use
/usr/bin/time -lon macOS (peak RSS of the CLI process, including worker threads), Node 22.20.0, the same 18 GB machine, pinned checkouts and warmed caches. Commands ran sequentially; JSON was rendered with the default terminal formatter below. RSS varies with garbage collection and host pressure, so estimates reserve margin rather than claim an exact prediction.uptide list(original discovery run)uptide list(original discovery run)uptide list(original discovery run)uptide check mobx-react react-i18nextuptide check zoduptide check typescript @dicebear/coreuptide check mobx-reactExit 1 is the expected result when breaking findings are present. Outline reports the same four mobx-react errors as #3:
app/index.tsx:7(Provider import),app/hooks/useStores.ts:1andshared/hooks/useStores.ts:1(MobXProviderContext imports), plusshared/hooks/useStores.ts:5(TS2571). react-i18next still reports TS2589. The removed JSX binding atapp/index.tsx:7required compiling every importer root, even when API usage attribution found no use of that binding.Documenso analyzes zod across all eight importing workspaces, including the undeclared importer
apps/remix; none is memory-skipped. Umami keeps one TypeScript API cause with 112 sites, plus two separate type diagnostics and the DiceBear removed export. The default output below shows one cause row;--detailsexpands all 112 locations and messages. Partial-analysis reporting remains covered by the existing tests and never reports an incomplete package as clean.Estimate versus measured RSS
The preflight estimates heap, and scheduling reserves another 40% for native/young-generation overhead. Compare that total RSS reservation with measured peak process RSS, not the heap number alone. The calibrated formula is 512 MiB + 150× reachable source bytes + 24× reachable declaration bytes + 4.5 MiB per importer root; coefficients are heuristics, not a hard RSS guarantee. The final runs chose one worker, with a full single-worker heap allowance around 4,107 MiB inside a 5,750 MiB total reservation.
packages/trpc)Documenso's per-workspace heap estimates:
apps/remix2,718 MiB,packages/api537,packages/auth1,405,packages/ee787,packages/lib1,947,packages/prisma525,packages/trpc2,867 andpackages/ui569. Only reachable declarations count. During calibration, an earlier isolated mobx-react run peaked at 3,309 MiB and a serial zod run at 2,648 MiB; the final margins cover those observed variations too.Pino reproduction used the PR #3 core with
only: ['pino'], one workspace at a time and a 4096 MB heap: 134.8 s, ending inMaximum call stack size exceeded. See #4 for the public reproduction; recursion remains a clear per-package failure. This revision's requested Documenso rerun targets zod; it does not claim to fix pino's underlying recursion.Usage is syntactic: indirect aliases/reflection are not followed, and counts are repository-wide when a name has multiple installed versions. A package with no source import may still be required by scripts or configuration. Saved check JSON is explicit evidence from that source state; there is no implicit stale analysis cache.
umami: list
umami: check
outline: list
outline: check
documenso: list
documenso: check
Checklist
pnpm lint,pnpm typecheck,pnpm testpass