Repository navigation
perf(lint): bound the package fallback type graph - #160281
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 1:11 PM ET / 17:11 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch adds a bounded TypeScript project for package files without a nearer project and a native lint test for project selection, ambient types, and diagnostic parity. Merge readiness✅ Ready for maintainer review Keep this PR open. Current main does not contain the package fallback project, and the earlier export-guard failure was repaired by the merged #160558. The remaining change is useful and has no actionable introduced defect identified in this review. Priority: P2 Review scores
Verification
How this fits togetherDeveloper and CI lint commands select package files for type-aware linting. The native linter finds a TypeScript project for each file and returns diagnostics; the size of that project also determines much of the lint memory use. flowchart LR
A[Developer or CI lint] --> B[Selected package files]
B --> C{Nearest project}
C -->|Leaf project| D[Existing package project]
C -->|Fallback| E[Package fallback project]
D --> F[Type-aware lint]
E --> F
F --> G[Diagnostics and memory use]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +192, Config +13. Total +205 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep package fallback lint bounded while preserving nearer package projects, selected files, and typed diagnostics. Do we have a high-confidence way to reproduce the issue? Yes. Current main includes package files in the broad core lint project but lacks a package fallback, and the PR records a matched 47,787-file baseline. This read-only review did not rerun lint. Is this the best way to solve the issue? Yes. The native linter already discovers nearest TypeScript projects, so a package-local fallback uses the existing selection contract; the added native test checks that nearer projects and diagnostics remain intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 46a227c51867. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
ed359f5 to
ba0f76d
Compare
|
@clawsweeper re-review Please review current head |
|
🦞👀 Re-review progress:
|
a01dab7 to
6c2e65f
Compare
ba0f76d to
80cf01a
Compare
5523bf8 to
c5a29b0
Compare
d81ecac to
4569f5a
Compare
|
@clawsweeper re-review Exact head |
|
🦞👀 Re-review progress:
|
4569f5a to
0e583a3
Compare
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
Use native nearest-project discovery to keep package fallback lint out of the repository-wide TypeScript graph while preserving package leaf precedence, ambient declarations and diagnostics. Measured package inventory shrinks from 47,787 to 15,002 files. Native package-containing stripe passes 4,429 files in 73.31 seconds at 5.93 GiB peak under a 7 GiB/no-swap cap. Native selector, ambient and diagnostic fixtures pass; exact-head review has no findings or remaining moves. Related: openclaw#160010
What Problem This Solves
Type-aware lint of package TypeScript files without a matching leaf project falls back to the repository-wide graph. A real package inventory loaded 47,787 files before lint could start and exceeded a 7 GiB cap.
Related: #160010
Result
A discoverable package fallback inherits the shared source ambient contract. Existing package projects retain precedence. It preserves the old root's exclusion of JavaScript and the test-only session compatibility augmentation, while retaining all standard libraries, local declarations and required module augmentations.
Only two package commits are included. The plugin graph prerequisite #160327 and unrelated CI guard repair #160558 are merged into this base. No CI planner, compiler limit, runtime or public API change.
Validation
Head:
0e583a334350ced3f2c32c25a254c9eddf47d5a8; base:f010fc0b579071d151e8f4e4084a40ac0b219057. Both changed file blobs and stable patch IDcb7c9293e060fb6b3fa42c5493b2fceaa12feb8fmatch the prior head4569f5a3804dbe878a5050f7ba37ff461ce6dd59. Fresh exact-head CI and ClawSweeper review are required before landing.Config +13/-0 supplies the missing package graph owner; tests +192/-0. Runtime production +0.