Repository navigation
fix(hygiene): workspace overrides, NUL/LogSink cleanup, payment gating, class-export, studio (Wave 15: 189,191) - #200
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (41)
📒 Files selected for processing (11)
WalkthroughThe changes refine payment table detection, generated observability types, worker export analysis, checkpoint cleanup, identity cache keys, Studio interaction states, Instruments error handling, and API snapshot coverage. ChangesCode generation and payment feature detection
Worker export detection
Checkpoint registry teardown
Identity memoization keys
Studio feature and interaction handling
API snapshot coverage
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: ✨ Finishing Touches📝 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 confirming the Contributor License Agreement! 🙏 |
|
Thank you for following the naming conventions! 🙏 |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
✅ Deploy Preview for lunorash ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Merging this PR will degrade performance by 6.1%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | in-batch: single IN(...) query + id->doc re-projection |
795.1 µs | 946.8 µs | -16.02% |
| ❌ | count, no attributes |
57.6 µs | 64.7 µs | -10.96% |
| ⚡ | baseline (Object.keys + toInternal + path spread per field) |
71.9 µs | 64.9 µs | +10.72% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing advisor/wave15-hygiene (8e858ba) with alpha (0eab929)2
Footnotes
-
2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
alpha(8988d6c) during the generation of this report, so 0eab929 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
…urce Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… trees Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Payments studio page gated on the bare table names `subscriptions` + `events` — two of the most generic names in existence. A newsletter `subscriptions` table plus a domain `events` table spuriously showed the page. Match the @lunora/payment store by its signature columns (providerSubscriptionId/state, providerEventId/processedAt) instead of names. A real payment app mirrors the canonical columns, so this stays back-compatible with older schemas while dropping the false positive. The studio panel now consumes the codegen `payments` flag (useStudioFeatures) alongside its runtime table-presence read guard, rather than a single hardcoded table name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
isTypeOnlyClassExport ran three unanchored/unescaped whole-file regexes, so a
separate `export type { Foo }` anywhere in the worker entry suppressed a real
value export of `Foo` — the binding was reported unexported and `wrangler
deploy` failed on a missing `class_name`.
es-module-lexer already omits `export type Foo` and the separate
`export type { Foo }` from its export list; the only type-only shape it still
lists is the inline `export { type Foo }`, now dropped per export entry via the
local-name position. The whole-file regex survives only in the unparseable-file
catch fallback, with the class name escaped and the `u` flag added.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Instruments panel returned null on any getMetricSeries error, so a stale admin token or permission failure was indistinguishable from "no custom metrics" — the whole section just vanished. Render a one-line muted notice on error while keeping silent-on-empty for a genuinely uninstrumented app. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A single `busyHash` / `actionError` made overlapping triage writes last-writer- wins: the first write's completion cleared the second's busy flag (re-enabling a row mid-flight) and one row's error overwrote another's. Key both off the issue hash — a `ReadonlySet<string>` of busy hashes and a `ReadonlyMap<string,string>` of per-row errors, mutated immutably — so each row disables and surfaces errors independently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
releaseShardCheckpoints dropped a registry after resolving it to Infinity, which happened to disarm the armed fallback timers as a side effect of resolve's disarmUpTo. Make the teardown explicit and robust: a dispose() that clearTimeouts every armed entry and empties the set, called from releaseShardCheckpoints after settling parked waiters — so a discarded registry (Vite HMR dispose, sign-out) can never keep a Node/SSR event loop alive through a pending timer's closure, independent of resolve's behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The cross-request identity cache keyed only on Cookie+Authorization, so a resolveIdentity that authenticates off another attribute (X-API-Key, request origin, an Access JWT header) with colliding standard headers across principals could be served the WRONG identity. Add an optional cacheKey(request) override so such a resolver supplies a key covering exactly what it reads, and document the default key's contract explicitly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A worker predating the getMetricSeries RPC answers FUNCTION_NOT_FOUND, which the new error notice surfaced as a false 'Instruments unavailable' banner — the sibling getMetricHistory read deliberately swallows that pre-feature case. Filter the code so the pre-feature case renders nothing (same as an uninstrumented app) and only genuine failures (stale token / permission) show the notice. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
codegen's discover-feature-usage hardcodes the payment store discriminator columns (providerSubscriptionId/state on subscriptions, providerEventId/ processedAt on events) with nothing binding them to the real schema. Add a drift guard over packages/payment/src/schema.ts so a rename fails loudly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The two type-only-export detectors had similar names hiding a primary-vs-fallback split. Rename to isTypeOnlyExportEntry (primary, per-entry, lexer-based) and isTypeOnlyExport_regexFallback (whole-file regex, unparseable-file path only), and note the es-module-lexer offset coupling at the primary callsite. No logic change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Regenerate 7 examples' _generated/* through real codegen so they match the emitter byte-for-byte, replacing the hand-swapped LogSink->TelemetrySink edit (which put TelemetrySink at the old position 4 instead of its alphabetical slot). This also pulls in the pre-existing emitter drift the examples hadn't picked up: asId typing, AppTableName, AppBuilder<Env extends object>, and the observability wiring (ctx.span, instrumented db/fetch). notify-demo is intentionally excluded: its regen surfaces a pre-existing emitter type bug (see report). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5521495 to
8e858ba
Compare
|
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. |
Wave 15 — repo wiring hygiene + small correctness fixes (plans 189, 191)
Two low-risk clusters with disjoint files (clean merge).
189 — monorepo wiring hygiene (HLTH-01/02/04/06/08/10, OBS-06)
@lunora/notify+@lunora/replicaadded to theoverridesblock → resolve from workspace source (link:), not the npm registry tarball (Studio was type-checking against a stale published@lunora/notify).packages/runtime/src/memoize-identity.ts— literal NUL byte (made the new public auth-adjacent module a binary blob, invisible togit diff/review) replaced with `` (byte-identical at runtime).@deprecatedLogSinkinto generated_generated/shard.ts—emit.ts+ golden fixture + a token-only swap of the 8 example trees (the full example regen, which sweeps unrelated pre-existing emitter drift, is deliberately deferred to a dedicated chore commit).@lunora/notifyadded to the api-snapshotTIER_2(+notify.api.md); AGENTS.md gains a notify row and corrects the@lunora/ai"AI SDK v6" → "v7".191 — small correctness (SURF-10/11/12/13, CLI-11)
providerSubscriptionId+state,providerEventId+processedAt), not the generic table namessubscriptions/events(removed a false positive for newsletter/domain-event apps).isTypeOnlyClassExportin@lunora/config— per-entry type detection + escaped/anchored regex fallback (a value class export no longer suppressed by a coexistingexport type { … }, which had madewrangler deployfail on a missingclass_name).null, indistinguishable from "no metrics"); Issues triage tracks busy state per row (Set + per-row error Map) instead of a global flag.@lunora/dbCheckpointRegistry.dispose()clears armed fallback timers explicitly on teardown (verified there was no actual leak —resolve(∞)already disarmed — so this is robustness/clarity; api-snapshot refreshed for the new method).Verification (on the merged branch)
Full 48-package
build:packagessucceeds; relocked (notify/replica→link:);tscclean; tests: codegen 881, config 462, studio 803, db 74;api:checkmatches all 39 snapshots.Generated by the
/improveadvisor workflow (isolated-worktree Opus executors → tech-lead review). Plan text onimprove/alpha-auditunderplans/189-*,plans/191-*.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes