Skip to content

fix(engine): keep capture diagnostics on stderr - #5304

Open
user-github-me wants to merge 9 commits into
heygen-com:mainfrom
user-github-me:fix/engine-diagnostics-stderr
Open

user-github-me wants to merge 9 commits into
heygen-com:mainfrom
user-github-me:fix/engine-diagnostics-stderr

Conversation

@user-github-me

@user-github-me user-github-me commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread .oxlintrc.json
@mintlify

mintlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 5bd7d2d.

Approve preview

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in closeCaptureSession.
  • I merged this head onto current main and grepped the engine sources: no console.log is left outside tests, so the new no-console override for browserManager.ts, frameCapture.ts and parallelCoordinator.ts will 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 miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants