Skip to content

fix(cef): raise STARTUP_GRACE_MS to 15s (real post-merge CI failure) - #401

Merged
qnbs merged 2 commits into
mainfrom
fix/cef-startup-grace-period-bump
Aug 19, 2026
Merged

fix(cef): raise STARTUP_GRACE_MS to 15s (real post-merge CI failure)#401
qnbs merged 2 commits into
mainfrom
fix/cef-startup-grace-period-bump

Conversation

@qnbs

@qnbsqnbs commented Aug 19, 2026

Copy link
Copy Markdown
Owner

User description

Summary

main's own post-merge CEF Learning Harness run (triggered by PR #400's merge) failed with the exact "Cycle 1: no FFI boundary proof" symptom this file's own comment already documents as a known runner-speed-variance pattern (STARTUP_GRACE_MS was raised 4000->10000ms for the same reason before, on unrelated code).

Real, measured evidence for a plausible contributing factor this time: PR #400's -g flag on worldscript_host (apps/desktop-cef/CMakeLists.txt) grew the binary from 1.34MB to 6.33MB (4.7x), comparing the last pre-#400 successful run's ls -la output to this failing run's. Cycles 2/3 in the same run always passed at the old 10s window — this only ever hits the cold first launch, consistent with slower first-time I/O on a larger binary under a loaded runner, not a logic regression.

Bumped STARTUP_GRACE_MS 10000 -> 15000ms. Cost is asymmetric: a successful launch resolves the Promise.race immediately and never waits the full window, so this only adds latency to the genuine-hang failure path, not the happy path.

Test plan

  • Re-ran the failed main job directly (gh run rerun --failed) as an independent data point while this fix was being prepared
  • CI on this PR — full 3-cycle proof + crash-reporting + symbolization proofs all pass
  • Watch the next few main pushes for recurrence

🤖 Generated with Claude Code

Summary by Sourcery

Increase the CEF startup grace period to 15 seconds to prevent cold-start timing variance from causing false CI failures.

Bug Fixes:

  • Reduce false CEF launch failures by allowing slower cold-start browser launches to complete before reporting missing FFI proof.

Enhancements:

  • Increase the shared CEF startup and crash-detection grace period from 10 to 15 seconds to better accommodate slower CI runners.

CodeAnt-AI Description

Prevent false CEF launch failures on slow cold starts

What Changed

  • The CEF launch proof now allows up to 15 seconds for the browser to start, up from 10 seconds
  • Slow first launches on loaded CI runners are less likely to be reported as missing FFI proof failures
  • Normal launches complete immediately without waiting for the full timeout

Impact

✅ Fewer false CI launch failures
✅ More reliable cold-start validation
✅ No added delay for successful launches

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

…ilure
main's own post-merge CEF Learning Harness run (triggered by PR #400's
merge) failed with the exact "Cycle 1: no FFI boundary proof" symptom
this file's own comment already documents as a known runner-speed-
variance pattern (STARTUP_GRACE_MS was raised 4000->10000ms for the
same reason before).
Real, measured evidence for a plausible contributing factor this time:
PR #400's -g flag on worldscript_host (apps/desktop-cef/CMakeLists.txt)
grew the binary from 1.34MB to 6.33MB (4.7x). Cycles 2/3 in the same run
always passed at the old 10s window — this only ever hits the cold
first launch, consistent with slower first-time I/O on a larger binary
under a loaded runner, not a logic regression.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@codeant-ai

codeant-aiBot commented Aug 19, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

StatusCommitStarted (UTC)Finished (UTC)
✅ Reviewed your PR637975eAug 19, 2026 · 13:0913:13

@sourcery-aisourcery-aiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @qnbs, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@codeant-ai

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@vercel

vercelBot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
worldscript-studioReadyReadyPreviewAug 19, 2026 1:43pm

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitaiBot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in:52 minutes

Limit details: You’ve used the included review currently available. Your 60 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32d7d503-952e-4d11-986f-471e2ac91860

📥 Commits

Reviewing files that changed from the base of the PR and between da2c914 and 1b3a933.

📒 Files selected for processing (1)
  • scripts/cef/run-launch-cycle-proof.mjs

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Increase the CEF startup grace timeout to reduce flaky CI failures on the first launch cycle, and document the rationale tied to recent binary size growth.

Sequence diagram for updated CEF startup grace timeout behavior

sequenceDiagram
participant CI_runner
participant run_launch_cycle_proof
participant cef_browser
CI_runner->>run_launch_cycle_proof: start_cycle
run_launch_cycle_proof->>cef_browser: launch_browser_process
run_launch_cycle_proof->>run_launch_cycle_proof: Promise.race(OnAfterCreated, STARTUP_GRACE_MS=15000)
alt OnAfterCreated before timeout
cef_browser-->>run_launch_cycle_proof: OnAfterCreated
run_launch_cycle_proof-->>CI_runner: record FFI_boundary_proof
else timeout before OnAfterCreated
run_launch_cycle_proof-->>CI_runner: report_cycle_no_FFI_boundary_proof
end
Loading

File-Level Changes

ChangeDetailsFiles
Increase CEF startup grace timeout and expand inline documentation about CI flakiness and binary size impact.
  • Raised STARTUP_GRACE_MS from 10000ms to 15000ms in the CEF launch-cycle proof script.
  • Added detailed comments explaining the recurring "Cycle 1: no FFI boundary proof" symptom and runner-speed variance.
  • Documented the impact of the -g flag on worldscript_host binary size and its relation to first-launch I/O latency in CI.
scripts/cef/run-launch-cycle-proof.mjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codeant-aicodeant-aiBot added the size:XS This PR changes 0-9 lines, ignoring generated files label Aug 19, 2026
@codeant-ai

codeant-aiBot commented Aug 19, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit:1b3a933f
Scan Time: 2026-08-19 13:43:07 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality GateStatusDetails
Secrets✅ PASSED0 secrets found
Duplicate Code✅ PASSED0.0% duplicated
SAST✅ PASSEDNo security issues
Bugs✅ PASSEDRating S: No bugs
IAC✅ PASSEDNo IAC issues

View Full Results

@amazon-q-developeramazon-q-developerBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR correctly addresses the post-merge CI failure by increasing STARTUP_GRACE_MS from 10s to 15s. The timeout adjustment is well-justified with measured evidence (4.7x binary size increase from PR #400's debug symbols) and properly documented. The change is minimal, focused, and introduces no defects.

The implementation is sound: the Promise.race pattern ensures successful launches resolve immediately without waiting the full timeout, so this only affects the genuine-hang failure path as intended. No blocking issues found.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

Comment threadscripts/cef/run-launch-cycle-proof.mjs Outdated
@codecov

codecovBot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

CodeAnt finding on PR #401, verified real: the comment claimed the
grace-period bump "only ever hits the cold first launch" (runCycle),
but STARTUP_GRACE_MS is a shared constant also used by
runCrashReportingProofCycle's own renderer-crash-detection timeout
(line ~278). The bump widens that proof's failure-detection window too
— harmless (strictly more lenient, same CI-runner-speed rationale
applies to both), but the comment understated the actual scope.
Updated to describe both consumers rather than splitting into a
dedicated timeout, since there's no evidence the two need to differ.
@qnbs
qnbs merged commit e52aea6 into mainAug 19, 2026
46 of 47 checks passed
@qnbs
qnbs deleted the fix/cef-startup-grace-period-bump branch August 19, 2026 14:49
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XSThis PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@qnbs