Skip to content

Fix LLLeap teardown ordering in macOS integration-test exits#5989

Merged
akleshchev merged 1 commit into
andreyk/boost_process_experimentfrom
copilot/fix-llleap-tests-failure
Jul 11, 2026
Merged

Fix LLLeap teardown ordering in macOS integration-test exits#5989
akleshchev merged 1 commit into
andreyk/boost_process_experimentfrom
copilot/fix-llleap-tests-failure

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

The macOS build (macos-15-xlarge, Release) job was failing in INTEGRATION_TEST_llleap because LLProcess could publish child-exit state before all ready pipe callbacks had been delivered. That let LLLeap tear itself down while final stdout/stderr data was still pending.

  • Root cause

    • LLProcess::handleExit() drained at most 10 ready I/O handlers after process exit.
    • Large or bursty LLLeap traffic can leave more than 10 completions queued, especially near process shutdown.
    • LLLeap consumes child pipe events from those callbacks, so early exit notification could race ahead of final message delivery.
  • Change

    • Replace the fixed 10-iteration drain with a full poll_one() loop that runs until no ready handlers remain.
    • Keep exit notification ordering unchanged otherwise: drain ready pipe work first, then publish process status.
  • Effect

    • Ensures LLLeap sees all already-ready stdout/stderr callbacks before reacting to child termination.
    • Removes the shutdown race that caused the macOS llleap integration test failure.
while (mIOContext.poll_one() > 0)
{
    // Keep polling until no more handlers are immediately ready.
}

Related Issues

  • Please link to a relevant GitHub issue for additional context.
    • Bug Fix: Link to an issue that includes reproduction steps and testing guidance.
    • Feature/Enhancement: Link to an issue with a write-up, rationale, and requirements.

Issue Link: relates to GitHub Actions run 29146919898 / job 86532647071


Checklist

Please ensure the following before requesting review:

  • I have provided a clear title and detailed description for this pull request.
  • If useful, I have included media such as screenshots and video to show off my changes.
  • The PR is linked to a relevant issue with sufficient context.
  • I have tested the changes locally and verified they work as intended.
  • All new and existing tests pass.
  • Code follows the project's style guidelines.
  • Documentation has been updated if needed.
  • Any dependent changes have been merged and published in downstream modules
  • I have reviewed the contributing guidelines.

Additional Notes

The change is intentionally narrow: it only adjusts post-exit pipe draining in LLProcess and does not alter process-status semantics outside that ordering fix.

Copilot AI changed the title Fix macOS llleap integration test exit handling Fix LLLeap teardown ordering in macOS integration-test exits Jul 11, 2026
Copilot AI requested a review from akleshchev July 11, 2026 12:53
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@akleshchev akleshchev marked this pull request as ready for review July 11, 2026 13:42
@akleshchev akleshchev merged commit e276f54 into andreyk/boost_process_experiment Jul 11, 2026
5 of 8 checks passed
@akleshchev akleshchev deleted the copilot/fix-llleap-tests-failure branch July 11, 2026 13:42
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants