Skip to content

fix(pi-runner): flush block replies after compaction retry#85288

Merged
steipete merged 1 commit into
openclaw:mainfrom
spacegeologist:fix-compaction-retry-block-flush
May 25, 2026
Merged

fix(pi-runner): flush block replies after compaction retry#85288
steipete merged 1 commit into
openclaw:mainfrom
spacegeologist:fix-compaction-retry-block-flush

Conversation

@spacegeologist

@spacegeologist spacegeologist commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Verification

  • corepack pnpm exec tsx /private/tmp/openclaw-compaction-retry-delivery-proof.ts
  • node scripts/run-vitest.mjs src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts -t "flushes block replies again after compaction retry wait resolves"
  • pnpm check:architecture
  • node scripts/run-vitest.mjs src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts src/agents/pi-embedded-subscribe.handlers.lifecycle.test.ts
  • node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-payloads.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.splits-long-single-line-fenced-blocks-reopen.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.waits-multiple-compaction-retries-before-resolving.test.ts
  • corepack pnpm exec oxfmt --check --threads=1 src/agents/pi-embedded-runner/run/attempt.ts src/agents/pi-embedded-runner/run/attempt.spawn-workspace.test-support.ts src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts
  • git diff --check

Real behavior proof

Behavior addressed: Compaction retry can resolve the runner wait before retry-generated block replies finish draining, causing transcript-visible replies to be dropped before channel delivery.

Real environment tested: Local OpenClaw source checkout at commit 70f45ff870e43fbb939c680b74821015ecdccce6, rebased onto origin/main at e2f82d4d30bbebbf89bdbb94b3e58c7aa0185151 on macOS, with dependencies installed from pnpm-lock.yaml.

The log-backed proof uses the real createBlockReplyPipeline().flush() delivery barrier and the real waitForCompactionRetryWithAggregateTimeout() helper. The local channel adapter deliberately delays send completion so the retry wait / delivery ordering is visible without external provider credentials.

Exact steps or command run after this patch:

  • corepack pnpm exec tsx /private/tmp/openclaw-compaction-retry-delivery-proof.ts
  • node scripts/run-vitest.mjs src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts -t "flushes block replies again after compaction retry wait resolves"
  • pnpm check:architecture
  • node scripts/run-vitest.mjs src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts src/agents/pi-embedded-subscribe.handlers.lifecycle.test.ts
  • node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-payloads.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.splits-long-single-line-fenced-blocks-reopen.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.waits-multiple-compaction-retries-before-resolving.test.ts
  • corepack pnpm exec oxfmt --check --threads=1 src/agents/pi-embedded-runner/run/attempt.ts src/agents/pi-embedded-runner/run/attempt.spawn-workspace.test-support.ts src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts
  • git diff --check

Evidence after fix:

pre-wait-flush-start
pre-wait-flush-complete
retry-wait-start
retry-generated-block-enqueued
channel-send-start:retry reply delivered after compaction wait
retry-wait-resolved
aggregate-wait-result:{"timedOut":false}
delivered-before-post-wait-flush:none
delivery-in-flight-before-post-wait-flush-completes:yes
channel-send-complete:retry reply delivered after compaction wait
post-wait-flush-complete:retry reply delivered after compaction wait
  • Rebased head: 70f45ff870e43fbb939c680b74821015ecdccce6 on origin/main e2f82d4d30bbebbf89bdbb94b3e58c7aa0185151.
  • Target regression after rebase: Test Files 2 passed (2), Tests 2 passed | 94 skipped (96).
  • Architecture after rebase: Import cycle check: 0 runtime value cycle(s)., Madge import cycle check: 0 cycle(s)., deprecated API usage guard passed, deprecated JSDoc guard passed.
  • Runner/lifecycle/compaction selection: Test Files 6 passed (6), Tests 166 passed (166).
  • Supplemental payload/subscribe selection: Test Files 5 passed (5), Tests 62 passed (62).
  • oxfmt: All matched files use the correct format.
  • git diff --check passed with no output.

Observed result after fix: The retry wait returns with the retry reply still undelivered (delivered-before-post-wait-flush:none), then the second idempotent flush waits for the real block reply pipeline send chain to finish (post-wait-flush-complete:retry reply delivered after compaction wait). Aggregate-timeout fallback still avoids an extra drain.

What was not tested: A live high-context Discord/Telegram/other external-network compaction retry with real provider credentials was not run. The behavior proof is local and log-backed, using the real block reply pipeline flush and retry wait helper with a delayed local channel adapter.

AI Assistance Disclosure

This PR was prepared with AI assistance. I reviewed the changed code path and verified the targeted tests above.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Latest ClawSweeper review: 2026-05-22 10:44 UTC / May 22, 2026, 6:44 AM ET.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Summary
The PR adds an awaited block-reply flush after successful embedded PI compaction retry waits, wires the runner test mock for that wait helper, and adds regression coverage for the flush ordering.

Reproducibility: yes. at source level. Current main resolves the compaction retry before the async channel flush necessarily settles, and the PR body includes log-backed after-fix output demonstrating that the second flush is the delivery barrier.

PR rating
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Summary: The PR is focused and well-supported by source inspection plus local behavior proof, with ordinary CI confirmation still needed before merge.

Rank-up moves:

  • Confirm required CI/checks completed successfully on head 70f45ff.
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Real behavior proof
Sufficient (live_output): The PR body includes copied after-fix live output from a local OpenClaw checkout using the real block-reply pipeline flush and retry wait helper with a delayed local channel adapter.

Risk before merge

  • Required GitHub checks are not proven green in the provided context for head 70f45ff, so maintainers should confirm CI on that exact head before merge.
  • The real behavior proof is local and log-backed with a delayed channel adapter; it exercises the shared delivery barrier, but not a live high-context Discord, Telegram, or other external transport retry.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow post-wait delivery barrier with its regression test after required checks pass, then let Reply generated but not delivered when compaction triggers session rollover #47335 close through the merged fix.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
No automated repair lane is needed; the remaining action is normal maintainer review and required-check confirmation on the latest PR head.

Security
Cleared: The diff only changes TypeScript runner logic and tests, with no dependency, workflow, credential, install, or supply-chain surface changes.

Review details

Best possible solution:

Land the narrow post-wait delivery barrier with its regression test after required checks pass, then let #47335 close through the merged fix.

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

Yes, at source level. Current main resolves the compaction retry before the async channel flush necessarily settles, and the PR body includes log-backed after-fix output demonstrating that the second flush is the delivery barrier.

Is this the best way to solve the issue?

Yes. A second idempotent flush after a successful retry wait is the narrow maintainable fix, and the PR preserves aggregate-timeout behavior by skipping the extra drain on timeout.

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes copied after-fix live output from a local OpenClaw checkout using the real block-reply pipeline flush and retry wait helper with a delayed local channel adapter.

Label justifications:

  • P2: This is a focused reliability fix for reply delivery after compaction retry with limited blast radius in the embedded PI runner.
  • rating: 🐚 platinum hermit: Current PR rating is 🐚 platinum hermit because proof is 🦞 diamond lobster, patch quality is 🐚 platinum hermit, and The PR is focused and well-supported by source inspection plus local behavior proof, with ordinary CI confirmation still needed before merge.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes copied after-fix live output from a local OpenClaw checkout using the real block-reply pipeline flush and retry wait helper with a delayed local channel adapter.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes copied after-fix live output from a local OpenClaw checkout using the real block-reply pipeline flush and retry wait helper with a delayed local channel adapter.

What I checked:

Likely related people:

  • Sid-Qin: Introduced the original pre-compaction block reply flush in the same runner/lifecycle path that this PR extends. (role: introduced adjacent behavior; confidence: high; commits: 7a22b3fa0b2c; files: src/agents/pi-embedded-runner/run/attempt.ts, src/agents/pi-embedded-subscribe.handlers.lifecycle.ts)
  • cgdusek: Added waitForCompactionRetryWithAggregateTimeout and wired it into the embedded attempt runner, which is the helper this PR now branches around. (role: introduced related timeout helper; confidence: high; commits: 54be30ef89f5; files: src/agents/pi-embedded-runner/run/attempt.ts, src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.ts)
  • jalehman: Reviewed/co-authored the prior merged PRs for the pre-wait flush and aggregate compaction retry wait path, and was mentioned on this PR timeline. (role: reviewer and adjacent owner; confidence: medium; commits: 7a22b3fa0b2c, 54be30ef89f5; files: src/agents/pi-embedded-runner/run/attempt.ts, src/agents/pi-embedded-subscribe.handlers.lifecycle.ts)
  • steipete: Earlier embedded agent overflow work introduced the compaction retry tracking and wait surface that later fixes refined. (role: introduced earlier compaction retry behavior; confidence: medium; commits: d28265cfbe56; files: src/agents/pi-embedded-subscribe.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against ff79299d68e3.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 22, 2026
@spacegeologist spacegeologist force-pushed the fix-compaction-retry-block-flush branch from 21a1f39 to 63a5e4d Compare May 22, 2026 09:05
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🥚 common Mossy Patch Peep

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: sleeps inside passing CI.
Image traits: location green-check meadow; accessory miniature diff map; palette violet, aqua, and starlight; mood proud; pose guarding a tiny green check; shell brushed metal shell; lighting clean product lighting; background delicate sparkle particles.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Mossy Patch Peep in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels May 22, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 22, 2026

Copy link
Copy Markdown
Contributor Author

Local follow-up on the remaining CI blocker:

  • Re-ran the exact architecture script locally with pnpm 11.1.0: pnpm check:architecture
  • Result: passed
    • Import cycle check: 0 runtime value cycle(s).
    • Madge import cycle check: 0 cycle(s).
    • deprecated API usage guard passed
    • deprecated JSDoc guard passed

The PR head is still showing the single failed GitHub Actions job check-additional-runtime-topology-architecture, so I believe the next useful action is to rerun that failed job on GitHub.

@spacegeologist spacegeologist force-pushed the fix-compaction-retry-block-flush branch from 63a5e4d to 70f45ff Compare May 22, 2026 09:41
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 22, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels May 22, 2026
@spacegeologist spacegeologist changed the title [AI-assisted] fix(pi-runner): flush block replies after compaction retry fix(pi-runner): flush block replies after compaction retry May 22, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 22, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 22, 2026
@steipete steipete self-assigned this May 25, 2026
@steipete steipete merged commit 0d4575a into openclaw:main May 25, 2026
142 of 144 checks passed
frankhli843 pushed a commit to gemmaclaw/gemmaclaw that referenced this pull request May 26, 2026
…(thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
frankhli843 added a commit to gemmaclaw/gemmaclaw that referenced this pull request May 26, 2026
* fix(doctor): prune stale bundled plugin paths (openclaw#85038)

* fix: honor OPENCLAW_HOME defaults (openclaw#85802)

* fix: honor OPENCLAW_HOME defaults

* fix(install): preserve openclaw home upgrade defaults

* fix(install): satisfy shellcheck tilde patterns

* fix(config): do not suppress recovery retry after failed backup restore (openclaw#85787)

maybeRecoverSuspiciousConfigRead unconditionally recorded
lastObservedSuspiciousSignature in health state even when
restoredFromBackup was false (copyFile failed). The guard at
resolveConfigReadRecoveryContext then prevented the same
signature from ever being retried, permanently accepting the
suspicious config on every subsequent launch.

Only record the dedup signature when the backup restore
actually succeeded.

* fix(docker): restore config parent ownership

* fix(pi-runner): flush blocks after compaction retry (openclaw#85288) (thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>

* feat(gateway): forward OpenAI sampling params (openclaw#84094)

Forward OpenAI-compatible frequency_penalty, presence_penalty, and seed params through the gateway/chat-completions path while keeping Responses untouched.

Verification:
- pnpm test src/gateway/openai-http.test.ts src/agents/pi-embedded-runner/extra-params.sampling.test.ts src/agents/openai-transport-stream.test.ts
- CI passed on head 9abb946 after rerunning cancelled jobs: preflight, critical quality network-runtime-boundary, security high, checks, docs, Real behavior proof.

Co-authored-by: lellansin <lellansin@gmail.com>

* fix: correct build errors from cherry-pick merges

- Add missing topP field to AgentStreamParams in shared-types.ts
- Replace missing resolveAliasedParamValueFromKeys with existing resolveAliasedParamValue in extra-params.ts
- Fix onBlockReplyFlush bare variable reference to params.onBlockReplyFlush in attempt.ts

* fix: add missing topP to BaseStreamOptions

* fix: add missing openai-http helpers (resolveResponseFormat, resolveErrorMessage, validateOpenAiSamplingParams)

* fix(tests): revert context-engine test to origin/main state (ported tests need upstream infrastructure)

* fix(tests): restore local import paths broken by upstream cherry-picks

* fix(tests): fix remaining cherry-pick compat issues for gemmaclaw

- openai-http.ts: add FailoverError import, pass streamParams through
  buildAgentCommandInput, add integer check for seed param, handle
  FailoverError format reason as 400 in catch block
- openai-http.test.ts: add missing FailoverError import
- dockerfile.test.ts: use gemmaclaw stage name base-\${OPENCLAW_VARIANT}
  instead of upstream base-runtime
- test/scripts/install-sh.test.ts: remove test file added by cherry-pick
  762ae06; it tests apt_get wrapper, npm freshness, macOS Homebrew,
  and duplicate-install detection from unported companion commits; file
  was never on gemmaclaw main

---------

Co-authored-by: Gio Della-Libera <giodl73@gmail.com>
Co-authored-by: Sebastien Tardif <SebTardif@ncf.ca>
Co-authored-by: sallyom <somalley@redhat.com>
Co-authored-by: Zee Zheng <zheng.zuo0@gmail.com>
Co-authored-by: Lellansin Huang <Lellansin@gmail.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 26, 2026
…(thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
…(thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
…(thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
…(thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
…(thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
…(thanks @spacegeologist)

Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

Reply generated but not delivered when compaction triggers session rollover

2 participants