Repository navigation
fix: clear the hidden lint backlog in 4 packages, then un-skip them (plan 302 phases 2–5) - #343
Conversation
|
Warning Review limit reached
Next review available in: 29 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughThe PR removes package-level ESLint targets, extracts helper functions in advisor lints, updates shard-scope handling, adds targeted ESLint suppressions, and corrects documentation formatting across advisor, auth, and vue packages. ChangesAdvisor lint and package cleanup
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for following the naming conventions! 🙏 |
|
Thank you for confirming the Contributor License Agreement! 🙏 |
… un-skip them Plan 302 phases 2-4. Each package's own `lint:eslint` now passes, so its nx-shaped `targets` block can go and vis actually runs the target instead of reporting a 13 ms green tick for it. - **container** — an `arrow-body-style` cleanup, `toEqual` → `toStrictEqual`, and a `vitest/valid-expect` suppression. That last one is a false positive worth naming: the assertion is stored deliberately so the fake timers can advance before it settles, and it IS awaited three lines down. `--fix` "corrects" it by inserting `await`, which deadlocks the test — the returned promise cannot settle until the timer advance that follows it. Reverted. - **auth** — `oneTapClient()`'s spread is genuinely unsafe: `LunoraAuthClientPlugin` is `ReturnType<typeof organizationClient>`, and better-auth types that as `any`, confirmed with a `const check: never = p` probe. Suppressed once at the array with that reason rather than hand-writing a plugin type that would drift. Plus a JSDoc indentation fix and four typed `vi.fn` mocks. - **vue** — three deliberate dev-only `console.warn`s (already gated on `NODE_ENV !== "production"`) annotated with the repo's existing `no-console -- reason` idiom, and four typed `vi.fn` mocks. No ESLint rule was disabled to reach green; every suppression is per-line with a stated, checked reason. Suites: container 139, auth 350, vue 95. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019WfuWNN3cWJE6beZjng347
…e package
Plan 302 phase 5. These were invisible twice over: the Markdown crash aborted
the run before it could report, and vis was reporting a 13 ms green tick for a
target it never executed.
Real fixes rather than suppressions where the code was actually wrong:
- **`filter-without-index`** — `{...}[shardKind as "global" | "root"]` cast away
the very case the comment above it documents. The cast made the `??` fallback
look dead to the type checker; `shardKind` can be an unrecognised tier *or*
`undefined` outright. Replaced with a typed `Record<string, string>` and an
explicit undefined check, so the fallback is reachable and provably needed.
- **`hot-shard`** — the `run` body did three jobs (filter, group, score).
Extracted `groupByShardGroup` and `hotShardsInGroup`; the lint is passed in
rather than closed over, so neither helper needs a forward reference.
- **`circular-fk`** — `circuit` repeated the same in-subgraph neighbour filter
in two loops. Extracted `subgraphNeighbors` and `blockOnNeighbors`.
- Three no-op `await`s on a synchronous `run()`, two alphabetical sorts given
comparators, and an in-place `.sort()` on a derived array made `toSorted`.
Suppressions, each per-line with a checked reason:
- `capped` in `circular-fk` is mutated inside a closure, so TS narrows it to its
initializer and calls the loop guard always-truthy. The guard IS the cycle cap.
- The namespace import in `lint-registration.test.ts` is the point of that test —
it asserts every exported lint is registered, so it must see the whole barrel.
- Three `no-secrets` hits on lint/function names quoted in prose, matching the
idiom already in `sql-store/src/ctx-db.ts`.
- `import/prefer-default-export`, matching the repo's no-default-exports rule.
advisor 458/458, `lint:types` clean, and `vis run lint:eslint` now takes 8.7 s
instead of reporting success in 13 ms.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019WfuWNN3cWJE6beZjng347
The `project.json` edits were written programmatically and the test file gained a long line, so both diverged from prettier. Caught locally this time rather than by the Lint job. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019WfuWNN3cWJE6beZjng347
553035f to
f282b24
Compare
✅ Deploy Preview for lunorash ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/advisor/src/lints/static/filter-without-index.ts`:
- Around line 74-78: Update the scopeByKind lookup in the filter-without-index
lint to be prototype-safe, using Map.get or an own-property check with proper
TypeScript typing. Ensure unrecognized shard kinds such as "toString",
"constructor", or "__proto__" resolve to the existing neutral fallback message.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 9644ee44-3206-4607-972f-a0338a54432e
⛔ Files ignored due to path filters (8)
packages/advisor/__tests__/auth-config-lints.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**packages/advisor/__tests__/lint-registration.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**packages/advisor/__tests__/runtime-lints.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**packages/advisor/__tests__/storage-key-from-user-args.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**packages/auth/__tests__/auth-client-plugins.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**packages/container/__tests__/lunora-container.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**packages/container/__tests__/workerd/container-smoke.workerd.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**packages/vue/__tests__/use-auth.test.tsis excluded by!**/__tests__/**,!**/*.test.tsand included bypackages/**
📒 Files selected for processing (19)
packages/advisor/project.jsonpackages/advisor/src/ae-metrics.tspackages/advisor/src/dedupe-cache-keys.tspackages/advisor/src/function-metrics.tspackages/advisor/src/index.tspackages/advisor/src/lints/runtime/hot-shard.tspackages/advisor/src/lints/static/circular-fk.tspackages/advisor/src/lints/static/filter-without-index.tspackages/advisor/src/lints/static/storage-key-from-user-args.tspackages/advisor/src/owner-field-writes.tspackages/advisor/src/queries.tspackages/advisor/src/storage-key-accesses.tspackages/auth/project.jsonpackages/auth/src/auth-client-plugins.tspackages/container/project.jsonpackages/vue/project.jsonpackages/vue/src/use-connection-status.tspackages/vue/src/use-presence.tspackages/vue/src/use-query.ts
Merging this PR will degrade performance by 28.8%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Review catch. Keying an object literal by `shardKind` exposes `Object.prototype`: a kind of `"toString"` / `"constructor"` / `"valueOf"` / `"__proto__"` resolves to an inherited member, which is truthy, so the `??` neutral fallback is skipped and a stringified function lands in the operator-facing detail text. A `Map` has no inherited keys, and it also drops the `shardKind === undefined` dance the object version needed. `shardKind` is declared as a union, so this guards a value that slipped past the declared type rather than a supported configuration — but the lookup costs nothing to make safe either way. Four cases pinned, demonstrated to fail against the object-literal version: each currently produced a detail string with neither "loads every row" nor the tier wording. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019WfuWNN3cWJE6beZjng347
* docs(plans): correct stale statuses in the index The Wave 13 table listed all 24 rows as TODO. 22 of them shipped on 2026-07-19 in the squash a2d60e5 (#146) — the file already contained the contradicting record in its own execution-status table 60 lines below, which is now what the rows point at. 160 stays deferred (five copies of voice-audio.ts are still live) and 162 is partial by design (its relay half was answered as a design doc). 143's Pkg column moves from do to shard-engine, where that code now lives. Plan 265 read BLOCKED - DO NOT MERGE. It is not blocked, it landed: ab0afaf (#338) shipped encodeDocJson/decodeDocJson without touching serialize-sql.ts or estimate-bytes.ts, so the review's findings are live defects on alpha rather than warnings about a branch. Two of them are restated as such, one is corrected (estimateBytes does not throw or charge the 32 MiB cap - transaction-headroom raises BAD_REQUEST, so a bigint insert fails loudly) and one is closed (the introspect item is a documented decision from plan 300). Plan 306 had no row anywhere in the file; it gets one. The remaining files list named 235 and 248, deleted by the same commit that wrote the list, and omitted five files that exist. Three wave preambles asserted none executed yet above tables of shipped rows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP * docs(plans): record the 302 outcome and the cold-tree trap Phases 2-5 had already shipped as a4c6522 (#343); the remaining work is on two branches whose merge order matters, because the phase-10 check fails on a stale allowlist entry as well as a missing one. Re-measured counts differ from the plan's, and the reason is worth carrying: a cold tree reports 455 eslint findings for svelte against 24 after build:packages, and 109 against 38 for db. The extra ones are no-unsafe-* cascades from a missing dependency dist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP * docs(plans): record the 265 remediation and its backfill The row now carries the design decision (project to a SQL-comparable scalar, park the exact original) and the reason the cheaper fix was rejected: a tagged array is still text to SQLite, so equality would have worked while ranges, ORDER BY and SUM stayed silently wrong. The backfill is the part that must not get lost. Rows written between ab0afaf and the fix hold the bigint tagged in place; patch and replace re-project on write, but a row nobody rewrites stays invisible to amount queries - completed payment sessions being the exact shape that is never touched again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP * docs(plans): mark the 265 remediation blocked by review Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Stacked on #340, which carries plan 302 phase 1. Retarget to
alphaonce #340 merges.Plan:
plans/302-vis-lint-gate-skips-ten-projects.md.Four of the eight packages whose lint was being reported as a green ✓ without ever running. Each commit fixes that package's own errors and deletes its nx-shaped
targetsblock in the same change, so the repo gate never goes red.containerauthvueadvisorRemaining for later phases:
svelte(24),db(40),ai(118),replica(303).Real fixes, not blanket suppressions
advisor/filter-without-index—{...}[shardKind as "global" | "root"]cast away the very case the comment above it documents. The cast made the??fallback look dead to the type checker, andshardKindcan be an unrecognised tier orundefinedoutright. Replaced with a typedRecord<string, string>plus an explicit undefined check.advisor/hot-shard— therunbody did three jobs (filter, group, score). ExtractedgroupByShardGroupandhotShardsInGroup, with the lint passed in so neither helper needs a forward reference.advisor/circular-fk—circuitrepeated the same in-subgraph neighbour filter across two loops; extractedsubgraphNeighborsandblockOnNeighbors.awaits on a synchronousrun(), two sorts given comparators, one in-place.sort()on a derived array madetoSorted.One thing worth flagging
In
container,--fixbreaks the test. Thevitest/valid-expectfinding there is a false positive: the assertion is stored deliberately so fake timers can advance before it settles, and it is awaited three lines down. Autofix insertsawait, which deadlocks — the promise cannot settle until the timer advance that follows it. Reverted and suppressed with that reason.Suppressions
Every one is per-line with a checked reason, and no ESLint rule was disabled to reach green:
cappedincircular-fkis mutated inside a closure, so TS narrows it to its initializer and calls the loop guard always-truthy — the guard is the cycle cap.lint-registration.test.tsis the point of that test: it asserts every exported lint is registered, so it must see the whole barrel.no-secretshits on lint/function names quoted in prose, matching the idiom already insql-store/src/ctx-db.ts.import/prefer-default-export, matching the repo's no-default-exports convention.@typescript-eslint/no-unsafe-assignmentinauth:LunoraAuthClientPluginisReturnType<typeof organizationClient>, and better-auth types that asany— confirmed with aconst check: never = pprobe. Not fixable locally without hand-writing a plugin type that would then drift.Each package verified with
vis run lint:eslint --query "project=<p>"— advisor now takes 8.7 s instead of reporting success in 13 ms.🤖 Generated with Claude Code
https://claude.ai/code/session_019WfuWNN3cWJE6beZjng347
Summary by CodeRabbit
Refactor
Documentation
Chores