Skip to content

fix(agents): deliver native /compact replies through source suppression#90212

Merged
obviyus merged 1 commit into
openclaw:mainfrom
snowzlm:fix/agents-compact-feishu-delivery
Jun 9, 2026
Merged

fix(agents): deliver native /compact replies through source suppression#90212
obviyus merged 1 commit into
openclaw:mainfrom
snowzlm:fix/agents-compact-feishu-delivery

Conversation

@snowzlm

@snowzlm snowzlm commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses the native /compact reply-loss path from #90185 and the related compaction notification lane where configured hook messages must not suppress the built-in notifyUser notices.

This PR covers these two confirmed paths:

  1. Native /compact fast-path replies could return before the full inline-action command marker was applied. Channels using message_tool_only source-reply delivery then treated the terminal command reply as ordinary source content and suppressed it, producing queuedFinal=false, replies=0 even though compaction ran.
  2. Configured compaction hook messages could suppress the built-in notifyUser compaction notice because the notice lived behind an else if branch.

This PR intentionally does not claim to fix the separate CardKit streaming/rendering corruption mentioned around the issue; that remains separate scope if maintainers want it handled in another patch.

Root cause

Native slash commands can be handled before workspace bootstrap and before the normal inline command path. The full inline command path already marks terminal command replies with deliverDespiteSourceReplySuppression; the native slash fast path did not. That meant an explicit /compact result could be generated but later dropped by source-reply delivery policy in message-tool-only channels.

The compaction notice path had a separate branch-ordering issue: hook messages and the built-in notifyUser notice were mutually exclusive even though they are independent user-visible lanes.

Changes

  • Mark native slash fast-path replies with the same source-suppression bypass metadata used by the full inline command path.
  • Apply the marker to native slash status replies, direct command-handler replies such as /compact, directive replies, and inline replies returned from the fast path.
  • Keep compaction hook messages and built-in notifyUser notices independent.
  • Update the stale compaction notice comment so it matches the new behavior.
  • Add a regression test proving native /compact command-handler replies are marked for message-tool-only delivery.
  • Extend fast-path tests to assert native slash status/directive replies carry the delivery marker.
  • Keep bundled Feishu /compact routing coverage from the earlier patch.
  • Resolve the latest upstream merge conflict in src/commands/migrate/skill-selection-prompt.ts by keeping the compatibility alias explanation and latest-main deprecation wording. That merge-only follow-up does not alter the /compact delivery path.
  • Stabilize src/commands/agent-via-gateway.test.ts SIGTERM local-run waits after the latest main merge exposed a shard-order timing flake; production /compact delivery logic is unchanged.
  • Merge latest upstream main again and combine both SIGTERM test-stability fixes in src/commands/agent-via-gateway.test.ts: the PR keeps the per-test initialCalls baseline and the upstream abortListenerAttached.promise readiness wait. Production /compact delivery logic remains unchanged.

Real behavior proof

Behavior or issue addressed: visible reply loss for native /compact, plus the related compaction notice lane where hook messages and built-in notifyUser notices must both remain deliverable.

Real environment tested: Linux local OpenClaw checkout running the current PR head 881ce6d64c8f4a5ca4edd160a652f39688553abd as an isolated local gateway, connected by a WebChat WebSocket client. The model backend was a local mock OpenAI Responses provider so the proof did not depend on external model credentials. Gateway token, device identity material, loopback URL, and local filesystem paths are redacted/omitted.

Exact steps or command run after this patch: Started the PR-head gateway in isolated local mode, connected a WebChat WebSocket client, approved the local WebChat device, sent /compact through chat.send, waited for the final chat event, then read WebChat history. The captured command was node --import tsx .artifacts/proof-90185-live-webchat.ts against the current PR checkout.

Evidence after fix: Redacted live WebChat terminal output from the current PR head:

{
  "head": "881ce6d64c8f4a5ca4edd160a652f39688553abd",
  "mode": "isolated local WebChat websocket live run",
  "request": {
    "sessionKey": "main",
    "message": "/compact",
    "idempotencyKey": "proof-90185-1780629173685"
  },
  "connect": {
    "ok": true,
    "payloadType": "hello-ok",
    "auth": "<redacted>"
  },
  "send": {
    "ok": true,
    "payload": {
      "runId": "proof-90185-1780629173685",
      "status": "started"
    }
  },
  "finalEvent": {
    "event": "chat",
    "payload": {
      "runId": "proof-90185-1780629173685",
      "sessionKey": "agent:main:main",
      "state": "final",
      "message": {
        "role": "assistant",
        "content": [
          {
            "type": "text",
            "text": "⚙️ Compaction skipped: no real conversation messages yet • Context ?/128k"
          }
        ]
      }
    }
  },
  "historySummary": {
    "ok": true,
    "messageCount": 2,
    "compactMessageCount": 2
  }
}

Observed result after fix: The current head delivered a visible WebChat assistant reply for /compact after dispatch: ⚙️ Compaction skipped: no real conversation messages yet • Context ?/128k. WebChat history contained both user: /compact and the assistant compaction reply, so the old message_tool_only silent-drop path is no longer reproduced.

What was not tested: A live Feishu tenant screenshot/video was not attached. WebChat was used as the live transport-visible proof path requested by ClawSweeper, with sensitive runtime details redacted.

Before-fix reproduction / root-cause proof

A source-level reproduction compared the current base (upstream/main) with this PR head:

{
  "baseRef": "81eee470451d6039f899e52397111eea19926d80",
  "headRef": "881ce6d64c8f4a5ca4edd160a652f39688553abd",
  "reproduction": {
    "baseNativeSlashFastPathHasDeliveryMarker": false,
    "headNativeSlashFastPathHasDeliveryMarker": true,
    "dispatchRequiresMarkerForSuppressedDelivery": true
  }
}

Relevant base excerpt from src/auto-reply/reply/get-reply-native-slash-fast-path.ts:

return { handled: true, reply: commandResult.reply };
return { handled: true, reply: directiveResult.reply };
return { handled: true, reply: inlineActionResult.reply };

That is the broken path: the native slash fast-path produced a terminal /compact reply, but returned it without the explicit-command delivery marker. Dispatch already requires deliverDespiteSourceReplySuppression to bypass message_tool_only source suppression, so an unmarked native slash reply can be generated and then dropped.

Relevant PR-head excerpt:

function markNativeSlashCommandReplyForDelivery(...)
reply: markNativeSlashCommandReplyForDelivery(...)
return { handled: true, reply: markNativeSlashCommandReplyForDelivery(commandResult.reply) };
return { handled: true, reply: markNativeSlashCommandReplyForDelivery(directiveResult.reply) };
reply: markNativeSlashCommandReplyForDelivery(inlineActionResult.reply)

Hook messages + built-in notifyUser notices

The second path is covered by the focused regression test added in this PR:

src/auto-reply/reply/agent-runner-execution.test.ts
- delivers compaction hook messages alongside notifyUser notices (#90185)

Expected visible sequence under compaction.notifyUser: true and hook-provided messages:

Hook before
🧹 Compacting context...
Hook after
🧹 Compaction complete

This verifies hook messages are additive and no longer suppress the built-in notifyUser compaction notices.

Validation after fix

Current-head local focused validation after merging latest upstream main:

CI=true node scripts/run-vitest.mjs run \
  --config test/vitest/vitest.auto-reply-reply.config.ts \
  src/auto-reply/reply/get-reply-native-slash-fast-path.test.ts \
  src/auto-reply/reply/get-reply.fast-path.test.ts \
  src/auto-reply/reply/agent-runner-execution.test.ts
# 3 files passed, 200 tests passed

CI=true node scripts/run-vitest.mjs run \
  --config test/vitest/vitest.extension-feishu.config.ts \
  extensions/feishu/src/bot.test.ts
# 1 file passed, 74 tests passed

CI=true node scripts/run-vitest.mjs run \
  --config test/vitest/vitest.unit-fast.config.ts \
  src/security/audit-config-include-perms.test.ts
# 1 file passed, 1 test passed

CI=true node scripts/run-tsgo.mjs \
  -p test/tsconfig/tsconfig.core.test.json \
  --incremental \
  --tsBuildInfoFile .artifacts/tsgo-cache/core-test-pr90212-merge.tsbuildinfo
# passed

CI=true ./node_modules/.bin/oxfmt --check --threads=1 \
  extensions/feishu/src/bot.test.ts \
  src/auto-reply/reply/agent-runner-execution.test.ts \
  src/auto-reply/reply/agent-runner-execution.ts \
  src/auto-reply/reply/get-reply-native-slash-fast-path.test.ts \
  src/auto-reply/reply/get-reply-native-slash-fast-path.ts \
  src/auto-reply/reply/get-reply.fast-path.test.ts \
  src/commands/migrate.ts \
  src/commands/migrate/skill-selection-prompt.ts \
  src/infra/json-file.ts \
  src/plugin-sdk/json-store.ts \
  src/security/audit-config-include-perms.test.ts \
  test/scripts/lint-suppressions.test.ts
# All matched files use the correct format.

git diff --check openclaw-main..HEAD
# passed

Current GitHub PR status for 881ce6d64c8f4a5ca4edd160a652f39688553abd immediately after the latest-main merge-resolution push:

mergeable: MERGEABLE
conflicts: resolved
cloud checks: running on current head

Additional validation for the shard exposed by CI after the latest main merge:

OPENCLAW_VITEST_INCLUDE_FILE=/tmp/pr90212-agentic-commands-agent-channel-includes.json \
OPENCLAW_VITEST_SHARD_NAME=agentic-commands-agent-channel \
OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 \
OPENCLAW_TEST_PROJECTS_PARALLEL=2 \
NODE_OPTIONS=--max-old-space-size=8192 \
CI=true pnpm exec node scripts/test-projects.mjs test/vitest/vitest.commands.config.ts
# 32 files passed, 313 tests passed

Risk / safety

  • Narrow scope: only explicit native slash command replies returned by the fast path get the same delivery marker already used by the normal inline command path.
  • Does not broaden ambient message delivery; the marker is applied only inside the native slash command fast path.
  • Maintains existing sendPolicy: deny behavior because final dispatch still enforces send policy.
  • Keeps room-event safeguards: dispatch still requires an explicit command turn for marked replies in room events.

Notes

The issue references separate CardKit streaming rendering problems via related issues. This PR fixes the /compact reply-loss path and the compaction notice suppression path tracked here; it does not modify unrelated streaming card rendering code.

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 4, 2026
@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 8, 2026, 11:59 PM ET / 03:59 UTC.

Summary
The PR marks native slash fast-path command replies for source-suppression-safe delivery, makes compaction hook notices additive with built-in notifyUser notices, and adds focused core/Feishu regression coverage plus test-stability cleanup.

PR surface: Source 0, Tests +75. Total +75 across 18 files.

Reproducibility: yes. source-reproducible: dispatch suppresses message_tool_only final replies unless an explicit command payload carries deliverDespiteSourceReplySuppression, and current main still has an unmarked native slash inline-action reply path.

Review metrics: 1 noteworthy metric.

  • Delivery semantics changed: 2 reply lanes changed. The PR changes native slash command terminal replies and compaction notice/hook delivery ordering, both of which can affect what users see in channels.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
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:

  • none.

Risk before merge

  • [P1] The PR intentionally lets marked native slash command replies bypass message_tool_only source suppression when explicit-command and send-policy gates allow it; maintainers should accept that delivery semantic before merge.
  • [P1] The supplied real-behavior proof is WebChat rather than a live Feishu tenant recording, so Feishu-specific rendering remains unproven if maintainers require transport-specific evidence.

Maintainer options:

  1. Accept command reply visibility (recommended)
    Merge after maintainer review if native slash command replies should stay visible under message_tool_only while existing explicit-command and send-policy gates still apply.
  2. Require Feishu-specific proof
    Pause merge if maintainers want a live Feishu tenant recording before accepting the channel-facing behavior.

Next step before merge

  • No automated repair is indicated; maintainers need to decide whether to accept the deliberate message-delivery behavior and optional Feishu-specific proof expectation.

Security
Cleared: No concrete security or supply-chain concern was found; the security-adjacent edit only isolates a focused test import.

Review details

Best possible solution:

Land the narrow core delivery fix after maintainer acceptance of the command-reply visibility semantic, then close the linked user report after merge with the WebChat proof and focused tests.

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

Yes, source-reproducible: dispatch suppresses message_tool_only final replies unless an explicit command payload carries deliverDespiteSourceReplySuppression, and current main still has an unmarked native slash inline-action reply path.

Is this the best way to solve the issue?

Yes, with maintainer acceptance of the semantic: the PR reuses the existing command-reply marker and central dispatch gates instead of adding a Feishu-only or direct-channel bypass.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P1: The PR addresses visible reply loss for a core /compact command path affecting real channel workflows.
  • merge-risk: 🚨 message-delivery: The diff changes when native slash command replies can be delivered despite message_tool_only source-reply suppression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body supplies redacted live WebChat terminal output showing /compact delivered a visible assistant reply after the fix; latest merge inspection preserved the same delivery path.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies redacted live WebChat terminal output showing /compact delivered a visible assistant reply after the fix; latest merge inspection preserved the same delivery path.
Evidence reviewed

PR surface:

Source 0, Tests +75. Total +75 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 9 32 32 0
Tests 9 105 30 +75
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 137 62 +75

What I checked:

Likely related people:

  • vincentkoc: Current-main blame and recent history place the native slash fast-path, compaction notice handling, and dispatch suppression contract in commits by Vincent Koc. (role: recent area contributor; confidence: high; commits: f29248fa62fc, 280d1cb977c4; files: src/auto-reply/reply/get-reply-native-slash-fast-path.ts, src/auto-reply/reply/agent-runner-execution.ts, src/auto-reply/reply/dispatch-from-config.ts)
  • joelnishanth: Recent adjacent work introduced Telegram native /compact acknowledgement delivery, which is the same command-reply visibility problem class. (role: adjacent delivery contributor; confidence: medium; commits: 38a11944f4d4; files: src/auto-reply/reply/get-reply-native-slash-fast-path.ts)
  • Ayaan Zaidi: Recent adjacent dispatcher work kept compact acknowledgements visible, so this contributor is relevant for reviewing the command-ack delivery invariant. (role: adjacent delivery contributor; confidence: medium; commits: fff5261ade58; files: src/auto-reply/reply/get-reply-native-slash-fast-path.ts, src/auto-reply/reply/dispatch-from-config.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.

@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 Jun 4, 2026
@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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jun 4, 2026
@snowzlm snowzlm force-pushed the fix/agents-compact-feishu-delivery branch from 625b7ad to df98fff Compare June 4, 2026 07:41
@snowzlm snowzlm changed the title fix(agents): preserve compaction notifyUser notices with hooks fix(agents): deliver native /compact replies through source suppression Jun 4, 2026
@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 Jun 4, 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 Jun 4, 2026
@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 Jun 4, 2026
@snowzlm snowzlm force-pushed the fix/agents-compact-feishu-delivery branch from 61eca5a to e62637f Compare June 4, 2026 11:50
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jun 4, 2026
@openclaw-barnacle openclaw-barnacle Bot added the plugin: bonjour Plugin integration: bonjour label Jun 4, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 Jun 4, 2026
@snowzlm snowzlm force-pushed the fix/agents-compact-feishu-delivery branch from 7774c0a to 79e4ebf Compare June 4, 2026 17:14
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 4, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 5, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 5, 2026
@snowzlm

snowzlm commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 5, 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.

@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed 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. labels Jun 5, 2026
@snowzlm

snowzlm commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated the PR body for current head c42c4a225185029c32e4df73b7fe9f5b31310a98 with:

  • fresh current-head WebChat live proof for /compact visible reply delivery;
  • current-head source/root-cause reproduction showing base lacks the native slash delivery marker and head has it;
  • a narrower scope statement: this addresses the native /compact reply-loss and compaction notifyUser/hook notice paths from [Core bug] /compact reply silently dropped (replies=0) on all channels in 2026.6.1 #90185, but does not claim to fix the separate CardKit streaming/rendering issue;
  • merge-conflict resolution note explaining the only latest upstream conflict was the migration prompt alias comment and did not alter the /compact delivery path;
  • current validation summary: focused local checks passed, PR is MERGEABLE, merge state is CLEAN, and there are no pending checks for the current head.

@clawsweeper

clawsweeper Bot commented Jun 5, 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:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 5, 2026
@snowzlm

snowzlm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed this PR onto latest main and resolved the only merge conflict in src/commands/migrate/skill-selection-prompt.ts. The resolution keeps latest-main deprecation wording and does not alter the /compact delivery path. Updated the PR body with current head 83771dc and focused validation. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@snowzlm

snowzlm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

The actionlint check failure on the previous refreshed head was a GitHub release download 504 while installing actionlint, not a repository lint error. I amended the merge commit without content changes to rerun checks on current head 6897161 and updated the PR body head reference accordingly.

@snowzlm

snowzlm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

The previous refreshed head hit another external install 504 in the OpenGrep changed-path scanner. I amended again without content changes to rerun checks on current head a7b5127; PR body head reference is updated.

@clawsweeper

clawsweeper Bot commented Jun 8, 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:

@snowzlm

snowzlm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Updated this PR to current head 7809a85 after merging the latest main. The new commit stabilizes the SIGTERM local-agent wait in src/commands/agent-via-gateway.test.ts after the refreshed CI exposed a shard-order timing flake; it does not change the /compact delivery production path. Local focused validation passed, including the full agentic-commands-agent-channel shard (32 files / 313 tests), auto-reply focused tests, Feishu bot tests, unit-fast security test, tsgo, oxfmt, and diff check. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@snowzlm

snowzlm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged the latest main again and resolved the new conflict in src/commands/agent-via-gateway.test.ts by preserving both test-stability fixes: the PR-side per-test initialCalls baseline and upstream's abortListenerAttached readiness wait before SIGTERM. Production /compact delivery logic is unchanged. Current head is 881ce6d. Local validation passed: agent-via-gateway.test.ts (55 tests), full agentic-commands-agent-channel shard (32 files / 313 tests), auto-reply focused tests (203 tests), Feishu bot tests (74 tests), unit-fast security test, tsgo, oxfmt, and diff check. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 8, 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 commented Jun 9, 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:

@snowzlm

snowzlm commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Updated this PR on top of the latest openclaw/main and resolved the current merge conflicts.

Conflict resolution notes:

  • Preserved the native /compact source-suppression delivery marker by using the current markCommandReplyForDelivery helper.
  • Kept upstream typing cleanup behavior for native slash fast-path terminal/directive replies.
  • Combined the agent-via-gateway test timing hardening from both branches: baseline call accounting plus signal-listener readiness wait.
  • Preserved independent compaction hook-message and user-notice delivery behavior in the agent runner path.

Verification:

  • git diff --check passed.
  • pnpm exec oxfmt --check --threads=1 ... passed on the resolved files.
  • pnpm check:no-conflict-markers passed.
  • GitHub Actions are passing across the main check matrix; the remaining visible item at the time of this comment is the long-running CodeQL/security job.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 9, 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:

@obviyus

obviyus commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Landed via rebase onto main.

  • Scoped tests: git diff --cached --check; ./node_modules/.bin/oxfmt --check --threads=1 extensions/feishu/src/bot.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/agent-runner-execution.ts src/auto-reply/reply/followup-runner.test.ts src/auto-reply/reply/followup-runner.ts src/auto-reply/reply/get-reply-native-slash-fast-path.test.ts src/auto-reply/reply/get-reply-native-slash-fast-path.ts src/auto-reply/reply/get-reply.fast-path.test.ts; CI=true node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/followup-runner.test.ts src/auto-reply/reply/get-reply-native-slash-fast-path.test.ts src/auto-reply/reply/get-reply.fast-path.test.ts extensions/feishu/src/bot.test.ts
  • Review: .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main clean, no accepted/actionable findings.
  • Changelog: not updated; release generation owns CHANGELOG.md for normal PRs.
  • Land commit: 2969029
  • Merge commit: 98d5c46

Thanks @snowzlm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. 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.

2 participants