Repository navigation
fix(engine): keep capture diagnostics on stderr - #5304
user-github-me wants to merge 9 commits into
Conversation
jrusso1020
left a comment
There was a problem hiding this comment.
The direction is right and matches the producer logger, which already sends every level to stderr. I checked the two in-repo consumers of these lines (the CI page.goto complete budget step and de-gatecheck.sh), and both capture with 2>&1, so moving the lines does not break them. The problem is that the branch is 385 commits behind main, and main gained two new console.log(blur) calls in frameCapture.ts in #5991 (captureFrameToBuffer after the first frame, and closeCaptureSession). GitHub reports the PR as cleanly mergeable, so a merge keeps both calls. Then the new no-console override added here fails lint on main, and the motion-blur notice still lands on stdout ahead of the benchmark --json payload, which is the bug this PR is fixing. Please rebase onto main and switch those two calls to console.error too. Need: yes · Size: ok · Reuse: follows the producer logger's stderr contract · Simpler: already minimal.
— Rames
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
miguel-heygen
left a comment
There was a problem hiding this comment.
Reviewed at 5baa25a. Both points from the earlier change request are addressed:
- The two motion-blur reports that came in with #5991 now use
console.error, both after the first captured frame and incloseCaptureSession. - I merged this head onto current main and grepped the engine sources: no
console.logis left outside tests, so the newno-consoleoverride forbrowserManager.ts,frameCapture.tsandparallelCoordinator.tswill hold after merge.
I also rechecked the readers of these lines on current main. The CI page.goto budget step reads a log written with 2>&1, and de-gatecheck.sh redirects both streams, so moving everything to stderr does not hide anything they grep for. Nothing in the CLI or producer reassigns console.log or console.error, so no line changes visibility in a normal render. CI is green at this head and the branch merges cleanly.
Verdict: APPROVE
Reasoning: All engine diagnostics now go to stderr, including the newer motion-blur reports, the lint guard holds on the merged tree, and every in-repo consumer still sees the lines.
miguel-heygen
left a comment
There was a problem hiding this comment.
Re-reviewed at 5bd7d2d after the merge with main.
The change set is the same as the one approved at 5baa25a. The new commit re-applies the console.log to console.error switches in frameCapture.ts where the recent fast-capture change (#6318) reshaped the code, and every line it touches is that swap. Both motion-blur reports, after the first frame and in closeCaptureSession, still go to stderr.
I merged this head onto current main and grepped the engine sources again: no console.log or direct stdout write is left outside tests, so the no-console override for the three capture files holds, including the code that came in with #6318. CI is green at this head and the branch merges cleanly.
Thanks for keeping it current.
Verdict: APPROVE
Reasoning: The post-approval push only re-applies the same stderr switches onto main's reworked capture code, the merged tree has no stdout logging left in the engine, and CI is green.
Engine browser, capture and worker diagnostics go to stderr, keeping stdout available for the JSON report from
hyperframes benchmark --json. This includes capture-fallback diagnostics and the first-frame and session-close motion-blur reports. Diagnostic text, capture behavior, buffering and error classification are preserved.The existing no-console lint guard covers the three engine diagnostic emitters, and the engine reference documents the stream contract.
Validation: 295 tests pass across eight engine diagnostic, capture and risk-frame suites, with one existing Linux-only skip on macOS. The full workspace build, engine typecheck, lint/format, test reachability, normal commit hooks, both comment checks, Mint validation and broken-link checks pass.