fix(cli): omit render duration when feedback command has none#1797
Draft
miguel-heygen wants to merge 1 commit into
Draft
fix(cli): omit render duration when feedback command has none#1797miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
The standalone `feedback` command runs separately from `render`, so it has no access to the prior render's elapsed time, yet it always passed renderDurationMs: 0 to the feedback analytics event. Since that path is the one used in practice (the auto-prompt returns early for agent and non-interactive runtimes), nearly every feedback event recorded a render duration of exactly 0, which is misleading rather than absent. Make renderDurationMs optional and only include render_duration_ms in the event when a real value is supplied. The standalone command no longer passes a duration; the auto-prompt path still forwards the real elapsed time.
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.
Problem
The standalone
hyperframes feedbackcommand always passedrenderDurationMs: 0to the feedback analytics event. The command runs separately fromrender, so it has no access to the prior render's elapsed time. Because the auto-prompt path returns early for agent and non-interactive runtimes, the standalone command is the one used in practice, so nearly every feedback event recorded a render duration of exactly 0. A hardcoded 0 is misleading: it reads as a real measurement when the value is simply unknown. Absent data is more honest than a fake zero.Fix
Make
renderDurationMsoptional ontrackRenderFeedbackand only include therender_duration_msfield in the event when a real value is supplied. The standalone command no longer passes a duration, so the field is omitted; the auto-prompt path still forwards the real elapsed time after a render.Tests
Added unit coverage in
events.test.ts:render_duration_mspropertybunx vitest runfor the telemetry suite is green; oxfmt + oxlint clean; pre-commit fallow/typecheck/commitlint gates passed.