Skip to content

fix: force preflight compaction before oversized agent turns#87522

Merged
steipete merged 5 commits into
openclaw:mainfrom
ArthurNie:fix-preflight-force-compaction
May 31, 2026
Merged

fix: force preflight compaction before oversized agent turns#87522
steipete merged 5 commits into
openclaw:mainfrom
ArthurNie:fix-preflight-force-compaction

Conversation

@ArthurNie

@ArthurNie ArthurNie commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the preflight compaction path for oversized embedded agent turns.

When the auto-reply runner detects that the upcoming prompt is already over the safe token budget / transcript byte budget, it now marks the compaction request as preflight-required and forced. The context-engine compaction wrapper honors that force signal, instead of only forcing manual /compact calls.

This makes the upper-layer preflight budget gate authoritative: if a turn would otherwise fail with context overflow, OpenClaw should compact before submitting the prompt rather than returning no response.

Fixes #87234.

Changes

  • Add preflight force metadata to compact session params.
  • Pass force: true, forcePreflight: true, preflightRequired: true, and the trigger (tokens / transcript_bytes) from the auto-reply preflight gate.
  • Forward forced preflight compaction into context-engine compaction as force: true while keeping diagnostic reason/trigger metadata internal via runtimeContext.
  • Keep existing manual compaction behavior as an internal forceReason: "manual" runtime context hint.
  • Add regression coverage for both auto-reply preflight compaction and context-engine forced compaction.

Real behavior proof

  • Behavior or issue addressed: Feishu/OpenClaw oversized turns were failing before model execution with Preflight compaction required but failed: below threshold, leaving Feishu DM/group sessions apparently unresponsive. This PR makes the upper-layer preflight budget gate force compaction instead of letting the lower compaction threshold veto it.
  • Real environment tested: Production OpenClaw VPS runtime used by Arthur's Feishu sessions (/usr/lib/node_modules/openclaw/dist, gateway on 127.0.0.1:18789). Installed package / CLI was 2026.5.26; the initial failed validation was on a stale running gateway 2026.5.22, PID 3752207, started Wed May 27 09:52:55 2026. After real systemd restart the running gateway was 2026.5.26, PID 3953195, started Thu May 28 14:55:53 2026, connectivity probe ok.
  • Exact steps or command run after this patch: Restarted the production gateway with systemctl --user restart openclaw-gateway; verified openclaw gateway status reported Gateway 2026.5.26 and new PID/start time; then sent/observed real project messages in the affected Merlin evolution Feishu group oc_5cc1621461880ae8dccec0147e40896b using session agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b.
  • Evidence after fix: Redacted production runtime logs and Feishu message history from the affected group:
Pre-restart failure while stale gateway 2026.5.22 was still running:
2026-05-28T13:50:41.213+08:00 message dispatch completed: channel=feishu sessionKey=agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b outcome=error error="Error: Preflight compaction required but failed: below threshold"
2026-05-28T13:50:41.222+08:00 feishu[default][msg:om_x100b6e49341518b4c398dd246766af6]: dispatch failed: Error: Preflight compaction required but failed: below threshold

Post-restart validation after gateway 2026.5.26 loaded:
2026-05-28T15:12:30.587+08:00 feishu[default]: dispatching to agent (session=agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b)
2026-05-28T15:13:30.130+08:00 feishu[default][msg:om_x100b6e4ae31ba894c32594bf37c25d4]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-05-28T15:16:58.070+08:00 feishu[default][msg:om_x100b6e4ae31ba894c32594bf37c25d4]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-05-28T15:16:59.089+08:00 feishu[default][msg:om_x100b6e4ae31ba894c32594bf37c25d4]: reply completed, card finalized (elapsedMs=268502, isCardKit=true)

Additional post-restart real project turn:
2026-05-28T15:17:52.766+08:00 feishu[default]: dispatching to agent (session=agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b)
2026-05-28T15:18:04.851+08:00 feishu[default][msg:om_x100b6e4a8cccac9cc2630df629b622d]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-05-28T15:18:06.586+08:00 feishu[default][msg:om_x100b6e4a8cccac9cc2630df629b622d]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)

Feishu message history also showed the second post-restart turn produced a visible CardKit reply to user text merge 483,下一步, including project progress (#483 已 merge; main 也已同步...) and continued workflow updates.

  • Observed result after fix: The affected Merlin evolution Feishu group recovered after loading the fixed runtime. The 15:12 real project turn completed and finalized its CardKit reply. The 15:17 real project turn produced a visible CardKit reply and continued the workflow. No post-restart occurrence of Preflight compaction required but failed: below threshold was observed for the affected group.
  • What was not tested: This proof validates the below threshold preflight failure path and stale-runtime deployment issue in the affected production Feishu group. It is not a blanket proof for every future high-context overflow or unrelated Feishu/card lifecycle failure mode.

Verification

Ran targeted tests locally:

./node_modules/.bin/vitest run src/auto-reply/reply/agent-runner-memory.test.ts src/agents/embedded-agent-runner/compact.hooks.test.ts --maxWorkers=1

Test Files  3 passed (3)
Tests       144 passed (144)

Note: pnpm install --frozen-lockfile was slow/flaky in this environment because @matrix-org/matrix-sdk-crypto-nodejs postinstall downloads timed out repeatedly. Existing node_modules/.bin/vitest was available, so the targeted regression suite was run directly.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 31, 2026, 2:31 PM ET / 18:31 UTC.

Summary
The PR makes required auto-reply preflight compaction pass a forced preflight signal into embedded/context-engine compaction and adds user-facing recovery copy plus focused regression tests.

PR surface: Source +82, Tests +142. Total +224 across 9 files.

Reproducibility: yes. The current-main source path shows required preflight compaction can call the compactor without force, and the PR supplies production Feishu logs for the below-threshold preflight failure plus after-fix completion evidence.

Review metrics: 1 noteworthy metric.

  • Compaction force surface: 1 existing public force flag reused; 3 internal preflight metadata fields added. Maintainers should notice that automatic preflight compaction now reaches the context-engine force contract, even though the reason/trigger metadata stays internal.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Rebase or refresh the branch against current main and rerun the focused agent/auto-reply validation on the exact head.
  • Get maintainer sign-off that forced automatic preflight compaction is the intended context-engine contract.

Risk before merge

  • [P1] Forcing required preflight compaction changes the behavior from allowing a below-threshold context-engine skip to attempting compaction before prompt submission, which can rotate, checkpoint, or rewrite session state before the model call.
  • [P1] Context-engine plugins that currently interpret force=true as manual or threshold compaction will now also see it for automatic preflight budget compaction, so maintainers need to accept that compatibility contract.
  • [P1] The PR shares the auto-reply memory function with other open work and the live context did not show a clean mergeable head, so the exact head should be rebased/refreshed before landing.

Maintainer options:

  1. Land after compaction owner sign-off (recommended)
    Accept that the preflight budget gate may force context-engine compaction before prompt submission, then rebase and rerun focused preflight/session tests on the exact head.
  2. Narrow the force contract before merge
    If automatic force semantics are too broad, change the PR to force only engines that explicitly support preflight-required compaction or add a clearer internal mode.
  3. Pause behind overlapping auto-reply work
    If the related auto-reply memory PRs land first, pause this branch until the shared function conflict is resolved and the diff can be reviewed fresh.

Next step before merge

  • [P2] Human maintainer review is the right next step because the remaining blocker is accepting compatibility/session-state semantics and refreshing the merge head, not a narrow automated repair.

Security
Cleared: The diff does not change dependencies, workflows, secrets handling, package metadata, or external code execution surfaces; I found no concrete security or supply-chain concern.

Review details

Best possible solution:

Land this as the narrow forced-preflight fix once compaction owners accept the force semantics and the branch is refreshed against current main with focused agent/auto-reply validation.

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

Yes. The current-main source path shows required preflight compaction can call the compactor without force, and the PR supplies production Feishu logs for the below-threshold preflight failure plus after-fix completion evidence.

Is this the best way to solve the issue?

Yes, this is the narrowest maintainable fix shape I found: it uses the existing ContextEngine.compact force contract and keeps preflight reason/trigger details internal. The remaining question is maintainer acceptance of the compatibility/session-state semantics, not a concrete code defect.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P1: The PR addresses an urgent broken agent/channel workflow where oversized Feishu/OpenClaw turns could fail before producing a user-visible response.
  • merge-risk: 🚨 compatibility: Context-engine implementations may observe force=true for automatic preflight compaction instead of only manual/threshold compaction.
  • merge-risk: 🚨 session-state: Forced preflight compaction can mutate or rotate session state before the user turn is submitted to the model.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The PR body includes redacted production Feishu runtime logs showing the original failure and after-fix completed/visible replies for the affected oversized preflight path.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted production Feishu runtime logs showing the original failure and after-fix completed/visible replies for the affected oversized preflight path.
Evidence reviewed

PR surface:

Source +82, Tests +142. Total +224 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 5 97 15 +82
Tests 4 142 0 +142
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 239 15 +224

What I checked:

  • Repository policy read: Read the full root AGENTS.md and the scoped src/agents/AGENTS.md; the review applied the OpenClaw guidance for whole-path PR review, session-state merge risk, and scoped agent code policy. (AGENTS.md:1, 2fbddce88182)
  • Current main preflight path: On current main, required preflight compaction is triggered by token or transcript-byte budget and calls compactEmbeddedAgentSession with trigger/context budget/current token data but no force metadata; failed required compaction then throws the user-visible preflight failure. (src/auto-reply/reply/agent-runner-memory.ts:869, 2fbddce88182)
  • Context engine force contract: The existing ContextEngine.compact public contract already defines force as forcing compaction below the default trigger threshold, so the PR uses an existing compatibility-sensitive flag rather than adding a new public plugin parameter. (src/context-engine/types.ts:337, 2fbddce88182)
  • Context-engine wrapper behavior: Current main forwards force to context engines only for manual compaction; the PR diff changes this wrapper so forced/preflight-required budget compaction also forwards force=true and internal runtimeContext diagnostics. (src/agents/embedded-agent-runner/compact.queued.ts:356)
  • Real behavior proof: The PR body supplies redacted production Feishu/OpenClaw logs showing the stale-runtime below-threshold preflight failure and later completed CardKit replies after loading the fixed runtime; the live check-runs query also showed the Real behavior proof check passing on the current PR head. (3b4747ead50e)
  • Current live PR state: The PR remains open, assigned to steipete, has proof supplied/sufficient labels, and carries compatibility plus session-state merge-risk labels; GitHub API did not provide a clean mergeable result during this read-only review. (3b4747ead50e)

Likely related people:

  • steipete: Recent commits on compaction, provider identity, and the embedded agent runtime touch the same compaction/session-state surfaces, and the live PR is assigned to this account. (role: recent area contributor and assigned reviewer; confidence: high; commits: aada44fca5ab, 4c33aaa86c16, bb46b79d3c14; files: src/agents/embedded-agent-runner/compact.queued.ts, src/auto-reply/reply/agent-runner-memory.ts, src/auto-reply/reply/followup-runner.ts)
  • pfrederiksen: Recent current-main work recovered raw missing-thread compaction failures across preflight, queued compaction, and CLI fallback paths, adjacent to this PR's forced preflight compaction behavior. (role: adjacent compaction recovery contributor; confidence: medium; commits: e69855e68c04; files: src/auto-reply/reply/agent-runner-memory.ts, src/agents/embedded-agent-runner/compact.queued.ts)
  • Jerry-Xin: Recent work added durable memoryFlush failure metadata in agent-runner-memory.ts, which shares the same preflight/memory maintenance decision surface touched by this PR. (role: recent auto-reply memory contributor; confidence: medium; commits: 4e84d0eaa547; files: src/auto-reply/reply/agent-runner-memory.ts)
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.

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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg: 🎁 locked until real behavior proof passes.

Details
  • No creature or rarity is rolled until proof passes.
  • Eggs are collectible flavor only; they do not affect labels, ratings, merge decisions, or automation.

@ArthurNie

Copy link
Copy Markdown
Contributor Author

Follow-up after ClawSweeper review:

  • Addressed the ContextEngine public contract concern in 5cf430b20602eeb0a4695ec408879c4c2d78c8ed.
    • forceReason and preflightCompactionTrigger are no longer added to the public ContextEngine.compact() params type.
    • The public compact API remains additive only on the existing force?: boolean path.
    • The diagnostic reason/trigger now travel through internal runtimeContext, which avoids expanding the plugin SDK contract.
  • Re-ran the focused regression suite locally after the change:
./node_modules/.bin/vitest run src/auto-reply/reply/agent-runner-memory.test.ts src/agents/embedded-agent-runner/compact.hooks.test.ts --maxWorkers=1

Test Files  3 passed (3)
Tests       144 passed (144)

Remaining known blocker:

  • I have not added a Real behavior proof section yet because I do not want to overclaim. The branch has not been deployed into the live OpenClaw runtime, so I do not currently have honest after-fix evidence from a real oversized OpenClaw turn. The linked issue contains pre-fix live evidence (Preflight compaction required but failed: below threshold), while this PR currently has source-level regression proof. A real proof run will require either deploying this branch to a real setup and replaying/triggering an oversized preflight turn, or a maintainer applying proof: override if source+regression proof is sufficient for this narrow fix.

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 28, 2026
@ArthurNie

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 28, 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 rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels May 28, 2026
@ArthurNie

Copy link
Copy Markdown
Contributor Author

Correction to my earlier proof update: a stronger live validation in the affected Feishu group just reproduced the original failure, so this should not be treated as proven yet.

Live production failure:

chat: oc_5cc1621461880ae8dccec0147e40896b (Merlin 进化论)
session: agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b
message: om_x100b6e49341518b4c398dd246766af6

2026-05-28T13:50:41.213+08:00 message dispatch completed: channel=feishu sessionKey=agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b outcome=error error="Error: Preflight compaction required but failed: below threshold"
2026-05-28T13:50:41.217+08:00 message processed: channel=feishu chatId=chat:oc_5cc1621461880ae8dccec0147e40896b messageId=om_x100b6e49341518b4c398dd246766af6 outcome=error error="Error: Preflight compaction required but failed: below threshold"
2026-05-28T13:50:41.222+08:00 feishu[default][msg:om_x100b6e49341518b4c398dd246766af6]: dispatch failed: Error: Preflight compaction required but failed: below threshold

The earlier simple probe turns (FEISHU_DM_OK / FEISHU_EVOLUTION_OK) were not representative enough; they proved simple dispatch still worked, but not the oversized preflight-vs-threshold path. I updated the PR body accordingly and will treat this as still needing a follow-up fix before merge.

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: supplied External PR includes structured after-fix real behavior proof. labels May 28, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels May 28, 2026
@ArthurNie

Copy link
Copy Markdown
Contributor Author

Correction/update to the earlier failed-proof note:

The failed live validation at 13:50 was caused by a stale running gateway process, not by the installed package contents after restart.

  • Installed package / CLI: 2026.5.26
  • Stale gateway during the failure: 2026.5.22, PID 3752207, started Wed May 27 09:52:55 2026
  • After real systemd restart: Gateway 2026.5.26, PID 3953195, started Thu May 28 14:55:53 2026, connectivity probe ok

Pre-restart failure in the affected Feishu group:

2026-05-28T13:50:41.213+08:00 message dispatch completed: channel=feishu sessionKey=agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b outcome=error error="Error: Preflight compaction required but failed: below threshold"

Post-restart validation in the same affected Feishu group:

2026-05-28T15:12:30.587+08:00 feishu[default]: dispatching to agent (session=agent:main:feishu:group:oc_5cc1621461880ae8dccec0147e40896b)
2026-05-28T15:16:58.070+08:00 feishu[default][msg:om_x100b6e4ae31ba894c32594bf37c25d4]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-05-28T15:16:59.089+08:00 feishu[default][msg:om_x100b6e4ae31ba894c32594bf37c25d4]: reply completed, card finalized (elapsedMs=268502, isCardKit=true)

A subsequent real project turn (merge 483,下一步) also produced a visible Feishu CardKit reply and continued the workflow. No post-restart occurrence of Preflight compaction required but failed: below threshold was observed for the affected group.

I updated the PR body accordingly. Scope boundary: this is proof for the below threshold preflight failure path after loading the fixed runtime; it is not a blanket claim that every future high-context overflow case is solved.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 28, 2026
@BingqingLyu

This comment was marked as spam.

@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 29, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. and removed merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels May 29, 2026
@ArthurNie

Copy link
Copy Markdown
Contributor Author

Fresh related observation from the same production incident window:

For this PR specifically, I agree the remaining blocker is exact-head/head-built proof for the oversized preflight path. The production restart proof showed the installed package/runtime behavior after restart, but the maintainer concern that it was not exact PR-head proof is fair.

@ArthurNie

Copy link
Copy Markdown
Contributor Author

Status refresh after checking current PR checks without pulling the repo locally:

  • The latest Real behavior proof check is now passing.
  • dependency-guard is currently skipped on the latest visible run, not a current hard failure.
  • The remaining hard failing check I can see is checks-node-agentic-control-plane-runtime.
  • Its log points at two gateway shared-token suites failing during module mocking/hoisting, not at the preflight compaction patch itself:
    • src/gateway/server.shared-token-hot-reload.test.ts
    • src/gateway/server.shared-token-session-rotation.test.ts
    • error: [vitest] There was an error when mocking a module... make sure there are no top level variables inside, since this call is hoisted

Given the proof check is now green, this may need either a maintainer rerun/refresh of the unrelated runtime shard or a separate fix for those gateway shared-token tests. I’m not treating this as exact-head merge-ready yet because the status label still says needs proof and the runtime shard is red.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels May 31, 2026
@steipete steipete self-assigned this May 31, 2026
@steipete
steipete force-pushed the fix-preflight-force-compaction branch from 3b4747e to 18daa7a Compare May 31, 2026 18:43
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 31, 2026
@steipete

Copy link
Copy Markdown
Contributor

Land-ready after maintainer fixups.

Summary:

  • Forced preflight compaction now treats required compaction as a hard gate: compact, skip only explicit harmless no-op reasons, or fail with Preflight compaction required but failed: ....
  • Direct and queued reply paths now surface that preflight-required failure as a visible source-suppression-safe recovery message before starting the agent.
  • Unrelated queued preflight failures still reject instead of being converted into a compaction notice.

Local proof:

  • node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-direct-runtime-config.test.ts src/auto-reply/reply/followup-runner.test.ts src/auto-reply/reply/agent-runner-memory.test.ts src/agents/embedded-agent-runner/compact.hooks.test.ts --maxWorkers=1 passed: 2 Vitest shards, 180 tests.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --prompt ... passed clean: no accepted/actionable findings.

CI proof:

  • CI run 26721201572 passed, including preflight, check-guards, check-lint, check-test-types, checks-node-agentic-agents-core, checks-node-auto-reply-reply-agent-runner, and ci-timings-summary.
  • Real behavior proof run 26721206824 passed.
  • Critical Quality agent-runtime-boundary run 26721201571 passed.
  • CodeQL Security High jobs, OpenGrep PR diff, dependency guard, workflow sanity, labeler, and auto-response passed.

Known proof gaps: none.

@steipete
steipete merged commit 9d54285 into openclaw:main May 31, 2026
152 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: supplied External PR includes structured after-fix real behavior proof. 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.

Feishu DM messages visible in Feishu history but missing from OpenClaw session

4 participants