openclaw - ✅(Solved) Fix [Bug]: openclaw update completion cache refresh fails on 2026.4.9 with missing qa/scenarios/index.md [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#63768Fetched 2026-04-10 03:41:56
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
2
Author
Participants
Timeline (top)
cross-referenced ×1

openclaw update succeeds overall on 2026.4.9, but the post-update completion cache refresh fails with:

Completion cache update failed ([openclaw] Failed to start CLI: Error: qa scenario pack not found: qa/scenarios/index.md

Error Message

Completion cache update failed ([openclaw] Failed to start CLI: Error: qa scenario pack not found: qa/scenarios/index.md

Root Cause

Root cause found in installed dist

This does not look like a simple “missing packaged file” problem anymore.

Fix Action

Fixed

PR fix notes

PR #63781: fix(qa-lab): lazy-load discovery refs for completion paths

Description (problem / solution / changelog)

Summary

  • lazy-load QA discovery refs instead of resolving them at module import time
  • fall back to default discovery refs if the QA scenario pack/config is unavailable
  • prevent non-QA completion/registration paths from crashing on missing QA scenario content

Root cause

extensions/qa-lab/src/discovery-eval.ts eagerly resolved discovery refs at module import time via readQaScenarioExecutionConfig("source-docs-discovery-report"), which flowed into QA scenario-pack loading even for non-QA CLI/completion paths.

Validation

  • node node_modules/vitest/vitest.mjs run extensions/qa-lab/src/scenario-catalog.test.ts --reporter=dot

Closes #63768

Changed files

  • extensions/qa-lab/src/discovery-eval.ts (modified, +20/-11)

Code Example

Completion cache update failed ([openclaw] Failed to start CLI: Error: qa scenario pack not found: qa/scenarios/index.md

---

openclaw update

---

Completion cache update failed ([openclaw] Failed to start CLI: Error: qa scenario pack not found: qa/scenarios/index.md

---

openclaw status

---

ls /usr/lib/node_modules/openclaw/dist/qa/scenarios/index.md

---

ls qa/scenarios/index.md

---

openclaw completion --help

---

qa scenario pack not found: qa/scenarios/index.md

---

const REQUIRED_DISCOVERY_REFS_LOWER = readRequiredDiscoveryRefs().map(...)
RAW_BUFFERClick to expand / collapse

Summary

openclaw update succeeds overall on 2026.4.9, but the post-update completion cache refresh fails with:

Completion cache update failed ([openclaw] Failed to start CLI: Error: qa scenario pack not found: qa/scenarios/index.md

Environment

  • Update path: openclaw update
  • Before: 2026.4.2
  • After: 2026.4.9
  • Host: Linux

What succeeded

  • Package manager update completed successfully
  • Doctor checks completed successfully
  • Daemon restart completed successfully
  • openclaw status reports the gateway/service healthy on 2026.4.9

What failed

During the update flow, completion cache refresh failed with a missing QA scenario pack path.

Reproduction

  1. Run:
    openclaw update
  2. Observe the update succeeds overall, but the post-update completion cache step reports:
    Completion cache update failed ([openclaw] Failed to start CLI: Error: qa scenario pack not found: qa/scenarios/index.md

Validation performed

  • Verified the installed app is running normally after update:
    openclaw status
  • Verified the referenced path is missing from the installed package:
    ls /usr/lib/node_modules/openclaw/dist/qa/scenarios/index.md
    Result: file does not exist.
  • Verified the source workspace also does not contain that path:
    ls qa/scenarios/index.md
    Result: file does not exist.
  • Verified the public completion command itself still exists:
    openclaw completion --help

Root cause found in installed dist

This does not look like a simple “missing packaged file” problem anymore.

The installed 2026.4.9 build contains this call chain in:

  • /usr/lib/node_modules/openclaw/dist/suite-BW4kSK9C.js

Observed chain:

  1. readRequiredDiscoveryRefs()
  2. readQaScenarioExecutionConfig("source-docs-discovery-report")
  3. readQaScenarioById(...)
  4. readQaScenarioPack()
  5. throws:
    qa scenario pack not found: qa/scenarios/index.md

Critically, the bundle also contains a top-level eager initialization:

const REQUIRED_DISCOVERY_REFS_LOWER = readRequiredDiscoveryRefs().map(...)

That means importing the relevant CLI/completion registration path can trigger QA scenario loading at module import time, even when the user is not running QA flows.

Current diagnosis

The real bug appears to be:

  • completion cache refresh / command registration is importing a QA-related module path
  • that path performs eager top-level initialization
  • the eager initialization requires a QA scenario pack path that does not exist in the current code/package
  • therefore update finishes, but completion cache refresh fails afterwards

Impact

  • Main update succeeds and the service remains usable
  • Completion cache refresh fails after update
  • Non-QA CLI flows are coupled to QA scenario loading more aggressively than they should be

Expected behavior

  • openclaw update should complete without completion-cache errors
  • completion/registration paths should not eagerly require QA scenario packs in non-QA flows
  • missing QA scenario content should be lazy-loaded, gated, or safely skipped outside QA execution paths

Suggested fix direction

Likely fix is not to hand-create qa/scenarios/index.md on user machines.

Instead:

  • remove or guard the top-level eager initialization that calls readRequiredDiscoveryRefs()
  • make QA discovery refs lazy / on-demand
  • ensure completion cache refresh does not import QA scenario content unless the QA path is actually being used

extent analysis

TL;DR

The most likely fix is to modify the code to lazy-load QA scenario packs or remove the eager initialization that causes the completion cache refresh to fail.

Guidance

  • Identify and modify the readRequiredDiscoveryRefs() function to lazy-load QA discovery references instead of performing eager initialization.
  • Review the import chain and ensure that QA-related modules are only imported when necessary, avoiding unnecessary coupling between non-QA CLI flows and QA scenario loading.
  • Consider adding a check to safely skip or gate the loading of QA scenario packs when they are not required, preventing the completion cache refresh from failing.

Example

// Before
const REQUIRED_DISCOVERY_REFS_LOWER = readRequiredDiscoveryRefs().map(...)

// After (lazy-loading example)
let requiredDiscoveryRefsLower = null
function getRequiredDiscoveryRefsLower() {
  if (!requiredDiscoveryRefsLower) {
    requiredDiscoveryRefsLower = readRequiredDiscoveryRefs().map(...)
  }
  return requiredDiscoveryRefsLower
}

Notes

The provided diagnosis suggests that the issue is due to the eager initialization of QA scenario loading, which is not necessary for non-QA CLI flows. Modifying the code to lazy-load QA scenario packs or removing the eager initialization should resolve the completion cache refresh failure.

Recommendation

Apply a workaround by modifying the code to lazy-load QA scenario packs, as this approach addresses the root cause of the issue and ensures that QA discovery references are only loaded when necessary.

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…

FAQ

Expected behavior

  • openclaw update should complete without completion-cache errors
  • completion/registration paths should not eagerly require QA scenario packs in non-QA flows
  • missing QA scenario content should be lazy-loaded, gated, or safely skipped outside QA execution paths

Still need to ship something?

×6

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

Back to top recommendations

TRENDING