Skip to content

test(qa): add Active Memory recall coverage - #118963

Merged
vincentkoc merged 1 commit into
mainfrom
qa-b3-active-memory-recall-20260803
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
qa-b3-active-memory-recall-20260803

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member
Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.

What Problem This Solves

Active Memory coverage lacked deterministic, single-owner proof for five accepted
session-memory behaviors. The existing scenarios mixed visible channel behavior
with helper-chain behavior and used loose request matching that could not prove
the exact recall sequence.

Why This Change Was Made

This test-only change splits the proof into two focused surfaces:

  • A cold first-turn scenario starts a fresh gateway with trigger-only Active
    Memory enabled, sends one QA-channel direct message, and proves the first
    visible reply and sole main-model request contain the injected memory without
    a helper search.
  • The preprompt scenario proves a disabled one-request baseline and an exact
    four-request active trace: three causally linked memory_search/memory_get
    helper requests followed by one main request. It verifies the matching call
    IDs, memory path and text, injected envelope, recorded agent-history reply,
    debug evidence, and transient-session cleanup.

The existing cross-conversation scenario retains its negative controls while
moving overlapping ownership to secondary coverage.

User Impact

There is no production or runtime behavior change. Maintainers gain deterministic
QA coverage with exactly one primary owner for each accepted Active Memory
behavior.

Production LOC delta: 0.

Evidence

  • Focused catalog and coverage validation: 68/68 tests passed across two
    test files.
  • Formatting and git diff --check: passed.
  • Direct AWS mock runs:
    • run_9bb2144792d4: preprompt history/helper-chain scenario, 1 passed, 0 failed, 0 skipped.
    • run_ab910d1c29bf: remember-across-conversations scenario, 1 passed, 0 failed, 0 skipped.
    • run_43c936392bc2: combined selected scenarios, 3 passed, 0 failed, 0 skipped.
  • Exact-head evidence for fce7714002d8d92a231784080e0d53b0f626be40:
    • run_1bda0f411abe: fresh remote checkout SHA/status gate passed.
    • run_5d0cf14ab1f3: focused catalog/coverage tests passed 68/68 and the combined mock suite passed 3/3.
    • Independent Sol/high autoreview: clean at 0.99, with no accepted or actionable findings.
    • TruffleHog: clean.
  • Combined mock-gateway verdict:
{
  "providerMode": "mock-openai",
  "runId": "run_43c936392bc2",
  "counts": {
    "total": 3,
    "passed": 3,
    "failed": 0,
    "skipped": 0
  },
  "primaryOwners": {
    "session-memory.active-memory-active-recall": "active-memory-cold-first-turn-trigger-recall",
    "session-memory.active-memory-qa-channel": "active-memory-cold-first-turn-trigger-recall",
    "session-memory.memory-tools-active-recall": "active-memory-preprompt-recall",
    "session-memory.active-memory-recall": "active-memory-preprompt-recall",
    "session-memory.active-memory-memory-recall": "active-memory-preprompt-recall"
  }
}

Expected secondary coverage remains in place:

  • remember-across-conversations: active-memory-active-recall,
    active-memory-qa-channel, and active-memory-recall.
  • active-memory-preprompt-recall: memory-recall.

No changelog entry is required for this test-only change.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:08 PM ET / 21:08 UTC.

ClawSweeper review

What this changes

This PR adds a QA Lab scenario for trigger-tagged Active Memory on a fresh QA-channel turn, tightens the existing preprompt recall trace, and moves overlapping coverage IDs to secondary ownership.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this draft PR open for maintainer review. It is a member-authored, maintainer-labeled test-only change, and the branch’s new cold-turn scenario follows the current Active Memory trigger-recall owner boundary; static review found no discrete correctness or security defect in the YAML coverage reallocation.

Priority: P3
Reviewed head: fce7714002d8d92a231784080e0d53b0f626be40
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-evidenced QA-only patch with no static correctness finding; remaining approval is about adopting the asserted test contract.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR body nevertheless records direct mock-Gateway runs and a combined passing verdict.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR body nevertheless records direct mock-Gateway runs and a combined passing verdict.
Evidence reviewed 5 items Primary coverage semantics: The catalog parser accepts distinct primary and secondary IDs, while scorecard evidence counts only passing primary coverage as fulfillment. The PR assigns the two trigger-only behaviors to its dedicated scenario and moves the overlapping cross-conversation IDs to secondary coverage.
Runtime owner boundary: Current main resolves deterministic trigger recall before deep recall when Active Memory is enabled for the agent, the memory-core slot is active, and the destination is private; this matches the cold-first-turn scenario's intended owner boundary.
Scenario assertions: The added scenario asserts one outbound reply, no helper-search request, exactly one main request, and an injected Active Memory envelope containing the trigger-tagged fact. The strengthened preprompt scenario asserts the ordered three-request helper chain followed by the main request.
Findings None None.
Security None None.

How this fits together

QA Lab scenario files start an isolated mock Gateway, feed it QA-channel messages, and assert the model requests, agent history, and coverage IDs produced by Active Memory. Their results feed the QA scorecard, where passing primary coverage fulfills product-taxonomy evidence and secondary coverage remains diagnostic.

flowchart LR
  Scenario[QA memory scenarios] --> Harness[QA Lab flow harness]
  Harness --> Gateway[Isolated mock Gateway]
  Gateway --> Channel[QA channel inbound turn]
  Gateway --> Memory[Active Memory plugin]
  Memory --> Provider[Mock OpenAI requests]
  Provider --> Assertions[Trace and reply assertions]
  Assertions --> Scorecard[Coverage evidence scorecard]
Loading

Decision needed

Question Recommendation
Should the Active Memory owner accept these exact request-count and helper-call-order assertions as the canonical QA contract for trigger recall and deep recall? Accept the focused contract: Keep the dedicated cold-turn and preprompt scenarios as the primary owners for their respective recall behaviors.

Why: The patch is structurally sound but intentionally defines durable, implementation-specific QA ownership and trace expectations; the protected maintainer workflow requires the responsible reviewer to confirm that contract.

Before merge

  • Complete next step (P2) - A protected maintainer review should confirm the newly canonical request-trace contract; there is no mechanical repair finding for an automated worker.
Agent review details

Security

None.

PR surface

Other +163. Total +163 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 294 131 +163
Total 3 294 131 +163

Review metrics

Metric Value Why it matters
Production vs QA LOC production +0, QA scenarios +163 net The change is entirely test coverage, so merge review should focus on whether its asserted QA contract is stable rather than on runtime upgrade risk.

Stored data model

Persistent data-model change detected: migration/backfill/repair: qa/scenarios/memory/active-memory-preprompt-recall.yaml, unknown-data-model-change: qa/scenarios/memory/active-memory-cold-first-turn-trigger-recall.yaml, unknown-data-model-change: qa/scenarios/memory/active-memory-preprompt-recall.yaml, vector/embedding metadata: qa/scenarios/memory/active-memory-cold-first-turn-trigger-recall.yaml, vector/embedding metadata: qa/scenarios/memory/active-memory-preprompt-recall.yaml. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Retain one primary QA owner for each Active Memory behavior, then land the focused scenario coverage after the responsible reviewer confirms the exact mock-provider trace remains the desired long-term contract.

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

Not applicable: this PR adds deterministic QA coverage rather than reporting a new user-facing failure. The supplied mock-Gateway verdict describes three selected scenarios passing after the change.

Is this the best way to solve the issue?

Yes, subject to maintainer confirmation of the exact trace contract: the change places trigger-only recall and deep helper-chain recall in separate primary scenarios, matching the current runtime split.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 76cc60a452dc.

Labels

Label changes:

  • add P3: This is a focused QA coverage and ownership cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR body nevertheless records direct mock-Gateway runs and a combined passing verdict.

Label justifications:

  • P3: This is a focused QA coverage and ownership cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR body nevertheless records direct mock-Gateway runs and a combined passing verdict.

Evidence

What I checked:

  • Primary coverage semantics: The catalog parser accepts distinct primary and secondary IDs, while scorecard evidence counts only passing primary coverage as fulfillment. The PR assigns the two trigger-only behaviors to its dedicated scenario and moves the overlapping cross-conversation IDs to secondary coverage. (extensions/qa-lab/src/scenario-catalog.ts:123, 76cc60a452dc)
  • Runtime owner boundary: Current main resolves deterministic trigger recall before deep recall when Active Memory is enabled for the agent, the memory-core slot is active, and the destination is private; this matches the cold-first-turn scenario's intended owner boundary. (extensions/active-memory/index.ts:357, 1f5049a417ad)
  • Scenario assertions: The added scenario asserts one outbound reply, no helper-search request, exactly one main request, and an injected Active Memory envelope containing the trigger-tagged fact. The strengthened preprompt scenario asserts the ordered three-request helper chain followed by the main request. (qa/scenarios/memory/active-memory-cold-first-turn-trigger-recall.yaml:126, fce7714002d8)
  • Feature history: Current-main blame attributes the Active Memory before-prompt trigger path and the existing related scenarios to the same recent feature integration, making Peter Steinberger the strongest routing candidate for the test-contract review. (extensions/active-memory/index.ts:369, 1f5049a417ad)
  • Scope and release provenance: The branch changes only QA scenario YAML (+294/-131, production code +0); it is based on an ancestor of current main but is not contained in a release tag. This is active review work, not an already-shipped or superseded fix. (qa/scenarios/memory/active-memory-preprompt-recall.yaml:1, fce7714002d8)

Likely related people:

  • Peter Steinberger: Current-main blame attributes the trigger-recall branch in the Active Memory before-prompt hook and the pre-existing related QA scenarios to this integration. (role: current Active Memory and QA scenario contributor; confidence: high; commits: 1f5049a417ad; files: extensions/active-memory/index.ts, qa/scenarios/memory/active-memory-preprompt-recall.yaml, qa/scenarios/memory/remember-across-conversations.yaml)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 21:20
@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer acceptance: the focused request-count/helper-order contract is accepted as canonical for these two mock scenarios. Exact head fce7714002d8d92a231784080e0d53b0f626be40 passed 68/68 catalog tests, the combined 3/3 scenario run, and a clean Sol/high review at 0.99. This is test-only, with no production or runtime behavior change.

@vincentkoc
vincentkoc merged commit 3a57ad4 into main Aug 3, 2026
148 of 156 checks passed
@vincentkoc
vincentkoc deleted the qa-b3-active-memory-recall-20260803 branch August 3, 2026 22:05
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main: (90 commits)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  test(gateway): cover node exec approval relay (#118825)
  test(qa): add Active Memory recall coverage (#118963)
  test(qa): promote package-backed Docker artifact proof (#118826)
  test(qa): cover diagnostic event boundary (#118844)
  test(gateway): cover WebSocket runtime contracts (#118797)
  fix(signal): drain accepted websocket messages before shutdown (#118975)
  fix(plugins): remove stale load paths during uninstall (#118930)
  test(qa): cover bundled runtime discovery (#118922)
  chore(clawhub): cover plugin release policy contracts (#118971)
  test(qa): cover support export and stability (#118956)
  fix(feishu): enforce exact signed webhook request boundaries (#118758)
  feat(sms): add Twilio MMS support (#118664)
  test(gateway): prove TLS certificate pinning (#118812)
  test(qa): cover tool policy and sandbox gates (#118925)
  fix(cli): keep update dry-run state immutable (#118856)
  fix(scripts): honor last repeated CLI flag value (#118710)
  ...

# Conflicts:
#	pnpm-workspace.yaml
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…r-admin-20260803

* origin/main: (89 commits)
  fix(googlechat): align doctor policy ownership with canonical account configuration (#118972)
  test(tui): prove editor input through PTY (#118982)
  fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987)
  test(qa): cover health monitor and cache boundaries (#118961)
  fix(macos): restore dashboard frame double-click zoom (#118976)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  test(gateway): cover node exec approval relay (#118825)
  test(qa): add Active Memory recall coverage (#118963)
  test(qa): promote package-backed Docker artifact proof (#118826)
  test(qa): cover diagnostic event boundary (#118844)
  test(gateway): cover WebSocket runtime contracts (#118797)
  fix(signal): drain accepted websocket messages before shutdown (#118975)
  fix(plugins): remove stale load paths during uninstall (#118930)
  test(qa): cover bundled runtime discovery (#118922)
  chore(clawhub): cover plugin release policy contracts (#118971)
  test(qa): cover support export and stability (#118956)
  fix(feishu): enforce exact signed webhook request boundaries (#118758)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

1 participant