fix(telemetry): address CodeRabbit review from #1132#1145
Merged
Conversation
Follow-ups to the merged install -> boot -> canvas instrumentation (#1132); all side-channel-hardening, no behavior change to the funnel events: - canvasEntry: clamp server_ready_to_canvas_ms to >= 0 so a backward clock step can't emit a negative, funnel-polluting duration. - installer.withInstallPhase: isolate every onPhase tap in try/catch so a throwing telemetry callback can never abort or mask an install. - install.emitInstallPhase: guard classification/emission so side-channel metrics fail quietly (this is also the installer's onPhase tap). - useCloudCapacity.test: fix the loadComposable return type — it resolved to the composable function, not its call result.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
MaanilVerma
approved these changes
Jun 18, 2026
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.
Description
Follow-ups to the install → boot → canvas instrumentation merged in #1132. CodeRabbit posted four actionable comments after that PR was squash-merged, so they land here. All are side-channel hardening — no change to the funnel events themselves.
canvasEntry.ts— clampserver_ready_to_canvas_msto>= 0.Date.now()can move backward (clock skew), which would emit a negative, funnel-polluting duration.Math.max(0, …).installer.withInstallPhase— isolate theonPhasetap. The phase tap is documented side-channel-only, but a throwingonPhasecould abort or mask an install. Each invocation is now wrapped in try/catch (safeOnPhase).install.emitInstallPhase— guard classification/emission. Telemetry bucketing/emit is wrapped so a failure can't derail a post-install phase (this function is also the installer'sonPhasetap, so this guards both paths).useCloudCapacity.test.ts— fix theloadComposablereturn type.Awaited<ReturnType<typeof importComposable>>resolved to the composable function; the value assigned is its call result. NowReturnType<Awaited<ReturnType<typeof importComposable>>>, matching the innercomposabledeclaration.How has this been tested?
typecheck:node+typecheck:web— clean.vitest runoncanvasEntry.test.ts,bootPhaseBuffer.test.ts,useCloudCapacity.test.ts— 33 passing.Related
Follow-up to #1132 (merged). Resolves the four CodeRabbit threads on that PR.