openclaw - ✅(Solved) Fix skills.test.ts: workflows_review command missing in buildWorkspaceSkillCommandSpecs (pre-existing on main) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#67965Fetched 2026-04-17 08:28:49
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×2cross-referenced ×1

src/agents/skills.test.ts:248buildWorkspaceSkillCommandSpecs > includes enabled Claude bundle markdown commands as native OpenClaw slash commands — is failing on main HEAD.

Error Message

FAIL  src/agents/skills.test.ts > buildWorkspaceSkillCommandSpecs > includes enabled Claude bundle markdown commands as native OpenClaw slash commands
AssertionError: expected [] to deeply equal ArrayContaining{…}
Expected: arrayContaining [ objectContaining {
  "description": "Review code with a structured checklist",
  "name": "workflows_review",
  "promptTemplate": "Review the branch carefully.",
  "skillName": "workflows:review"
} ]
Received: []
 ❯ src/agents/skills.test.ts:248:22

The test builds a compound-bundle plugin fixture with a workflows-review.md markdown command and expects buildWorkspaceSkillCommandSpecs to surface it as a native slash command. The returned commands array is empty.

Root Cause

src/agents/skills.test.ts:248buildWorkspaceSkillCommandSpecs > includes enabled Claude bundle markdown commands as native OpenClaw slash commands — is failing on main HEAD.

Fix Action

Fixed

PR fix notes

PR #67278: fix(sessions): skip A2A flow for persistent sessions

Description (problem / solution / changelog)

Summary

  • Persistent sessions (spawnMode=session) accumulate internal A2A messages (ping-pong rounds + announce step) as permanent User messages in their transcript
  • These polluted messages are replayed on session resume, causing the agent to process stale internal directives and get stuck
  • Skip the entire A2A flow when the target session is persistent by checking spawnMode from the subagent registry

Root Cause

runSessionsSendA2AFlow writes all ping-pong and announce messages as permanent User messages into the target session's store. For oneshot sessions this is harmless (session is discarded after use), but for persistent sessions these messages accumulate and are replayed on every resume via session/load.

Why A2A skip is safe for persistent sessions

Multi-round cross-review workflows are orchestrated by the main agent's explicit sessions_send calls, not by A2A ping-pong. Skipping A2A does not affect any existing workflow.

Test plan

  • Spawn a persistent session, send multiple messages — verify no A2A messages appear in session transcript
  • Verify oneshot sessions still get A2A flow as before
  • Run workflow with persistent agents — verify cross-review still works via main agent orchestration

🤖 Generated with Claude Code

Changed files

  • src/agents/subagent-registry.ts (modified, +55/-2)
  • src/agents/tools/sessions-send-tool.ts (modified, +9/-1)
  • src/gateway/session-reset-service.ts (modified, +23/-1)

Code Example

FAIL  src/agents/skills.test.ts > buildWorkspaceSkillCommandSpecs > includes enabled Claude bundle markdown commands as native OpenClaw slash commands
AssertionError: expected [] to deeply equal ArrayContaining{}
Expected: arrayContaining [ objectContaining {
  "description": "Review code with a structured checklist",
  "name": "workflows_review",
  "promptTemplate": "Review the branch carefully.",
  "skillName": "workflows:review"
} ]
Received: []
 ❯ src/agents/skills.test.ts:248:22
RAW_BUFFERClick to expand / collapse

Summary

src/agents/skills.test.ts:248buildWorkspaceSkillCommandSpecs > includes enabled Claude bundle markdown commands as native OpenClaw slash commands — is failing on main HEAD.

Repro

Error

FAIL  src/agents/skills.test.ts > buildWorkspaceSkillCommandSpecs > includes enabled Claude bundle markdown commands as native OpenClaw slash commands
AssertionError: expected [] to deeply equal ArrayContaining{…}
Expected: arrayContaining [ objectContaining {
  "description": "Review code with a structured checklist",
  "name": "workflows_review",
  "promptTemplate": "Review the branch carefully.",
  "skillName": "workflows:review"
} ]
Received: []
 ❯ src/agents/skills.test.ts:248:22

The test builds a compound-bundle plugin fixture with a workflows-review.md markdown command and expects buildWorkspaceSkillCommandSpecs to surface it as a native slash command. The returned commands array is empty.

Suspected Cause

Recent plugin-discovery cache changes on main:

  • 9da4d5f5 fix(plugins): reuse shared discovery cache
  • 35395089 test(plugins): address discovery review feedback
  • 6b45ba88 fix: reuse shared plugin discovery cache across workspaces (#67940)

The shared cache may be leaking discovery state across test files, masking the compound-bundle fixture in this specific test's isolated workspace.

Impact

Blocks CI on any PR rebased onto affected commits — including PR #67278 (fix(sessions): skip A2A flow for persistent sessions), where this check is unrelated to the PR's scope.

extent analysis

TL;DR

The test failure is likely due to the shared plugin discovery cache leaking state across test files, causing the compound-bundle fixture to be masked in the isolated workspace.

Guidance

  • Investigate the recent plugin-discovery cache changes (commits 9da4d5f5, 35395089, and 6b45ba88) to determine if they are indeed causing the cache to leak state across test files.
  • Verify that the buildWorkspaceSkillCommandSpecs function is correctly clearing the cache before building the command specs for each test.
  • Consider adding a test-specific cache reset or isolation mechanism to prevent state leakage between tests.
  • Review the test setup and teardown processes to ensure that the workspace is properly isolated and reset between tests.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The suspected cause is based on the recent changes to the plugin-discovery cache, but further investigation is needed to confirm the root cause of the issue.

Recommendation

Apply a workaround by adding a test-specific cache reset or isolation mechanism to prevent state leakage between tests, as the root cause is not yet fully understood and an upgrade to a fixed version is not implied.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING