Skip to content

test: trim low-value UI and subagent test scaffolding - #198960

Merged
vincentkoc merged 1 commit into
mainfrom
test/recut-coverage-198797-198798-b-20261114
Nov 23, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test/recut-coverage-198797-198798-b-20261114

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The original broad deletion removed useful UI and subagent guards alongside low-value checks. This rebuild keeps those guards and trims presentation assertions, request-coalescing instrumentation, and optional screenshot/video scaffolding.

Related: #198737.

User Impact

No production behavior changes. Six existing test suites are trimmed in place; this is 427 net test lines removed (+7/-434), with zero production or inventory changes. Deliberately removed pixel/layout and ordinary display assertions have no claimed replacement oracle.

Why This Change Was Made

Rebuilt from current main fe34585478fd990308a576e7f1a0a49aa935272f, preserving main's new coverage and restoring the original PR's blanket deletions. The maintainer-approved bar is value, not uniqueness: keep authorization, stale-input, privacy, data-loss, lifecycle and meaningful user-visible regression guards; remove low-value presentation/instrumentation or duplicated journeys.

Per-file evidence manifest

File Verdict Removed Exact keeper / retained behavior
src/agents/subagents/registry/subagent-control.worker.test.ts TRIM Progress-title and short-reference formatting rows (28 lines). Same suite: settles the progress card once after %s, committed/rejected stop cases, uninterruptible child, replacement execution, requester re-yield; real persistence, private-result exclusion, and exactly-once retirement remain.
ui/src/components/sidebar-attention-store.test.ts TRIM Burst coalescing/request-count table (29 lines). Same suite: restart/suspension recovery, automatic failed-inventory retry, account/reconnect/tenant isolation, eager retirement, scoped dismissals, complete-inventory-only pruning, late publication and offline draft preservation remain.
ui/src/pages/chat/tool-stream.node.test.ts TRIM Live edit-count projection case (22 lines). Same suite: renders a deferred tool update when its projection flushes, final-result publication, replay fencing, sticky early/out-of-order denials beyond the cap, terminal and sibling-run isolation remain.
ui/src/pages/chat/components/chat-message.test.tsx TRIM Ordinary usage/date/token-order/gutter/avatar presentation cases and unused binding (136 lines). Same suite: actionable delivery matrix including second-click discard, conflict escaping, participant and qualified sender provenance, sanitized notices, Guardian correlation, and persisted-reply readiness remain.
ui/src/e2e/model-providers.e2e.test.ts TRIM Optional screenshot/video/observation plumbing and pixel-only layout assertions (+6/-137). Same seven browser scenarios: credential-only readiness, read-only writes, renewable OAuth alias state, no-model probe, selected-agent typed key writes, held save, all three utility wire shapes and reload, failed-save/reconnect/authority loss remain.
ui/src/e2e/session-management.archive.e2e.test.ts TRIM Optional proof/video plumbing and duplicated paged-delete journey (+1/-82). ui/src/pages/sessions/sessions-page.archived.test.ts: enumerates beyond a deep link and recovers moved rows without double deletion plus incomplete-enumeration refusal. Same E2E suite retains held Undo/banner/draft custody, failed-write retry, route/title stability, stale roster and remote deletion, and expected physical session-ID fencing.

The terminal restoration suite and all other former deletion candidates match pinned main. No new test/support files were added.

Evidence

Exact candidate: 1d2f01ed97e741a710934b6783874671dc1c4cd6.

  • Qualified frozen-lockfile install in a managed task worktree.
  • Full native scoped run completed: 166 tests passed across 9 files, including both E2E suites, the archived-enumeration keeper, toast and attachment browser tests (25 agent, 102 UI, 5 keeper, 18 toast/attachment, 16 E2E).
  • All five relevant canonical type graphs passed: agents-sessions, ui-other, ui-chat, ui-components, ui-e2e.
  • All six touched files pass native oxlint, formatting and git diff --check.
  • Independent source review found no guard-loss blocker; the two main-owned browser fixtures are preserved byte-for-byte.
  • Complete structured P2 review passed on this exact signed head: all five complete owner/routing passes completed with zero actionable findings, and final source fingerprint verification passed.
  • Exact-head CI and ClawSweeper review passed on 1d2f01ed: all three UI shards, UI E2E, required CI gate, and applicable security/dependency gates succeeded. ClawSweeper reported no findings or remaining before-merge actions (review). The raw rollup includes one cancelled dispatch; no required failing check remains.

Main convergence and conflict resolution

Main independently fixed both prior failing browser fixtures in #204004. This rebase drops the overlapping toast and attachment commits and keeps both files byte-exact main. The attachment keeper includes the production composer stylesheet, waits for the initial pixel height, grows real menu content through the layout owner, and retains the running-at-pointerdown, close-before-input, input identity and draft assertions. Both fixtures are included in the final nine-file scoped validation.

The final candidate changes only the six trim suites in the table; no browser-fixture repair remains in its diff. Fresh exact-head CI and ClawSweeper review are complete as recorded above.

@vincentkoc vincentkoc self-assigned this Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: whatsapp-web Channel integration: whatsapp-web app: macos App: macos app: web-ui App: web-ui cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: codex plugin: workboard size: XL labels Nov 14, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 14, 2026 15:28
@vincentkoc
vincentkoc marked this pull request as draft November 14, 2026 15:42
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR trims presentation assertions, request-count instrumentation, and optional capture scaffolding while retaining behavioral regression coverage.

Example: Archive a conversation containing the draft “Keep this unsent draft,” then select Undo.

  • Before: The browser test checks draft restoration and optionally captures screenshots and video.
  • After: The same draft-restoration checks remain without the optional capture plumbing.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, justified test maintenance with retained behavioral coverage and reported scoped validation; broad exact-head CI remains pending.
Proof confidence 🐚 platinum hermit (4/6) This test-only cleanup requires no shipped-entry-point demonstration; inspected historical UI screenshots do not establish current-head validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated test instrumentation and optional capture plumbing add maintenance work.
Reason: The maintainer-authored direction accepts these presentation and instrumentation removals, while the rebuilt diff preserves the previously identified guard families.

Merge readiness

✅ Ready for maintainer review

This PR is a useful, focused test cleanup with no actionable findings; the previous conflict is resolved, and exact-head CI is still pending.

Priority: P3
Reviewed head: 1d2f01ed97e741a710934b6783874671dc1c4cd6

Before merge

None.

Findings

None.

Agent review details

How this fits together

The affected tests feed synthetic Gateway responses and agent events into existing UI and subagent owners, then check rendering, mutations, recovery, and settlement.

flowchart LR
  A[Synthetic Gateway responses] --> B[Control UI owners]
  C[Agent lifecycle events] --> D[Subagent registry]
  B --> E[Retained behavioral assertions]
  D --> E
  E --> F[Scoped tests and CI]
Loading

Technical review

Best possible solution:

Land the focused test trims once the existing exact-head CI gate passes.

Do we have a high-confidence way to reproduce the issue?

This is test maintenance rather than a product bug; the read-only review inspected source and supplied validation without executing tests.

Is this the best way to solve the issue?

The in-place trims satisfy the accepted value rubric without adding machinery, and meaningful lifecycle, authority, recovery, and deletion coverage remains in existing owners.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against fe34585478fd.

Provenance checked

  • Subagent progress presentation changes intended behavior with a stated reason (14abc23: Protect UTF-16-safe progress titles; later short-reference assertions came from e6ac403.)
  • Sidebar burst instrumentation changes intended behavior with a stated reason (7297799: Keep Inbox inventory current during automation bursts; the PR deliberately removes the request-count matrix while retaining recovery and isolation checks.)
  • Browser capture scaffolding keeps the original intent (e8ffa35: Prevent proof artifacts from overwriting earlier captures; this PR removes optional capture callers rather than restoring shared artifact paths.)
  • Provider layout assertions changes intended behavior with a stated reason (37a5c5b: Guard provider-header alignment and responsive geometry, now explicitly accepted as low-value coverage for this cleanup.)
  • Paged archived deletion keeps the original intent (ad409a8: Prevent missing or duplicate deletion after roster reordering; the existing archived-page keeper retains enumeration and deletion-target checks.)
  • Chat presentation cases changes intended behavior with a stated reason (a5da50d: Earlier consolidation retained usage/date presentation checks; other removed cases guarded token ordering, gutter rendering, and avatar fallback.)
  • Live edit-count projection changes intended behavior with a stated reason (45e4c83: Guard live diff-count projection and final-result replacement, explicitly removed as display coverage while publication and replay guards remain.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0074005 adds ui/src/e2e/model-providers.e2e.test.ts:50 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 007400568221; files: ui/src/e2e/model-providers.e2e.test.ts)
  • Ayaan Zaidi: Raw commit 08a2623 adds ui/src/e2e/model-providers.e2e.test.ts:267 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 08a26231f426; files: ui/src/e2e/model-providers.e2e.test.ts)
  • Vincent Koc: Raw commit e473598 adds ui/src/e2e/model-providers.e2e.test.ts:123 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e473598c2cdf; files: ui/src/e2e/model-providers.e2e.test.ts)

PR surface

Tests -427. Total -427 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 7 434 -427
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 7 434 -427

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: Internal test maintenance changes no production behavior or public contract.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (7 earlier review cycles)
  • reviewed 2026-11-14T15:45:37.434Z sha dbb8807 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-16T16:24:11.628Z sha f28a714 :: needs changes before merge. :: [P2] [P2] Preserve the browser input failure regressions | [P2] [P2] Retain SQLite-backed bounded projection replay coverage | [P2] [P2] Keep executable coverage of Slack session event handlers | [P2] [P2] Retain Codex permission-request approval coverage | [P2] [P2] Preserve real-trust cold-dashboard renewal regressions
  • reviewed 2026-11-16T16:36:50.420Z sha ba866a4 :: needs changes before merge. :: [P2] Retain native approval-queue ownership coverage | [P2] Preserve browser-cookie navigation admission tests | [P2] Keep Discord account-startup failure coverage | [P2] Retain active voice-replacement recovery tests | [P2] Preserve Teams authorization checks after account reload | [P2] Retain Slack durable-delivery admission coverage
  • reviewed 2026-11-16T16:50:10.469Z sha d3fadfa :: needs changes before merge. :: [P2] Retain progress-draft lifecycle coverage | [P2] Preserve Inbox account and tenant isolation regressions | [P2] Keep interrupted multi-terminal restoration coverage | [P2] Retain browser coverage of provider-header layout | [P2] Preserve selected-conversation archive presentation coverage | [P2] Keep the pending-message discard double-click regression
  • reviewed 2026-11-23T08:38:30.413Z sha 50952b8 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-23T09:14:08.355Z sha 644a7b8 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-23T10:06:50.152Z sha b95c6e8 :: needs changes before merge. :: none

Reviewed November 23, 2026, 5:20 AM ET / 10:20 UTC (Revision 8).

@vincentkoc
vincentkoc marked this pull request as ready for review November 14, 2026 22:52
@vincentkoc
vincentkoc force-pushed the test/recut-coverage-198797-198798-b-20261114 branch from e61c177 to f28a714 Compare November 16, 2026 16:15
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head f28a714f1e3ba5590bf179f9b0f1210a95e19b1e, rebased onto selected main with exact-main keeper restorations and scoped test inventories. Fresh CI pending.

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 16, 2026
@vincentkoc
vincentkoc marked this pull request as draft November 16, 2026 16:25
@vincentkoc vincentkoc changed the title test: consolidate redundant coverage (198797/198798, mixed part) test: trim low-value UI and subagent test scaffolding Nov 23, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 23, 2026 08:32
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 50952b8004c50b1ea7084983549273508241c3cf. This replaces the old broad deletion with six in-place test trims, retaining the seven previously named guard families. The PR body contains the per-file evidence table; 148 scoped tests, relevant type graphs, lint, formatting, and the complete four-pass P2 review passed. The maintainer-approved value rubric deliberately permits removing ordinary presentation/count assertions and optional proof/video scaffolding.

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 23, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 644a7b8af9abd37e2df39532185af03c3dc2bf40. The one-line test-only repair aligns the toast occlusion expectation with the current live string contract, retaining its exact single-notification and cutout/action/cleanup assertions. The inherited mismatch reproduced on both the previous head and main; no production change was made. All prior trim guards remain intact.

The complete final scope passed 166 tests across 9 files, all 5 relevant type graphs, oxlint and formatting. The fresh complete 7-pass P2 review is clean. The body contains the per-file evidence and accurately records the separate, still-unclassified prior attachment timing failure. Net removal remains 427 test lines.

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head b95c6e81f602ead1cbfb9b1037de9ac83b200150. The attachment handoff fixture now drives the real menu content/layout owner and checks the same native height transition at pointerdown; the existing duration, close-before-input, retained input and draft assertions stay intact. All 166 scoped tests across 9 files, five type graphs, lint/format, and the complete seven-pass P2 review pass. The PR body carries the per-file keeper evidence and CI causality limits.

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 23, 2026
@vincentkoc
vincentkoc force-pushed the test/recut-coverage-198797-198798-b-20261114 branch from b95c6e8 to 1d2f01e Compare November 23, 2026 10:15
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 1d2f01ed97e741a710934b6783874671dc1c4cd6, rebased onto main fe34585478fd990308a576e7f1a0a49aa935272f. Both browser-fixture repairs from #204004 are preserved byte-for-byte; our overlapping repair commits were dropped. The diff now contains only six trim suites, 427 net test lines removed. All 166 scoped tests across 9 files, five type graphs, lint/format, and the complete five-assignment P2 review pass. The body contains the current keeper manifest and conflict-resolution evidence.

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 23, 2026
@vincentkoc
vincentkoc merged commit 2408b27 into main Nov 23, 2026
127 of 128 checks passed
@vincentkoc
vincentkoc deleted the test/recut-coverage-198797-198798-b-20261114 branch November 23, 2026 10:32
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
…203176)

## Problem

A requester that calls `sessions_yield` after spawning several completion-mode subagents was woken only when every member of the frozen yield batch was ready. A sibling that keeps running, or that pauses on its own `sessions_yield` while a background command runs, held every finished result back.

Production incident (2026-11-21): a dashboard parent spawned 3 children and yielded at 16:20 IST. Two children finished at 16:26:58 and 16:29:41 with reports that needed a decision. The third kept cycling through exec-yield and resume. The Gateway log has no `announce:requester-settle:…` run for that parent. The parent ran again only at 18:32, when the user typed into the chat. A copy of the state database shows why: both finished rows were `terminal`/`ok` with `delivery.status: pending` and a pending `requesterSettleWake` (`batchRunIds` = all 3, `rearmGeneration: 1`). The third row was still `running`. The gate in `subagent-announce.requester-settle-wake.ts` returned `false` unless every frozen member passed `isRequesterSettleMemberReady`. #200967 had already made an exception for siblings that wait for a message. An exec-yielded or running sibling is the same bug class.

## Change

Rule: every ready result wakes the yielded parent. Siblings that are still working keep their wake, with the same `rearmGeneration`, and wake the parent again when they finish. Each result is delivered once.

- **Settle wake:** removed the all-or-nothing gate and the message-wait exception (`isEndedSubagentMessageWait` is deleted). The wake delivers the ready members of the frozen batch as one partition, and lists the members that are still working. A member whose partition has already started dispatch records its own batch, so a later partition never offers it again. When a partition holds only results that were already delivered and siblings are still pending, it settles without a redundant wake.
- **Wake message:** a partition that leaves members pending no longer says "every subagent has settled… do not call sessions_yield again". It names the siblings that are still working (label, task name or run ID, at most 5, each truncated) and tells the parent: if the request needs those results, call `sessions_yield` to wait; otherwise act on the ready results without reporting the batch as finished.
- **Lifecycle failure path:** `offeredBatch` now offers only ready members, so failure settlement can never consume the wake of a sibling that is still running or exec-yielded.
- **Yield transfer:** when a child ended before the yield and a sibling is still running, `afterRelease` now schedules the settle for the finished child. Before, nothing woke the parent until the sibling ended.
- **Followup owners** (`sessions_send` wait-for-reply, `agent-step`, nested `agent-run-subagent`): the caller is waiting for a single reply. Only the partition that leaves no member pending continues the followup. Earlier partitions wake the session as ordinary settle turns. `successor()` accepts that last partition as a subset of its cohort, so it no longer throws and records the result as a permanent failure.
- **Automation authority:** a yield that carried cron-management authority keeps it for the partition that leaves no member pending. Earlier partitions run without borrowing it, and settling them shrinks the retained cohort instead of discarding the authority.
- **Silent waits:** while siblings are still working, the parent may stay silent (`NO_REPLY`) and wait. Such a turn is not treated as a missing visible reply, so it is not retried.
- **Goal return:** an earlier partition leaves the Goal cohort when it settles. The partition that settles the cohort last resumes the Goal once.
- `isRequesterSettleMemberReady` moved to `subagent-run-liveness.ts`, its only owner, and replaces the deleted message-wait predicate.
- Docs: `tools/subagents/announce.md` and `concepts/subagent-yield-handoff.md`.

Product decisions, under the rules "no stranded user" and "no false done":
- A stopped child is a settled outcome, so its report now wakes the parent right away instead of waiting for its siblings.
- A followup caller gets one reply, after all results are in. The session itself is still woken for each result.

## Evidence

**Regression test** (`subagent-registry.requester-wake.e2e.test.ts`, real registry, lifecycle, yield tool and wake entry point): spawn 2 children, yield, finish one, keep the other exec-yielded. The parent is woken with the finished result, and the wake names the working sibling. The sibling's continuation then wakes the parent again with only its own result. A sweep adds no third wake. A second case covers a child that ended before the yield, while the requester's turn held it.
- Base `eb7ca3d33375`: both cases red (`expected [] to have a length of 1`: no wake).
- Head: both cases green.

**Owner tests:** cron authority (`requester-cron-authority.test.ts`: the early partition neither borrows nor consumes the authority, and the last partition is admitted with it), followup partition (`subagent-announce.requester-settle-followup.test.ts`: early partition runs with no followup successor, last partition carries it). Goal partition (`goal-continuation.test.ts`: early partition does not resume the Goal, last partition resumes it once).

**Updated tests that asserted the all-at-once rule:** `requester-settle-cross-turn` (paused member), `subagent-control.worker` progress card (one wake per result; the card retires once), `requester-wake-settlement` (stopped child).

**Real-Gateway E2E**, incident shape. Scratch `ocx src` Gateway under `env -i`, OpenAI `gpt-5.5` on the OpenClaw runtime. Parent spawns `alpha` (replies at once) and `beta` (`exec` with `background: true` running `sleep 90`, then `sessions_yield`), then yields.

| | alpha ended | first parent wake | beta yielded | beta ended | second parent wake |
|---|---|---|---|---|---|
| base | 19:47:10 | **19:48:53** (one combined run, after beta) | 19:47:13 | 19:48:50 | none |
| head | 19:40:08 | **19:40:11** (`announce:requester-settle:…:<alpha>:yield-1`) | 19:40:12 | 19:41:55 | 19:41:59 (`…:<beta>:yield-1`) |

The parent's replies on head were `alpha: ALPHA-RESULT-7`, then `alpha: ALPHA-RESULT-7 / beta: BETA-RESULT-9`. The live Peanutto launchd pid and `openclaw.json` hash did not change.

**Live sibling suites** (`subagent-yield-pause`, `subagent-followup-yield`, `subagent-yield-resume`, real OpenAI `gpt-5.5`): the same tests fail on base `eb7ca3d33375` and on this branch, with the same assertions (missing `completion.resultText` after a resumed or paused child completes, a Gateway shutdown timeout, an interim reply in the follow-up watch case; follow-up-yield failed 2 of 2 on base). One run of this branch showed a parent that wrote its final report as soon as the first result arrived; the wake message now says to keep waiting when the request needs the remaining results, and that failure no longer appears. The real-Gateway restart e2e files (`test/gateway-*-restart*.e2e.test.ts`) fail locally on base too (11 of 26 on base, 9 of 26 here, same assertions).

**Gates:** `pnpm tsgo:core`, `pnpm check:test-types`, oxlint and oxfmt on the changed files. Every test file in `src/agents/subagents` and `goal-continuation.test.ts` was run across the unit-fast, infra, agents-support, spawn-boundary, core-isolated and e2e projects. Two infra tests failed once under host load and passed when run alone, on head and on base.

## Size

Production code is +96 / −56. The gate, the message-wait exception and its predicate are deleted. The added lines are the partition support the old gate did not need: pending members in the message, the followup last-partition rule, Goal cohort shrink, and pre-yield scheduling, and cron-authority cohort shrink. A census of `batchRunIds`, `requesterYieldBatch`, the frozen branch and `selectConnectedSettledSubagentWave` found every remaining reader still in use. v8 coverage could not attribute lines under the compiled-worker test runner (0 files collected in two attempts), so the census was done by reading the code.

## Accepted edge cases

- If a Goal cohort's last partition is rejected for an unrelated reason (for example, a rearm-generation mismatch), the Goal return stays retained until Stop or a lifecycle rotation. That is the same outcome as a failed final delivery today.
- A nested requester whose early partition answers without yielding reports that answer to its parent. The later result wakes it again as a separate completion.

## Merge danger

- **Two-way door.** No schema, stored-row or config change: the wake rows keep their existing fields and generation. A revert restores the all-at-once wake for every cohort, including rows written while this change ran.
- **Blast radius:** requesters that yield on two or more completion children (dashboard, chat and nested subagent requesters). A defect here would show as an extra or a missing wake for the parent, not as a lost child result: every result stays saved in its child session.

Co-authored-by: Ayaan Zaidi <[email protected]>

(cherry picked from commit 09d956b)

Release adaptation: Kept stable QA Gateway fixture lifecycle; filtered intentionally silent partial-result wakes.

Companion audit: #203222 selected. #204249, #204069, #204048, #203892, #202513, #198960 not applicable (refactors/test cleanup); #204260, #204178, #204098, #204089, #203839, #203271 missing in lane and not prerequisites.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant