Skip to content

fix(agents): avoid repeating delivered child results on settle - #178104

Merged
steipete merged 3 commits into
mainfrom
steipete/settle-wake-dup-delivery
Oct 20, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/settle-wake-dup-delivery

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A requester that spawns new children during a settle-wake turn receives their results twice. This is the normal way a parent retries failed children: the first batch settles, the parent is woken, it spawns replacements and keeps working.

  1. Replacements that finish while the wake turn is still running are steered into that active turn, and the steering path records them as delivered.
  2. When the turn ends, requester settlement dispatches their grouped wave anyway, so the same results arrive again as a subagent_settle continuation.

The settle path only suppressed already-delivered children for single-child waves (requiredSettled.length < 2).

Live, on the Codex app-server route with Codex, parents retrying two impossible modules saw the duplicate in 2 of 3 runs on main. The second announce:requester-settle:… wake carried exactly the two retry run ids, and both results were already present as in-turn completion events in the Codex rollout. The model replied, for example, "Correction — machinery: duplicate completion announcements arrived for both retries." That cost one extra model turn and produced a misleading machinery report. The owner is shared, so embedded OpenClaw and Claude CLI steering are affected too.

User Impact

The requester that already knows is not woken. Batch ownership and the existing delivery receipts are unchanged. Restart-interrupted children stay in the recovery roster and keep their retained findings, because a delivery receipt does not discharge reconciliation of interrupted work. CI caught this on the first head: server.startup-recovery-webchat.test.ts and three saved-batch replay cases. The second commit fixes it with a shared predicate, and those Gateway tests pass unchanged.

Why This Change Was Made

  • A non-yielded wave whose results were all confirmed delivered retires without another continuation, regardless of its size.
  • A mixed wave delivers only its undelivered results and names the already-delivered children in one short line, without repeating their payloads.
  • An explicit sessions_yield still owes exactly one continuation, under the same no-repeat rule.

docs/concepts/subagent-yield-handoff.md documents the single-delivery contract.

Evidence

  • server.startup-recovery-webchat.test.ts (1/1) and server.subagent-settle-replay.harness.test.ts (18/18) pass, with the four first-head failures reproduced red. A new regression covers an interrupted child whose earlier result was delivered.
  • subagent-announce.requester-settle-ownership.test.ts: red on base (4 failed, including "Unexpected wake; consumed retry result repeated") and green with the fix (10 passed). 18 focused announce/registry files pass (212 tests).
  • Live Crabbox A/B with the same blocked-module fixture (two modules have contradictory tests, so the parent retries them from inside its settle-wake turn), Codex parents:
    • main: 2 of 3 runs had a second settle cohort for the retries plus a duplicate report.
    • this branch: 0 of 4. Settle cohorts were [8] only, the retry wave retired after in-turn delivery, and every final machinery line was clean. An Opus control parent was also clean.

CI follow-up

CI run 39377981609 passed the static and Gateway gates but found 15 registry fixture assertions that still assumed delivered results would be loaded or repeated. The test-only follow-up marks interrupted fixtures with the production restart reason, leaves undelivered custody pending, and holds requester identity preparation instead of unnecessary transcript loading. The end-to-end test now requires delivered waves to retire without a second wake. No production logic changed in this follow-up.

Focused local verification covers all 125 cases in subagent-registry.completion-authority.test.ts and subagent-registry.requester-wake.e2e.test.ts: 92 custody cases passed; 30 wake cases passed and the three changed worker-capacity cases passed on the targeted rerun. Changed-file formatting and lint pass. Independent review found no actionable P0–P2 findings in the fixture repair.

Retire fully delivered non-yielded waves without dispatching another requester turn. Mixed and yielded continuations reference consumed children and include only undelivered payloads, using existing batch delivery facts. Preserve explicit yield resumption and document the single-delivery contract.
@clawsweeper

clawsweeper Bot commented Oct 20, 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.

@steipete
steipete marked this pull request as ready for review October 20, 2026 05:31
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling labels Oct 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T06:35:31.640161Z 647c865 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef61cfa9f8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +421 to +423
: await readChildCompletionFindings(
completionRows.filter((entry) => entry.delivery?.status !== "delivered"),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Revalidate delivery state after reading findings

If an individual announcement commits delivery.status = "delivered" while readChildCompletionFindings is awaiting transcript reads, this snapshot still includes that child's payload. PreparedAnnounceResult.isCurrent() validates only run ownership and outcome, and the later refreshBatch() does not rebuild completionRows or preparedFindings, so settlement can dispatch the stale payload—or dispatch after every member has become delivered—and reproduce the duplicate completion this change is intended to prevent.

Useful? React with 👍 / 👎.

Comment on lines +421 to +423
: await readChildCompletionFindings(
completionRows.filter((entry) => entry.delivery?.status !== "delivered"),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Base mixed-batch reply policy on the remaining results

For a non-yielded mixed cohort where a private child is already delivered and a public sibling remains pending, this filter removes the private payload but resolveRequesterSettlePolicy has already inspected all completionRows and set parentOnly because of that delivered private row. The resulting continuation therefore contains only the public sibling's result while being dispatched as a private completion, whose delivery classifier accepts silent internal consumption without a visible receipt; the still-undelivered public result can consequently never reach the original conversation.

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

Landing stopped at reviewed head ef61cfa9f8548f47b11ac7819f6414d79db3f1c4: CI found a product regression in restart recovery.

Gateway job 118472594679 fails server.startup-recovery-webchat.test.ts:621: a saved, yielded batch with a delivered but restart-interrupted child reaches the real Gateway continuation without its Unfinished child sessions to reconcile: roster. The prompt contains only Already delivered child results (not repeated): saved-batch-child. and the generic completion instructions. The new filter at subagent-announce.requester-settle-message.ts:81 removes the actionable recovery row based on notification delivery, even though interrupted work still needs reconciliation. Preserve that recovery guidance independently of repeated result payloads; weakening the assertion would hide the regression. Three saved-batch replay cases also fail in the same job.

A separate test-types job reports TS2367 at ui/src/e2e/session-scoped-delivery.e2e.test.ts:103; its inheritance remains unclassified. Changed-file formatting, lint, and diff checks passed. No source changes, corrective pushes, CI reruns, prepare/merge submission, or admin/REST merge were made. Native review records NEEDS WORK for this head. The mechanical land order requires returning a product regression needing design correction to the coordinator.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR suppresses already-delivered child results when settling grouped or yielded subagent work.

Example: A parent retries children run-a and run-b during a settle-wake turn, and both results arrive before that turn ends.

  • Before: Settlement starts another parent continuation containing both results again.
  • After: The fully delivered, non-yielded wave retires without another continuation.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The live A/B report supports the intended fix, but exact-head production-boundary recovery coverage exposes a blocking regression.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored PR is outside the ordinary contributor proof gate; its body reports live Codex parent retry runs improving from duplicates in 2 of 3 runs to 0 of 4, while inspected Gateway CI demonstrates the recovery regression.
Patch quality 🧂 unranked krab (1/6) 2 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Parents receive retry results twice and may spend another model turn reporting duplicate machinery events.
Reason: The maintainer-authored direction restores the documented single-delivery contract without adding configuration or another state owner.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep this PR open for repair: preventing duplicate completions is useful, but the patch removes actionable restart-recovery guidance and leaves affected recovery tests failing.

Priority: P2
Reviewed head: ef61cfa9f8548f47b11ac7819f6414d79db3f1c4

Before merge

  • Preserve unfinished-child recovery guidance after notification delivery (P1) - A saved yielded batch can contain a child whose interruption notification is delivered while its work remains unfinished after a Gateway restart. Filtering recoveryChildren by delivery status removes that child's session address and reconciliation instructions. The existing Gateway/provider test fails at server.startup-recovery-webchat.test.ts:621 with only the already-delivered notice remaining. Pass the lifecycle-scoped recovery rows to the existing roster builder independently of result-payload suppression; retain the recovery assertion.
  • Update recovery fixtures to exercise genuinely owed continuations (P2) - The new retirement condition makes delivered, non-yielded groups exit before dispatch, but the completion-authority recovery fixture still seeds exactly that state and expects a continuation at line 589. Exact-head checks-node-changed-3 consequently fails across its recovery cases. Gateway replay cases also still require already-delivered payloads to repeat. Update these affected consumers to seed pending delivery or an explicitly owed continuation where dispatch is under test, and assert non-repetition for delivered results while preserving authority, nested recovery, and actionable-roster checks.
  • Explain or restore the original intent of Restart-recovery roster - 3d62d4e: Give the current parent actionable unfinished-child reconciliation guidance after restart; no justification establishes that delivered notifications discharge unfinished work.

Findings

  • [P1] Preserve unfinished-child recovery guidance after notification delivery — src/agents/subagents/announce/subagent-announce.requester-settle-message.ts:81-83
  • [P2] Update recovery fixtures to exercise genuinely owed continuations — src/agents/subagents/registry/subagent-registry.requester-completion.test-support.ts:373

Provenance

  • Restart-recovery roster changes intended behavior without addressing why it exists (3d62d4e: Give the current parent actionable unfinished-child reconciliation guidance after restart; no justification establishes that delivered notifications discharge unfinished work.)
Agent review details

How this fits together

The subagent registry supplies completion and delivery facts to requester settlement, which prepares one parent continuation through the session mailbox and Gateway.

flowchart TD
  A[Child executions] --> B[Registry completion facts]
  B --> C[Individual announcements]
  C --> D[Delivery receipts]
  D --> E[Requester settlement]
  B --> E
  E --> F[Session mailbox and Gateway]
  F --> G[Parent continuation]
Loading

Technical review

Best possible solution:

Suppress repeated result payloads in the existing settlement owner while preserving unfinished-child recovery guidance and meaningful recovery coverage.

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

Current main only suppresses fully delivered single-child waves, establishing the grouped-duplicate path; the author reports live reproduction, and exact-head CI independently demonstrates the introduced recovery failure.

Is this the best way to solve the issue?

Using existing delivery receipts and settlement ownership is appropriately small, but notification delivery cannot determine whether interrupted child work still needs reconciliation.

Full review comments:

  • [P1] Preserve unfinished-child recovery guidance after notification delivery — src/agents/subagents/announce/subagent-announce.requester-settle-message.ts:81-83
    A saved yielded batch can contain a child whose interruption notification is delivered while its work remains unfinished after a Gateway restart. Filtering recoveryChildren by delivery status removes that child's session address and reconciliation instructions. The existing Gateway/provider test fails at server.startup-recovery-webchat.test.ts:621 with only the already-delivered notice remaining. Pass the lifecycle-scoped recovery rows to the existing roster builder independently of result-payload suppression; retain the recovery assertion.
    Confidence: 1
  • [P2] Update recovery fixtures to exercise genuinely owed continuations — src/agents/subagents/registry/subagent-registry.requester-completion.test-support.ts:373
    The new retirement condition makes delivered, non-yielded groups exit before dispatch, but the completion-authority recovery fixture still seeds exactly that state and expects a continuation at line 589. Exact-head checks-node-changed-3 consequently fails across its recovery cases. Gateway replay cases also still require already-delivered payloads to repeat. Update these affected consumers to seed pending delivery or an explicitly owed continuation where dispatch is under test, and assert non-repetition for delivered results while preserving authority, nested recovery, and actionable-roster checks.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Delivered-wave retirement changes intended behavior with a stated reason (eb4f3d7: Wake parked top-level requesters when parallel child work drains, excluding already-delivered singletons.)
  • Complete child findings and route notices changes intended behavior with a stated reason (31172cf: Deliver complete exact-run answers and preserve producer-owned metadata; the PR explains suppressing payloads already consumed by the requester.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/agents/subagents/announce/subagent-announce.requester-settle-ownership.test.ts --maxWorkers=1
  • pnpm test src/gateway/server.startup-recovery-webchat.test.ts --maxWorkers=1
  • pnpm test src/gateway/server.subagent-settle-replay.harness.test.ts --maxWorkers=1
  • pnpm test src/agents/subagents/registry/subagent-registry.completion-authority.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3d62d4e adds src/agents/subagents/announce/subagent-announce.requester-settle-message.ts:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3d62d4e2a5e1; files: src/agents/subagents/announce/subagent-announce.requester-settle-message.ts)
  • Ayaan Zaidi: Raw commit 31172cf adds src/agents/subagents/announce/subagent-announce.requester-settle-message.ts:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 31172cf54466; files: src/agents/subagents/announce/subagent-announce.requester-settle-message.ts)

PR surface

Source +14, Tests +73, Docs +9. Total +96 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 25 11 +14
Tests 5 78 5 +73
Docs 1 14 5 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 117 21 +96

Labels

Label changes:

  • add P2: Duplicate child completions cause unnecessary model turns and misleading reports in a bounded delegated-work flow.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦐 gold shrimp and patch quality is 🧂 unranked krab.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Duplicate child completions cause unnecessary model turns and misleading reports in a bounded delegated-work flow.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦐 gold shrimp and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 20, 2026, 1:47 AM ET / 05:47 UTC.

Keep restart-interrupted child findings and the requester-scoped recovery roster even when an earlier result has a delivery receipt. Use the same rule when retiring fully delivered waves so unfinished recovery still reaches the requester.

Normal completed results retain the no-repeat contract. Preserve the existing Gateway replay assertions and add a regression for a delivered interrupted child in a non-yielded wave.
@steipete
steipete enabled auto-merge (squash) October 20, 2026 06:05
@steipete
steipete disabled auto-merge October 20, 2026 06:13
Use the production restart marker in interrupted custody fixtures. Keep undelivered custody pending, hold requester preparation for capacity tests, and assert delivered waves retire without another payload.
@steipete
steipete merged commit 411b2e6 into main Oct 20, 2026
122 of 124 checks passed
@steipete
steipete deleted the steipete/settle-wake-dup-delivery branch October 20, 2026 06:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…law#178104)

* fix(agents): avoid repeating delivered child results on settle

Retire fully delivered non-yielded waves without dispatching another requester turn. Mixed and yielded continuations reference consumed children and include only undelivered payloads, using existing batch delivery facts. Preserve explicit yield resumption and document the single-delivery contract.

* fix(agents): preserve interrupted child settlement recovery

Keep restart-interrupted child findings and the requester-scoped recovery roster even when an earlier result has a delivery receipt. Use the same rule when retiring fully delivered waves so unfinished recovery still reaches the requester.

Normal completed results retain the no-repeat contract. Preserve the existing Gateway replay assertions and add a regression for a delivered interrupted child in a non-yielded wave.

* test(agents): align settle fixtures with delivered results

Use the production restart marker in interrupted custody fixtures. Keep undelivered custody pending, hold requester preparation for capacity tests, and assert delivered waves retire without another payload.
RomneyDa added a commit that referenced this pull request Oct 29, 2026
…ns in gateway lane FRV tests (#187589)

* fix(sessions): keep malformed rows out of the legacy transcript locator projection

The #181247 backport (08ee066) adapted the main change for the release
branch's legacy sessionFile locator by projecting json_extract(entry_json,
'$.sessionFile') on every selected row. SQLite raises 'malformed JSON' for an
unreadable entry_json before parseSessionEntryJson can apply its skip/reject
policy, so ordinary selected listings and gateway lookups failed with a raw
SQLite error. Project the locator only for transcript selections and only for
valid JSON rows. Release-only: main retired the sessionFile locator.

* test(logging): isolate log-tail prefix cases from cached inode (#173376)

(cherry picked from commit 40806cf)

* test(gateway): realign sessions_send owner continuation to the #181373 backport

9b8ee9c (#181373 backport) adopts timed sessions_send children into the
requester turn and changes the inline wait to waitForAgentRunReply. The backport
dropped a8a3680's matching fixture changes, so the test spied on the old
SessionFollowupCompletion.take and waited forever. Apply main's fixture hunk
(observe waitForAgentRunReply and registry persistence). The release branch has
no session-controller liveness check (#175837), so a claimed result is handed
back only by the requester run's settlement; the synthetic original run now
performs the settleRequesterRun call its embedded runner makes on completion.

Adapted from a8a3680

* test(agents): keep six-outcome settle fixture undelivered after consumed-cohort backport

The 2f7589a backport of #181260 filters delivered child findings from
settle wakes (needsRequesterSettleFindings). On main, #178104 moved the shared
makeSettledChild default to pending delivery; the release fixture still
defaults to delivered, so this case lost every finding. Mark its children
pending, as the backport did for its other undelivered fixtures.

* test(gateway): keep progress-only settle recovery undelivered after #181260 backport

Backport 2f7589a dropped the source commit's fixture change because
main had moved the recovery case into
server.subagent-settle-replay-recovery.test-support.ts. Apply the same
'progress only' pending-delivery setup to the inline release copy.

(adapted from commit 535989c)

* test(agents): keep private settle policy fixtures undelivered after #181260 backport

Backport 2f7589a filters delivered child findings from settle wakes.
On main, #178104 moved the shared fixture default to pending and renamed
these cases to pending pairs; the release fixture still defaults to
delivered, so the private marker was filtered. Mark the children pending.

* test(agents): mock retireRequesterFollowupAuthority in settle retry fixture

Backport 9b8ee9c (#181373) made execution cleanup call
retireRequesterFollowupAuthority. This release-only fixture mocks
requester-cron-authority.js without that export, so the retry wake threw
and warned. Main no longer has this mock.

* fix(subagents): keep queued collectors out of operator completion custody

The release adaptation 4643f86 of #181373 started capturing the
operator continuation context for every spawn so collectors also record
their original requester source. It dropped the collect guard on binding
completion authority, so a queued collector retained an operator source
hold after its parent completed or stopped. Main binds only non-collect
runs (authority && !registerParams.collect); restore that guard here and
keep completionAuthorityRequired aligned with it.

* test(agents): mark settle retry cron-authority mock as isolation

The added retireRequesterFollowupAuthority export changed the grandfathered
factory hash. Name the isolation reason and prune the stale baseline entry.

---------

Co-authored-by: Patrick Erichsen <[email protected]>
RomneyDa added a commit that referenced this pull request Oct 29, 2026
… after #181260 backport

Backport 2f7589a (#181260) filters delivered child findings from
settle wakes (needsRequesterSettleFindings), so this delivered-row case
no longer reads the child transcript where it injected worker capacity
and failed with 'expected findTranscriptEvent to be called'. Main
realigned the same case in 411b2e6 (#178104): inject capacity at
captureRequesterSessionEntryCurrent and assert the delivered result is
not repeated in the resumed wake. Apply that realignment; the
'Already delivered child results' wording that main also asserts belongs
to #178104's message change, which this branch does not carry.

(adapted from commit 411b2e6)
RomneyDa added a commit that referenced this pull request Oct 29, 2026
…eadcode after backports (#187570)

* refactor: keep Teams allowlist sentinel private (#185484)

The Microsoft Teams fail-closed allowlist sentinel now remains module-private while preserving its exact restrictive projection and lifecycle coverage.

(cherry picked from commit 59b1ddd)

* test: teach the live-wrapper fake Bun to answer --revision

Partial cherry-pick of the test/scripts/test-live.test.ts hunk only.
#173807 (backported as e72f868) made the CI Bun --revision probe
mandatory; the fake Bun fixture must answer it from the checkout pin.

(cherry picked from commit 08dd80a)

* test(ci): expect watchdog exit 124 from wedged run-tsgo

#184639 (backported as d9a91b5) intentionally changed the run-tsgo
watchdog exit from 1 to 124 so CI collectors stop admitting work. Main
realigned this case in run-tsgo-worktree.test.ts (9b14a38); on the
release branch the same watchdog case lives in run-tsgo.test.ts and was
not realigned by the backport.

* test(vitest): keep gateway database-worker routes in canonical order

The beta.5 adaptation of #178415 (23a2bcd) prepended three
integration proofs to gatewayDatabaseWorkerTestFiles. Canonical project
ownership compares that list against sorted discovery, so the
out-of-order entries failed vitest-cli-ownership. Move them to their
sorted positions; routing membership is unchanged.

* refactor: keep Slack reconnect policy private (#181690)

Keeps Slack reconnect policy details module-private while preserving the exact invalid-auth cutoff, reset, and blocked-status behavior.

(cherry picked from commit cd65901)

* fix: keep retired Telegram throttler release private

Telegram hunk of 09f9ec8 (#183086) only. The release-only test
called the private helper directly; its surviving-alias case is already
asserted through releaseRemovedTelegramAccountThrottler, so drop the
duplicate direct call.

(cherry picked from commit 09f9ec8, partial)

* refactor: keep Claude partial-message measurement private

src/agents/cli-output-stream-limits.ts hunk of 28e2774 (#184686) only;
the backport of #184352 left this export without a consumer.

(cherry picked from commit 28e2774, partial)

* refactor: keep managed plugin cache selector private

src/plugins/management-catalog.ts hunk of 2c0c30b (#185269) only;
the backport of #184921 left this export without a consumer.

(cherry picked from commit 2c0c30b, partial)

* refactor(agents): keep requester settle batch callbacks type private

The backport of #181260 (2f7589a) moved RequesterSettleWakeParams
into the state module, leaving RequesterSettleWakeBatchCallbacks exported
only for a test fixture. Main keeps it module-private; type the fixture
through RequesterSettleWakeParams instead.

* refactor(infra): drop unconsumed streaming UTF-8 decoder

The minimal backport of #180861 (8d3183d) added decodeUtf8Chunks as
a prerequisite, but its main consumers (streaming state-migration
importers) were intentionally not backported, so production Knip flags
it. Remove the export and its unit case; decodeUtf8Input is unchanged.

* refactor(scripts): keep pinned Bun CI detection private

The minimal #172625 backport (e6c3639) deferred the dev-tool,
test-runtime and run-format callers that consume isCiEnvironment on main,
so the export has no consumer on the release branch.

* test(update): drop orphaned recovery version-mismatch fixture

The #185692 backport in 39f9bde removed the last consumer of
recoveryVersionMismatch from update-cli.plugin-convergence.test.ts. Main
removed the same fixture in eae9bc4 (#181717).

* test(gateway): type config removal mocks through inline module imports

The release adaptation of #152052 (41aa7a6, de41770) typed its
partial mocks through type-only namespace imports. Knip treats the
secrets runtime namespace as the only consumer of its exports, so the
full-tree scan reported prepareSecretsRuntimeSnapshotRestore and
SecretResolverWarning as unused. Use main's inline typeof import() form.

* refactor(shared): drop unconsumed async-store helper

The backport of #179213 (6d9852d, plus f3fb0e9 registering it
as a wrapper component) took the runWithAsyncStore helper and its test
without the plugin-instance-invocation consumer, leaving
src/shared/async-store.ts unused in production. Remove the helper, its
test and its wrapper-components entry rather than complete a perf change
during beta stabilization.

* chore(knip): model backported perf scripts and Telegram worker fixture

Mirror main's Knip entries for files added by beta.5 backports:
- scripts/perf/{node-event-session-source-measure.mjs,
  stream-dispatch-scope-measure.ts,system-prompt-report-retention.ts}
  as path-invoked script roots (#183931, #183552, #183010);
- the Telegram ingress context Worker fixture loaded by URL (#178909) in
  production ignoreFiles.
Also register scripts/test-security-mail-parser.mjs, the standalone
nodemailer sender-parsing regression added by #187301 (release-only).

* refactor(doctor): keep dashboard migration guard at the repair boundary

Release adaptation of 50b532d (#183153). The backport of #182345
(51f63cb) exported isUnstampedDashboardRoot only for its unit test.
Main made it private and drove the eligibility cases through
repairLegacyDashboardChatTypes using a canonical-repair fixture this
branch does not carry. Keep every accepted and rejected row case, now
asserted through the repair boundary with the branch's session accessor.

* test(agents): hold requester preparation for the settle capacity case after #181260 backport

Backport 2f7589a (#181260) filters delivered child findings from
settle wakes (needsRequesterSettleFindings), so this delivered-row case
no longer reads the child transcript where it injected worker capacity
and failed with 'expected findTranscriptEvent to be called'. Main
realigned the same case in 411b2e6 (#178104): inject capacity at
captureRequesterSessionEntryCurrent and assert the delivered result is
not repeated in the resumed wake. Apply that realignment; the
'Already delivered child results' wording that main also asserts belongs
to #178104's message change, which this branch does not carry.

(adapted from commit 411b2e6)

---------

Co-authored-by: Shakker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant