Skip to content

test(qa): add memory redaction boundary coverage - #118916

Merged
vincentkoc merged 1 commit into
mainfrom
qa-security-memory-redaction-20260803
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
qa-security-memory-redaction-20260803

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds focused executable proof for two memory-core secret-handling boundaries:

  • redact raw credential material before interactive transcripts enter dreaming ingestion;
  • reject contaminated or untrusted short-term promotion candidates before durable memory writes.

Problem

security.redaction-dreaming and security.redaction-promotion had no primary executable QA coverage.

Owner boundary

The proof stays in the existing memory-core product boundary: one focused Vitest file invokes the real dreaming phase and promotion apply entrypoints, and one native QA scenario registers the evidence. No production path changes.

Assertions

  • A real interactive transcript preserves safe control text, removes the raw OPENAI_API_KEY=sk-... value, and persists OPENAI_API_KEY=*** in the dreaming corpus.
  • Promotion receives one clean trusted candidate, one dreaming-shaped candidate with an embedded raw secret, and one untrusted candidate.
  • Exactly the clean candidate is applied.
  • MEMORY.md contains the clean text and canonical promotion marker, with no contaminated marker/text, untrusted text, raw secret, or redacted secret placeholder.

Coverage

Primary IDs:

  • security.redaction-dreaming
  • security.redaction-promotion

This does not claim general PII redaction or broader dreaming, provenance, memory retrieval, or credential-hygiene coverage.

Validation

  • Head: 45d1517e1d818cc3f6b77ead5f58f3c94b9d4f5e
  • Base: f73a7809a5e6d8c55427aa746a9ae0551ac3c5cc
  • Runtime: Node 24.18.0, pnpm 11.15.1
  • Focused Vitest: 2/2 passed on the exact head
  • Matrix owner tests: 422/422 passed across test/scripts/test-projects.test.ts and test/scripts/test-extension.test.ts
  • git diff --check: passed
  • Direct oxfmt check on both changed files: passed
  • Direct exact-file oxlint check: passed
  • Privacy scan: passed
  • Changed gate: passed in 638s on predecessor df1373da2cdf10a2f2436798696b0380c33da601
    • typecheck: 289.11s
    • lint: 230.16s
    • runtime import cycles: 8.41s
  • Refreshed exact-head private QA build: passed in 182s
  • Exact-head coverage queries: both passed in 7s and 6s, and matched only memory-core-redaction-boundaries
  • Exact-head mock-OpenAI QA suite: passed in 17s
  • Branch-base production audit reproduced the two newly published HIGH advisories for fast-uri <4.1.2 and undici <7.29.0; current-main commit 25aa29d7a15 updates both, the current lock audits clean, and hosted security-fast passes on the prepared merge ref. This PR has no dependency or lockfile delta.
  • Sol/high autoreview: clean, no accepted findings
{
  "head": "45d1517e1d818cc3f6b77ead5f58f3c94b9d4f5e",
  "scenario": "memory-core-redaction-boundaries",
  "providerMode": "mock-openai",
  "entries": 1,
  "status": "pass",
  "primaryIds": [
    "security.redaction-dreaming",
    "security.redaction-promotion"
  ],
  "runner": "vitest",
  "scenarioWallTimeMs": 14056
}

Proof routing: Blacksmith Testbox failed provider readiness before dispatch because its CLI was unauthenticated. The documented trusted-source fallback used a disposable clean normal clone, then removed it after copying the complete proof bundle to .artifacts/qa-e2e/security-memory-redaction.

The branch was refreshed after the Matrix inventory repair became relevant CI evidence. Later current-main dependency maintenance does not touch extensions/memory-core, packages/memory-host-sdk, or this QA scenario, so no second age-only rebase is needed; fresh hosted CI validates the exact head against the prepared merge ref.

Scope

  • Adds extensions/memory-core/src/redaction-product-boundaries.test.ts
  • Adds qa/scenarios/security/memory-core-redaction-boundaries.yaml
  • Production LOC delta: 0
  • No production code, taxonomy, QA Lab internals, existing broad tests, docs, or changelog changes

@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. P2 Normal backlog priority with limited blast radius. 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, 4:20 PM ET / 20:20 UTC.

ClawSweeper review

What this changes

Adds a memory-core Vitest boundary test and QA scenario covering secret redaction before dreaming ingestion plus rejection of contaminated or untrusted candidates before durable memory writes.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR adds focused regression coverage at the existing memory-core owner boundaries and no source-level correctness defect was found. It should remain open for maintainer review because it is maintainer-authored/labeled and the exact head still has a failed security-fast check that must be understood before merge.

Priority: P2
Reviewed head: de4ccafbd446039f6ac63181d34f1c71e73e7425

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, owner-boundary-aligned coverage patch with strong stated validation; merge readiness depends on clearing the remaining failed security check.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; the PR body nevertheless supplies exact-head mock-OpenAI QA output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; the PR body nevertheless supplies exact-head mock-OpenAI QA output.
Evidence reviewed 7 items Current owner-boundary behavior: Current main filters promotion candidates through both the origin/provenance block and contamination detection before rehydrating or writing durable memory, matching the proposed regression assertions.
Dreaming uses the active transcript corpus: Current main enumerates active-session transcript corpus entries and explicitly excludes retained/reset artifacts before dreaming ingestion, so the added test exercises the intended production-facing input boundary.
Focused patch inspection: The branch adds only a test that seeds a real session transcript and calls the dreaming and promotion entrypoints, plus a QA scenario that registers that test as evidence; it changes no production path.
Findings None None.
Security None None.

How this fits together

Memory-core ingests active session transcripts into a dreaming corpus, then may promote recalled memory candidates into durable MEMORY.md. This PR tests the handoff boundaries where sensitive text must be redacted and unsafe candidates must be rejected.

flowchart LR
  A[Interactive session transcript] --> B[Transcript redaction]
  B --> C[Dreaming corpus]
  C --> D[Promotion candidate]
  D --> E[Contamination and provenance gates]
  E --> F[Durable MEMORY.md]
  E --> G[Rejected candidate]
Loading

Before merge

  • Resolve merge risk (P1) - The exact-head security-fast check is reported failed; its logs were not accessible during this read-only review, so maintainers should resolve or rerun that gate before merging.
  • Complete next step (P2) - This maintainer-authored and maintainer-labeled PR needs normal owner approval plus exact-head CI resolution, not an automated repair branch.
Agent review details

Security

None.

PR surface

Tests +230, Other +29. Total +259 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 230 0 +230
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 29 0 +29
Total 2 259 0 +259

Review metrics

Metric Value Why it matters
Production vs test LOC production +0, tests/QA +259 The added surface is executable regression coverage and scenario registration only; no runtime behavior or public contract changes.

Stored data model

Persistent data-model change detected: unknown-data-model-change: extensions/memory-core/src/redaction-product-boundaries.test.ts, vector/embedding metadata: extensions/memory-core/src/redaction-product-boundaries.test.ts, vector/embedding metadata: qa/scenarios/security/memory-core-redaction-boundaries.yaml. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the focused regression coverage, resolve the exact-head security gate, and land it after normal memory-core maintainer review without changing the existing production redaction or promotion flows.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the focused regression coverage, resolve the exact-head security gate, and land it after normal memory-core maintainer review without changing the existing production redaction or promotion flows.

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

Not applicable as a new defect report: this PR adds coverage for existing behavior. The submitted test targets the real dreaming and promotion entrypoints, though this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Exercising the real transcript-ingestion and promotion-apply boundaries is a more maintainable regression check than adding test-only guards or changing production behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded memory-security regression-coverage improvement with limited merge blast radius.
  • 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: This maintainer-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; the PR body nevertheless supplies exact-head mock-OpenAI QA output.

Evidence

What I checked:

Likely related people:

  • steipete: Current memory-core dreaming and promotion guard history points to the recent security repair that introduced the relevant owner-boundary behavior. (role: recent area contributor; confidence: high; commits: 830ab164ef86; files: extensions/memory-core/src/dreaming-phases.ts, extensions/memory-core/src/short-term-promotion-apply.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve or rerun the exact-head security-fast failure and confirm the result before merge.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-03T20:01:41.233Z sha df1373da2cdf10a2f2436798696b0380c33da601 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the qa-security-memory-redaction-20260803 branch from df1373d to de4ccaf Compare August 3, 2026 20:12
@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 20:15
@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper rank-up move disposition:

  • Current-main drift was checked from the branch base through live origin/main; no commit touches extensions/memory-core, packages/memory-host-sdk, or qa/scenarios/security/memory-core-redaction-boundaries.yaml.
  • Rebase is intentionally skipped because the drift is unrelated. The exact head de4ccafbd446039f6ac63181d34f1c71e73e7425 has fresh focused, coverage, and mock-OpenAI QA proof, and hosted CI plus scripts/pr prepare-run will validate the prepared merge ref.
  • Ordinary maintainer review remains part of the mandatory repo-native landing flow.

No re-review requested.

@vincentkoc
vincentkoc force-pushed the qa-security-memory-redaction-20260803 branch from de4ccaf to 45d1517 Compare August 3, 2026 20:34
@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper rank-up move resolved:

  • Exact head 45d1517e1d818cc3f6b77ead5f58f3c94b9d4f5e now has hosted security-fast success on the prepared merge ref after current-main dependency maintenance updated fast-uri and undici.
  • The current-main production lock audit passes.
  • Full hosted CI is 72 pass, 0 fail, 0 pending.
  • Current-main drift still does not touch extensions/memory-core, packages/memory-host-sdk, or qa/scenarios/security/memory-core-redaction-boundaries.yaml, so no second age-only rebase is warranted.

Proceeding through the mandatory repo-native prepare and pinned squash flow. No re-review requested.

@vincentkoc
vincentkoc merged commit 96ae5fa into main Aug 3, 2026
123 of 124 checks passed
@vincentkoc
vincentkoc deleted the qa-security-memory-redaction-20260803 branch August 3, 2026 20:46
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* commit 'efcced7207baa0b1b1db5e8e1836673a24212657':
  test(agents): prove process control roundtrip (#118843)
  test(qa): add memory redaction boundary coverage (#118916)
  fix(kilocode): model discovery overstates the usable context window (#118868)
  fix(media): isolate generated-provider text from delivery directives (#118780)
  test(gateway): add node control-plane QA coverage (#118784)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  fix(ci): keep Matrix chunk tests aligned with inventory (#118917)
  fix(tts): preserve hidden speech answers when synthesis fails (#118690)
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…-worker-update-20260803

* origin/main: (48 commits)
  test(ui): add shell and PWA primary QA proof (#118788)
  test(qa): cover CLI distribution workflows (#118948)
  chore(i18n): refresh native locales (#118883)
  test(qa): prove plugin tool ownership in gateway flow (#118958)
  docs: correct onboarding risk flags and Google Chat credential shapes (#118936)
  fix(imessage): honor explicitly enabled accounts during startup (#118944)
  test(gateway): cover client transport defaults (#118798)
  fix(signal): normalize accounts during noninteractive setup (#118932)
  fix(msteams): enable channels for federated environment credentials (#118931)
  fix(openai): enforce final transcript bounds before callback delivery (#118928)
  test(tasks): cover plugin-managed flows (#118919)
  test(agents): prove process control roundtrip (#118843)
  test(qa): add memory redaction boundary coverage (#118916)
  fix(kilocode): model discovery overstates the usable context window (#118868)
  fix(media): isolate generated-provider text from delivery directives (#118780)
  test(gateway): add node control-plane QA coverage (#118784)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  ...
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: memory-core Extension: memory-core extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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