Skip to content

fix(server): two follow-ups for responsive waits (#35641) - #35735

Open
AdeyaDev wants to merge 924 commits into
pingdotgg:factory/pr-35622from
AdeyaDev:fix/pr-35641-follow-ups
Open

AdeyaDev wants to merge 924 commits into
pingdotgg:factory/pr-35622from
AdeyaDev:fix/pr-35641-follow-ups

Conversation

@AdeyaDev

Copy link
Copy Markdown
Contributor

Two follow-ups on top of #35641. Both were fixed on #35622 after the commit this branch started from; these are smaller versions written for your code. One commit each, so you can merge this PR or cherry-pick either one.

1. A steer to a parent can complete a remote delegated task early (05918e3, +9/−4 + test)
RemoteDelegation's background follower calls PeerForwarding.waitForThread with the parent's scope, so it also watches the parent's steering. Steps:

  1. A remote run finishes, but its delegated work is still running.
  2. The remote wait reports completed, timedOut: true.
  3. The user steers the parent.
  4. The follower's wait returns completed with timedOut: false forced on, so the task completes early with the wrong reply.

Fix: only the agent-facing t3_thread_wait yields to input (yieldToInput = false by default, true from call).

2. OpenCode: a foreground subagent started after an accepted steer keeps the steer waiting (a9c6af6, +16/−12 + test)
steerTurn checks for active foreground calls only once, when the steer is accepted. If the model is still generating and then starts a foreground subagent in the same step, session.background is never sent. The steer sits in the inbox for the child's whole run.

Fix: the inline call moves into releaseForeground, which is also called from session.tool.called when a pending steer meets a new foreground call. It's forked because events are handled under the session lock. It also gets the REQUEST_REPLY_TIMEOUT the other requests in the file use; this was the only request without one.

Tests: the existing steering test now runs five variants, including "child starts after steer" and "background fails". There's a new PeerForwarding test for the follower case. Without the fixes, all four new cases fail; with them, the PeerForwarding and OpenCode2 adapter tests pass (182/182), and check:changed passes. The branch includes a merge of your current head (55d338a); the only conflict was the /background request assertion from main.

The forwarded-wait test fixture now releases its blocked remote wait when the test ends, rather than Effect.never. Without that, the new test hangs on teardown.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 13, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 82c3b4a

Macroscope's review found this PR approvable — Separates task-follower waits from agent steering and releases OpenCode foreground observation when a pending steer meets a newly started subagent. The changes are narrowly scoped to responsiveness, with bounded background requests and existing access controls preserved.

You can add or adjust custom eligibility rules. Learn more.

juliusmarminge and others added 25 commits November 14, 2026 11:53
…ngdotgg#27716)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…tgg#26455)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dotgg#34314)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…dotgg#34196)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#36915)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…arting (pingdotgg#14424)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#36906)

Co-authored-by: Grok 4.7 <noreply@x.ai>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…everything until reload (pingdotgg#34537)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…pingdotgg#32260)

Co-authored-by: Lakshmi Tanmay <lakshmi@voltcrash.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…mmit (pingdotgg#34662)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#36887)

Co-authored-by: Grok 4.7 <noreply@x.ai>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
pingdotgg#36922)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
juliusmarminge and others added 25 commits November 15, 2026 04:50
…ngdotgg#30581)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…approve (pingdotgg#29692)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…in the foreground (pingdotgg#29782)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…d bound (pingdotgg#35937)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ice hub is off (pingdotgg#32542)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…otgg#36199)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…not the parent mode (pingdotgg#27334)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ning (pingdotgg#31548)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#29538)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ir install folder (pingdotgg#35840)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…es at that model's rate (pingdotgg#32219)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
pingdotgg#36616)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.1 Sol <codex@openai.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR changes the test suite by +1120 test cases (browser +103, unit +555, server +462).

New browser test files: apps/web/src/components/AppSidebarLayout.browser.test.tsx, apps/web/src/components/GitActionsControl.composition.browser.test.tsx, apps/web/src/components/RightPanelSheet.browser.test.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.browser.test.tsx, apps/web/src/components/chat/DraftHeroHeadline.browser.test.tsx, apps/web/src/components/chat/MarkdownCodeBlock.browser.test.tsx, apps/web/src/components/chat/McpAppFrame.browser.test.tsx, apps/web/src/components/chat/useComposerStash.browser.test.tsx, apps/web/src/components/chat/useDraftEnvironmentRouting.browser.test.tsx, apps/web/src/components/cloud/CloudEnvironmentConnectList.browser.test.tsx, apps/web/src/components/diffs/DiffFileTree.browser.test.tsx, apps/web/src/components/diffs/StyledDiffCodeView.browser.test.tsx, apps/web/src/components/preview/ThreadPreviewMiniPlayer.browser.test.tsx, apps/web/src/components/settings/AddUsageLimitSourceDialog.browser.test.tsx, apps/web/src/components/settings/IntegrationsSettings.browser.test.tsx, apps/web/src/components/settings/LinkedEnvironmentsSettings.browser.test.tsx, apps/web/src/themeCss.browser.test.ts.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

@github-actions github-actions Bot added the 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. label Nov 15, 2026
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

merged current main without rebasing and resolved the peer-wait conflicts, preserving main's 45-second limit and the distinction between agent waits and task-follower waits. updated the context budget to the measured 49,732 bytes.

verified b1fb6fa9f6bd0fb6465a3fd5b3cbf50a9df1639d: blacksmith vp run check:changed github/main passed format, lint, knip, graphql, affected typechecks, and 328 tests. the previously failing workspace-search and pr-cache tests also pass. both independent reviewers approved this head. all 34 check contexts pass or are intentionally skipped; github reports no conflicts and an approved review decision.

the test-delta report includes main's tests because this stacked pr still targets factory/pr-35622; the takeover added no unrelated tests. live opencode provider integration and paid model evals remain unverified.

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

📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.