Skip to content

refactor: share Memory Wiki visibility test callbacks - #143181

Merged
steipete merged 1 commit into
mainfrom
codex/test-wiki-visibility-callbacks
Sep 9, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-wiki-visibility-callbacks

Conversation

@steipete

@steipete steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Related: #139428

What Problem This Solves

Two adjacent Memory Wiki visibility tests repeat the same full callback while differing only in whether the caller is sandboxed.

Why This Change Was Made

Register the two original named cases from a typed table of primitive names and sandbox flags. Keep all vault, manager, search-hit, expected-result and nested callback allocations inside each test. The independent expected paths, assertions, cleanup and registration order remain unchanged. This removes 45 net test lines; the earlier session-input cleanup is not part of this change.

User Impact

No product behavior changes. Both sandboxed and session-bound non-sandboxed visibility paths retain their existing coverage with less duplicated test code.

Evidence

The full query and query-read suites passed all 74 cases before and after, with no skips and identical ordered names within each file. Substituting each row into the shared callback reproduces its original body; all outside-table tokens and per-test mutable allocations are preserved.

The mapped changed gate passed, and fresh P2 review found no actionable issues. No runtime speedup is claimed.

@clawsweeper

clawsweeper Bot commented Sep 9, 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.

@steipete
steipete marked this pull request as ready for review September 9, 2026 14:37
@clawsweeper

clawsweeper Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 9, 2026, 10:39 AM ET / 14:39 UTC.

ClawSweeper review

What this changes

Shares the callback for two Memory Wiki visibility tests while preserving their names, sandbox settings, assertions, and isolated fixtures.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this is a bounded, behavior-preserving contribution to the requested test-audit campaign. Current main still contains the duplicated callbacks, and no actionable patch defect was found.

Priority: P3
Reviewed head: 517687bc76ea10e801cf54afae97c6d94933e061

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Recorded reviewer rating: A focused consolidation preserves both visibility cases and per-test isolation, with no actionable correctness or security findings. Real behavior proof remains required by host policy.
Proof confidence 🌊 off-meta tidepool Recorded reviewer rating; Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: GitHub verifies the author as a repository administrator, so the external-contributor proof gate does not apply. The diff changes only test registration and callback sharing; reported before/after suite results are supplemental, and no runtime behavior or authority changes require live proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Required by policy Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: GitHub verifies the author as a repository administrator, so the external-contributor proof gate does not apply. The diff changes only test registration and callback sharing; reported before/after suite results are supplemental, and no runtime behavior or authority changes require live proof.
Evidence reviewed 6 items Introduced callback consolidation: The complete merge-base-to-head diff changes only the two adjacent test callbacks. Both original names and boolean values remain ordered; mutable fixtures and expected results are allocated inside each test.
Current main still has separate callbacks: The fetched main revision retains both duplicated callback bodies, so this cleanup remains distinct work.
Preserved production boundary and isolation: Search delegates session filtering with the requester session and sandbox flag. The unchanged test lifecycle resets mocks before each case and assigns each vault a separate directory; the patch introduces no production authority or storage change.
Findings None None.
Security None None.

How this fits together

Memory Wiki combines wiki search with results from the active memory plugin. These tests verify that session visibility excludes sibling transcripts while retaining the caller’s transcript and durable memory.

flowchart TD
  A[Two named sandbox cases] --> B[Fresh fixtures per test]
  B --> C[Memory Wiki search]
  D[Caller session and visibility policy] --> C
  C --> E[Filter memory search hits]
  E --> F[Assert caller transcript and durable memory]
Loading

Before merge

  • Add real behavior proof - Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: GitHub verifies the author as a repository administrator, so the external-contributor proof gate does not apply. The diff changes only test registration and callback sharing; reported before/after suite results are supplemental, and no runtime behavior or authority changes require live proof.
Agent review details

Security

None.

PR surface

Tests -45. Total -45 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 56 101 -45
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 56 101 -45

Review metrics

None.

Root-cause cluster

Relationship: partial_overlap
Canonical: #139428
Summary: This PR contributes a bounded callback consolidation to the broader test-audit campaign without completing its aggregate acceptance targets.

Members:

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

Technical review

Best possible solution:

Retain both independently named visibility scenarios with fresh fixtures and one shared callback.

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

Not applicable: this PR consolidates existing tests rather than reporting a product defect; source inspection confirms the duplicated bodies and retained cases.

Is this the best way to solve the issue?

Yes. A primitive case table removes callback duplication without sharing mutable fixtures, deriving expectations from production code, or reducing scenario coverage.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with preserved scenarios and no product behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit. This is the recorded reviewer rating; real behavior proof remains required by host policy.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: GitHub verifies the author as a repository administrator, so the external-contributor proof gate does not apply. The diff changes only test registration and callback sharing; reported before/after suite results are supplemental, and no runtime behavior or authority changes require live proof.

Label justifications:

  • P3: This is test-maintenance cleanup with preserved scenarios and no product behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit. This is the recorded reviewer rating; real behavior proof remains required by host policy.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: GitHub verifies the author as a repository administrator, so the external-contributor proof gate does not apply. The diff changes only test registration and callback sharing; reported before/after suite results are supplemental, and no runtime behavior or authority changes require live proof.

Evidence

What I checked:

  • Introduced callback consolidation: The complete merge-base-to-head diff changes only the two adjacent test callbacks. Both original names and boolean values remain ordered; mutable fixtures and expected results are allocated inside each test. (extensions/memory-wiki/src/query.test.ts:1078, 517687bc76ea)
  • Current main still has separate callbacks: The fetched main revision retains both duplicated callback bodies, so this cleanup remains distinct work. (extensions/memory-wiki/src/query.test.ts:1078, ae65c403d032)
  • Preserved production boundary and isolation: Search delegates session filtering with the requester session and sandbox flag. The unchanged test lifecycle resets mocks before each case and assigns each vault a separate directory; the patch introduces no production authority or storage change. (extensions/memory-wiki/src/query.ts:1214, 517687bc76ea)
  • Maintainer status and live protection: The GitHub permission endpoint confirms steipete has repository admin permission. The live PR remains open at the reviewed head and now carries the maintainer label.
  • Requested campaign and validation claims: The supplied campaign at Test audit: reduce redundant test code and full-suite runtime #139428 explicitly requests independently reviewed test consolidation. The captured PR body reports 74 query/query-read cases passing before and after with identical ordered names, no skips, and a passing changed gate; no runtime improvement is claimed. These executions were not independently rerun during this read-only review. (517687bc76ea)
  • Prior merged area contribution: GitHub verifies refactor: share Memory Wiki session search test inputs #143084 merged as 1066fad and was authored by steipete. It consolidated session search inputs, a separate preceding cleanup. Local file history also records recent work by Peter Steinberger and Vincent Koc; deeper blame and pickaxe inspection could not complete because historical objects were unavailable, so no source-line introduction attribution is asserted. (extensions/memory-wiki/src/query.test.ts, 1066fad578df)

Likely related people:

  • steipete: 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 cb684c2 into main Sep 9, 2026
155 checks passed
@steipete
steipete deleted the codex/test-wiki-visibility-callbacks branch September 9, 2026 15:03
@steipete

steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 9, 2026
…er-ownership-20260909

* origin/main: (147 commits)
  fix(cli): reject blank account selectors before command startup (#143088)
  fix(update): repair young runs after recorded drivers exit (#143136)
  test(telegram): close model callback fixture connections (#143197)
  improve(test): reduce Telegram policy fixture startup overhead (#143192)
  test(ci): stabilize systemd manager shim timing (#143134)
  fix(test): retire chat preview Escape listeners during teardown (#143191)
  test(memory-wiki): share visibility test callbacks (#143181)
  fix(ci): accept native iOS keychain filenames (#142968)
  fix(ci): show publication observations in FRV status (#143171)
  fix(github): point the stuck-FAQ auto-response at a live anchor (#143194)
  docs: correct verified accuracy defects in CLI, tools, and automation pages (#143179)
  refactor(tests): remove duplicate Mistral cache-cost test (#143172)
  fix(doctor): complete canonical model-reference migration (#142284)
  fix(ci): reject stale and empty timing sample cohorts (#143182)
  fix(ui): remove first-reply confetti from chat (#143167)
  docs: split help/faq into 13 topic pages (#143150)
  refactor(docs): require caller-owned route indexes (#143164)
  fix(android): distinguish connection status from chat readiness (#143128)
  refactor: share agent-turn execution test defaults (#143166)
  fix(cli): print immutable-config refusals without crash framing (#143140)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant