Skip to content

test(gateway): expect published embedding cache retirement - #198153

Merged
roboclaw-bot merged 1 commit into
mainfrom
roboclaw/main-ci-embedding-count
Nov 13, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
roboclaw/main-ci-embedding-count

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

checks-node-compact-large-35 fails on main (run https://github.com/openclaw/openclaw/actions/runs/43371984780, job 131710078165): src/gateway/server-close.memory.test.ts (case "settles accepted Memory sync before closing its existing executor") still expects one cached embedding after shutdown. Since #195369 (3ea0883077), a successful publication retires the redundant cache copy of an indexed vector, so the cache count is now 0.

User Impact

None at runtime; test-only.

Why This Change Was Made

The cache count is 0 because #195369 made that the intended behavior; nothing regressed. The test now expects 0 and explains why. Its shutdown-ordering, published-chunk and empty-live-index assertions are unchanged, so it still proves the accepted sync settled before close.

Evidence

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

Align the Memory shutdown regression with #195369: a successful full
publication now retires its redundant embedding-cache row. Preserve the
accepted-sync, published-text, executor-reuse and lease-release checks.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 13, 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 gateway Gateway runtime size: XS labels Nov 13, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Updates the Gateway shutdown test to expect zero redundant embedding-cache rows after successful publication.

Example: The accepted memory sync publishes memory/shutdown.md before Gateway shutdown completes.

  • Before: The test expects 1 cache row and fails because publication leaves 0.
  • After: The test expects 0 while retaining its published-content, executor-reuse, and lease-release checks.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal, source-verified test repair supported by the exact baseline failure and passing reviewed-head CI.
Proof confidence 🐚 platinum hermit (4/6) This PR changes only a test expectation; the baseline failure annotation and successful reviewed-head test shard provide appropriate validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Main CI rejects successful memory publication because a shutdown regression test expects a redundant cache row to remain.
Reason: The maintainer-authored correction follows the merged retention decision and preserves the test's meaningful lifecycle coverage.

Merge readiness

✅ Ready for maintainer review

This PR correctly updates a stale test expectation to match intentional cache retirement while preserving the shutdown guarantees; no blocking findings remain.

Priority: P3
Reviewed head: fc2064c46b1c85b8e622d1e15480762c27761942

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway shutdown test runs the Memory Core manager with synthetic embeddings, then inspects persisted chunks and leases after shutdown.

flowchart LR
 A[Gateway shutdown test] --> B[Memory Core sync]
 B --> C[Published memory index]
 C --> D[Duplicate cache retirement]
 D --> E[Shutdown completion]
 E --> F[Chunk and lease assertions]
Loading

Technical review

Best possible solution:

Land the focused expectation correction without changing production cache retirement or weakening the shutdown assertions.

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

The baseline CI annotation shows the exact assertion failure, and current-main source retains the incompatible expectation; no local tests were run during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete repair: update the existing assertion to the published-cache contract while preserving independent persistence and shutdown checks.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway shutdown cache-count expectation changes intended behavior with a stated reason (unknown: Commit 643dbc2 carried the count-1 assertion through test consolidation; it did not establish its introduction. Path history and old-name searches encountered unavailable historical objects. The later merged cache-retirement contract explicitly explains why count 0 is now correct.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Mitchell Etzel: Raw commit 3ea0883 adds extensions/memory-core/src/memory/manager-embedding-cache-retire.ts:55 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3ea088307758; files: extensions/memory-core/src/memory/manager-embedding-cache-retire.ts)

PR surface

Tests +1. Total +1 across 1 file. Added test files: 0.

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

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: A low-risk test correction restores alignment with intentional production behavior and changes no runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: A low-risk test correction restores alignment with intentional production behavior and changes no runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 13, 2026, 2:14 AM ET / 07:14 UTC.

@roboclaw-bot
roboclaw-bot merged commit 16663ca into main Nov 13, 2026
121 checks passed
@roboclaw-bot
roboclaw-bot deleted the roboclaw/main-ci-embedding-count branch November 13, 2026 07:16
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…198153)

Align the Memory shutdown regression with openclaw#195369: a successful full
publication now retires its redundant embedding-cache row. Preserve the
accepted-sync, published-text, executor-reuse and lease-release checks.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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