Skip to content

test(memory): consolidate visibility fixtures without policy defaults - #139569

Merged
steipete merged 1 commit into
mainfrom
codex/test-audit-memory-fixtures
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-audit-memory-fixtures

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Related: #139428

What Problem This Solves

Three Memory Core visibility suites repeat session-entry and search-hit construction across otherwise distinct privacy and recall scenarios, adding fixture maintenance without independent behavioral proof.

Why This Change Was Made

Use two neutral plugin-local constructors for 50 session entries and 46 search hits. Keep identity, timestamp, locator, path, source and snippet explicit. Preserve optional metadata exactly as supplied and retain score/range overrides. Visibility, authorization, requester, sandbox and recall configuration stay in each case.

User Impact

No production behavior changes or scenarios removed. Sparse legacy metadata, conflicting aliases, SQLite/archive locators, non-default scores and reset-cutoff ranges remain covered. Net 289 test/support lines removed: tests -318, support +29.

Evidence

All 58 fully expanded test identities match baseline and pass. A structural verifier expands the actual helper definitions back into the tests and confirms all 96 migrated fixture expressions and the remaining test program match the originals, ignoring only imports and the moved type declarations.

The final changed gate, formatting/diff checks, deslop and independent P2 review pass. An initial redundant-spread lint finding was fixed and all proof refreshed. Recorded wrapper times were 27.92s before and 7.57s after; transform/import warming dominates, so no attributable runtime reduction is claimed.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: XL maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 00:45
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 8:51 PM ET / September 6, 2026, 00:51 UTC.

ClawSweeper review

What this changes

Shares session-entry and search-result constructors across three Memory Core visibility test suites while preserving each scenario’s explicit privacy settings and metadata.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, bounded contribution to the maintainer-requested test audit. The fixture replacements preserve scenario inputs and assertions, and the consolidation is absent from fetched main. No actionable defect was found.

Priority: P3
Reviewed head: eb6c9dd9fa5642d6aff562406d8a73e9b0ff7624

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture cleanup with preserved scenario distinctions, useful reported validation, and no identified correctness defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER attribution exempts this test-only PR from external-contributor runtime proof; no production behavior or authority boundary changes. Reported test and equivalence results are supplemental and were not rerun here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER attribution exempts this test-only PR from external-contributor runtime proof; no production behavior or authority boundary changes. Reported test and equivalence results are supplemental and were not rerun here.
Evidence reviewed 5 items Neutral fixture constructors: Session identity, timestamp, locator, path, source, and snippet remain required arguments. Optional session metadata is copied without policy defaults; score and line-range overrides are applied after the ordinary search-hit defaults.
Preserved privacy and recall scenarios: Inspected the introduced diff and complete resulting suites. Sparse metadata, shared aliases, cross-agent rejection, sandbox restrictions, SQLite locators, deleted archives, reset-cutoff ranges, and non-default scores remain represented; assertions and policy configuration remain in their original scenarios.
Main retains the baseline implementation: The production filter and all three affected suites have no changes between the pinned merge base and fetched main. Separate tree checks found the new fixture-support path absent from both fetched main and the supplied latest-release commit.
Findings None None.
Security None None.

How this fits together

Memory Core filters search results using the requesting session, agent scope, and recall policy before returning remembered context. These tests exercise that filtering with synthetic session records and search hits.

flowchart TD
  A[Explicit scenario data] --> B[Shared fixture constructors]
  B --> C[Session records and search hits]
  D[Requester and visibility policy] --> E[Memory visibility filter]
  C --> E
  E --> F[Allowed search results]
  F --> G[Existing test assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -289. Total -289 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 397 686 -289
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 397 686 -289

Review metrics

None.

Root-cause cluster

Relationship: partial_overlap
Canonical: #139428
Summary: This PR contributes one fixture-consolidation batch to the broader test-audit campaign; it does not complete that campaign.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Retain the shared data constructors while keeping privacy decisions, exceptional metadata, and expected outcomes explicit in each test.

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

Not applicable: this PR consolidates existing test fixtures rather than repairing a reported runtime defect.

Is this the best way to solve the issue?

Yes: the small plugin-local constructors remove repeated data construction while preserving scenario-specific metadata, policy inputs, and assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 78234c177d19.

Labels

Label changes:

  • add P3: This is a test-maintenance 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 supplied MEMBER attribution exempts this test-only PR from external-contributor runtime proof; no production behavior or authority boundary changes. Reported test and equivalence results are supplemental and were not rerun here.

Label justifications:

  • P3: This is a test-maintenance 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 supplied MEMBER attribution exempts this test-only PR from external-contributor runtime proof; no production behavior or authority boundary changes. Reported test and equivalence results are supplemental and were not rerun here.

Evidence

What I checked:

  • Neutral fixture constructors: Session identity, timestamp, locator, path, source, and snippet remain required arguments. Optional session metadata is copied without policy defaults; score and line-range overrides are applied after the ordinary search-hit defaults. (extensions/memory-core/src/session-search-visibility.test-support.ts:13, eb6c9dd9fa56)
  • Preserved privacy and recall scenarios: Inspected the introduced diff and complete resulting suites. Sparse metadata, shared aliases, cross-agent rejection, sandbox restrictions, SQLite locators, deleted archives, reset-cutoff ranges, and non-default scores remain represented; assertions and policy configuration remain in their original scenarios. (extensions/memory-core/src/session-search-visibility.test.ts:514, eb6c9dd9fa56)
  • Main retains the baseline implementation: The production filter and all three affected suites have no changes between the pinned merge base and fetched main. Separate tree checks found the new fixture-support path absent from both fetched main and the supplied latest-release commit. (extensions/memory-core/src/session-search-visibility.ts, 78234c177d19)
  • Maintainer campaign and reported validation: The supplied discussion links Test audit: reduce redundant test code and full-suite runtime #139428, an open campaign requiring coherent test reductions without lost behavioral coverage. The captured PR body reports 58 matching expanded test identities, passing focused checks, and structural equivalence for 96 fixture replacements; it explicitly makes no attributable runtime-speedup claim. Tests and the reported structural verifier were not executed during this read-only review. (eb6c9dd9fa56)
  • Area history and inspection limits: Available history identifies Peter Steinberger’s recent memory-only filtering work and Vitor Cepeda Lopes’s reset-recall work. Historical blob inspection and blame could not complete because a required Git object was unavailable and GitHub DNS access failed; these are routing signals, not verified source-line introduction claims. The PR diff and working-tree source were readable. (extensions/memory-core/src/session-search-visibility.ts, f1055c066ea0)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vitor Cepeda Lopes: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit 0df5050 into main Sep 6, 2026
161 checks passed
@steipete
steipete deleted the codex/test-audit-memory-fixtures branch September 6, 2026 00:55
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
* origin/main: (302 commits)
  test(gateway): preserve held-work close failures (#139593)
  refactor(exec): share package argument scanning (#139560)
  fix(audit): preserve sequence range validation before numeric decoding (#139587)
  fix(transcripts): retain capture ownership through failed cleanup (#139572)
  refactor(models): share selector reference traversal (#139571)
  perf(agents): classify allowlists without intermediate sets (#138392)
  chore(release): update appcast for 2026.9.2 (#139575)
  fix(ci): synchronize cloud retries and board widget input (#139506)
  fix(plugins): explain SDK incompatibilities after core updates (#139458)
  fix(voice-call): retain installed WebSocket behavior under Bun (#139567)
  test(text): consolidate literal sanitizer cases (#139579)
  test(gateway): observe native drain without a lint exception (#139576)
  test(memory): consolidate visibility fixtures without policy defaults (#139569)
  fix(ui): show shimmer skeletons while loading Control UI (#139525)
  test(qa): make cleanup child logging deterministic (#139566)
  test(cli): keep Unix socket fixtures within path limits (#139565)
  fix: avoid slow incognito key checks in large session stores (#139528)
  feat(macos): open Gateway windows from the Gateways menu (#139522)
  test(workshop): isolate marker casing fixture identities (#139554)
  fix(process): require cleanup evidence before releasing owned work (#139517)
  ...

# Conflicts:
#	scripts/release-check.ts
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit '047587a542ce205ee78354fbd88ba8ec05c07844': (45 commits)
  chore(ui): refresh control ui locales (#139481)
  fix(slack): keep prototype-named emoji shortcodes intact (#136374)
  fix(gateway): deliver upgrade rejection responses under Bun (#139516)
  refactor(test): simplify catalog guards and fix native report fixture (#139496)
  fix(macos): prevent dashboard fixture loopback timeouts (#139556)
  fix(matrix): preserve selected reply targets inside threads (#139479)
  test(gateway): preserve held-work close failures (#139593)
  refactor(exec): share package argument scanning (#139560)
  fix(audit): preserve sequence range validation before numeric decoding (#139587)
  fix(transcripts): retain capture ownership through failed cleanup (#139572)
  refactor(models): share selector reference traversal (#139571)
  perf(agents): classify allowlists without intermediate sets (#138392)
  chore(release): update appcast for 2026.9.2 (#139575)
  fix(ci): synchronize cloud retries and board widget input (#139506)
  fix(plugins): explain SDK incompatibilities after core updates (#139458)
  fix(voice-call): retain installed WebSocket behavior under Bun (#139567)
  test(text): consolidate literal sanitizer cases (#139579)
  test(gateway): observe native drain without a lint exception (#139576)
  test(memory): consolidate visibility fixtures without policy defaults (#139569)
  fix(ui): show shimmer skeletons while loading Control UI (#139525)
  ...
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 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: XL 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