Skip to content

Base red: cap the hanging fake Chromium start's AsyncStream buffer - #34436

Closed
teamleaderleo wants to merge 2 commits into
feat-cmux-nextfrom
lane/perf-limit-fake-chromium-stream-cap
Closed

teamleaderleo wants to merge 2 commits into
feat-cmux-nextfrom
lane/perf-limit-fake-chromium-stream-cap

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Base red fix. #34250 added a hanging makePage to the test fake FakeChromiumHosting using AsyncStream<Void>.makeStream(). The concurrency gate refuses an unbounded AsyncStream buffer (FakeChromiumHosting.swift:44: unbounded AsyncStream buffer (give it a cap and an overflow policy)), so cmux-next fast gates and cmux-next checks have been red on feat-cmux-next since f3a4bab (base runs 41725135574 and 41727385244).

This gives the stream a one-element .bufferingNewest(1) buffer. Nothing ever yields to it: the stream only ends when the task is cancelled. So behavior is unchanged.

Observed / Not run

  • Observed: the gate's own rule regex no longer matches the line. python3 scripts/cmux-next/prepush-gate.py reports "no new violations".
  • Not run: the Swift test aScriptCallReturnsNilWhenTheChromiumStartNeverEnds. The change only adds a buffer policy to a stream that never receives an element.

Changelog

none

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the red cmux-next gates caused by the unbounded AsyncStream buffer introduced in #34250. The hanging fake Chromium start's stream now gets a one-element .bufferingNewest(1) buffer; since nothing ever yields to it, behavior is unchanged.

  • Observed: the gate's rule regex no longer matches the line, and prepush-gate.py reports no violations.
  • Not run: the Swift test for the hanging start; the change only adds a buffer policy to a stream that never receives an element.

Written for commit 3380e72. Summary will update on new commits.

View guided diff Turn on auto-fix

#34250's hanging makePage made an unbounded AsyncStream, which the concurrency
gate refuses (FakeChromiumHosting.swift:44), so base fast gates and cmux-next
checks went red. Nothing ever yields to it, so a one-element newest buffer
changes no behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-342ae944382c55b76f4c
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 3380e72: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr34436 -f ref=lane/perf-limit-fake-chromium-stream-cap -f platform=macos -f backend_mode=local

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026

@teamleaderleo teamleaderleo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review (claude-sonnet-5-5): SHIP at 77faa0b

Review (subagent claude-sonnet-5-5): SHIP at 77faa0b

Checked: the new call has an explicit policy, so none of the three alternatives of the "unbounded AsyncStream buffer" regex in scripts/cmux-next/check-concurrency.sh match (the makeStream branch only matches empty or of:-only parentheses). makeStream(of:bufferingPolicy:) has defaulted parameters, so AsyncStream.makeStream(bufferingPolicy: .bufferingNewest(1)) infers and compiles. Nothing yields, so the stream still never produces a value and the for-await loop ends only on cancellation, then CancellationError is thrown as before; the continuation stays alive via withExtendedLifetime.

Follow-ups: none

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 4, 2026 02:01 Inactive
@github-actions github-actions Bot added risk:low Risk tier (docs/ci/risk-tiers.md) and removed risk:normal Risk tier (docs/ci/risk-tiers.md) labels Nov 4, 2026
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 4, 2026 02:16 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Closing: #34430 (ceb35d2) landed the same bounded stream in FakeChromiumHosting.swift, and this branch's tree now matches base. The #34250 base red is fixed there.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 3380e729 Deployed Nov 4, 2026 by cmux-bot[bot] via wait for same-key tree publisher #108731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant