Skip to content

test(gateway): isolate configured-store projection fixtures - #170284

Merged
steipete merged 2 commits into
mainfrom
dbasync/redmain-store-projection-publication
Oct 12, 2026
Merged

steipete merged 2 commits into
mainfrom
dbasync/redmain-store-projection-publication

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The configured-only 29-store projection test changes the process state-directory override while its suite retains a live Gateway projection. Both contexts compete for the process-held store registry memo, making filesystem-probe assertions depend on unrelated background work.

User Impact

This is a test-fixture correction with no production behavior change. It preserves all 29 seeded stores, the warm preparation request, filesystem assertions and cleanup. No production checks, SQL, security, schema, service-lifecycle or SDK behavior changes; no numeric T1 or SQL statement/request improvement is claimed.

Why This Change Was Made

Move the case into the existing handler-only projection suite, which exercises the same list handlers without a live Gateway. Preserve the independently landed runtime-config setup from #169714. After setting both multi-store overrides, explicitly publish the completed fixture configuration: createSessionStoreDir has already installed an earlier snapshot, so merely reading it does not publish the new store template and agent entries. The two-file diff is +72/−75 and contains the reviewed fixture move plus its snapshot-publication correction.

The test originated in #124453; the first commit exposing the retained-projection interaction remains unestablished. Two Codex review rounds completed with no actionable findings, covering the fixture move and snapshot adaptation.

Evidence

Exact head 443698a6a37b0e425c4bf305100140522c5a3843 passed CI run 38313773328: 20 successful jobs and 29 skipped jobs, including a successful CI gate. Both projection cases passed: 56.56 s Vitest duration and 58.73 s test-runner wall time; the conventional-state-directory case took 4.984 s and the configured-only case 2.919 s. Local runtime was not repeated.

The other changed file, src/gateway/server.sessions.store-paths.test.ts, was not selected by that PR run. Its six cases passed in run 38311910220, job 115019808666 on 0c4b38b77adfcd32fc25a18f5d0ed7fb97c2faae, using the exact same fixture blob b3cdb024f1f3affcf1a811d8e341d8002942d97f. That includes both disposal outcomes and configured-only lineage coverage. Summed case times were 14.531 s; no file wall time is available. This is reused composition evidence, not an exact-PR-head sibling run; the broader job failed in three other files.

The exact-head baseline ratchets, source contracts, additional boundaries, selected test types and lint jobs passed. Normal commit hooks and diff checks passed. Build artifacts and the published-driver update cell were not selected for this test-only change.

Knip evidence is reused narrowly from run 38311910220: both changed test blobs, package/lock/workspace, all-exports configuration and runner match; the primary Knip configuration differs only in a comment. That actual scan reported only three unrelated team-scale exports, all already removed on this branch. This is scoped evidence for this diff, not a claim that the earlier whole-tree scan passed. The same composition's actual Madge check reported zero cycles; this change adds no production import edge. This green PR run does not establish green scheduled CI on main.

Move the configured-only 29-store handler test into the existing handler-only projection suite. Its state-directory override otherwise competes with the live suite Gateway's retained projection for the process-held registry memo.

Preserve the test body, seeded stores, preparation request, filesystem assertions, and cleanup. Production admission and discovery checks are unchanged.

Formatting, targeted lint, whitespace checks, and one Codex source review passed. Runtime qualification remains with the coordinating test owner.
@clawsweeper

clawsweeper Bot commented Oct 12, 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: S labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves the 29-store projection test into the existing handler-only suite and explicitly publishes its completed fixture configuration.

Example: List sessions across agent-0 through agent-28 using a templated session-store path.

  • Before: The test shares a process with a live Gateway projection and reads a snapshot created before its multi-store overrides.
  • After: The test uses the handler-only harness and publishes all 29 agents and the store template before seeding and listing.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent; available validation is limited to harness evidence and successful test-check metadata.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, test-only repair requires fixture validation rather than a shipped-product demonstration; current-head test shards succeeded, while aggregate checks were still running.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Unrelated live Gateway activity can contaminate filesystem-probe assertions, while an earlier installed config snapshot omits the intended multi-store fixture.
Reason: The maintainer-authored change follows the existing isolation pattern, preserves the tested contract and adds no production mechanism.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-authored fixture repair that preserves coverage, and source review found no actionable introduced defect.

Priority: P3
Reviewed head: 443698a6a37b0e425c4bf305100140522c5a3843

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-entry-point scenario is needed for this test-only repair; detailed corrected-fixture output and a failing baseline were not independently verified.
Agent review details

How this fits together

Gateway session-list handlers consume prepared configuration and resident session projections; these fixtures seed SQLite-backed session metadata and check that distinct warm list requests avoid repeated filesystem preparation.

flowchart LR
  A[Fixture configuration] --> B[Runtime snapshot]
  C[29 seeded stores] --> D[Session projection]
  B --> D
  D --> E[Session list handler]
  E --> F[Results and filesystem assertions]
Loading

Technical review

Best possible solution:

Keep the existing handler-only fixture as the sole home of this probe and publish its complete configuration before exercising the unchanged list contract.

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

Source establishes the stale-snapshot path and the competing live versus handler-only fixture contexts; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The existing handler-only harness removes unrelated projection activity while preserving the performance contract, and explicit snapshot publication fixes the fixture at its configuration producer.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Configured-store scaling probe keeps the original intent (063ce57: Protect responsive listings across many configured agents by preventing repeated physical-target preparation.)
  • Handler-only projection suite keeps the original intent (9423fbd: Isolate direct-handler filesystem probes from a second live Gateway projection.)
  • Admitted seeding and fixture configuration keeps the original intent (ea994f0: Seed metadata through admitted writes without unrelated lifecycle deletion work; the new publication preserves that intent under the subsequently prepared snapshot contract.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests -3. Total -3 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 72 75 -3
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 72 75 -3

Labels

Label changes:

  • add P3: This repairs test isolation and fixture preparation without changing shipped Gateway behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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: This repairs test isolation and fixture preparation without changing shipped Gateway behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 October 12, 2026, 6:01 PM ET / 22:01 UTC.

@steipete
steipete merged commit 8de511a into main Oct 12, 2026
115 of 116 checks passed
@steipete
steipete deleted the dbasync/redmain-store-projection-publication branch October 12, 2026 22:14
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…#170284)

## What Problem This Solves

The configured-only 29-store projection test changes the process state-directory override while its suite retains a live Gateway projection. Both contexts compete for the process-held store registry memo, making filesystem-probe assertions depend on unrelated background work.

## User Impact

This is a test-fixture correction with no production behavior change. It preserves all 29 seeded stores, the warm preparation request, filesystem assertions and cleanup. No production checks, SQL, security, schema, service-lifecycle or SDK behavior changes; no numeric T1 or SQL statement/request improvement is claimed.

## Why This Change Was Made

Move the case into the existing handler-only projection suite, which exercises the same list handlers without a live Gateway. Preserve the independently landed runtime-config setup from openclaw#169714. After setting both multi-store overrides, explicitly publish the completed fixture configuration: `createSessionStoreDir` has already installed an earlier snapshot, so merely reading it does not publish the new store template and agent entries. The two-file diff is +72/−75 and contains the reviewed fixture move plus its snapshot-publication correction.

The test originated in openclaw#124453; the first commit exposing the retained-projection interaction remains unestablished. Two Codex review rounds completed with no actionable findings, covering the fixture move and snapshot adaptation.

## Evidence

Exact head `443698a6a37b0e425c4bf305100140522c5a3843` passed [CI run 38313773328](https://github.com/openclaw/openclaw/actions/runs/38313773328): 20 successful jobs and 29 skipped jobs, including a successful CI gate. Both projection cases passed: 56.56 s Vitest duration and 58.73 s test-runner wall time; the conventional-state-directory case took 4.984 s and the configured-only case 2.919 s. Local runtime was not repeated.

The other changed file, `src/gateway/server.sessions.store-paths.test.ts`, was not selected by that PR run. Its six cases passed in [run 38311910220, job 115019808666](https://github.com/openclaw/openclaw/actions/runs/38311910220/job/115019808666) on `0c4b38b77adfcd32fc25a18f5d0ed7fb97c2faae`, using the exact same fixture blob `b3cdb024f1f3affcf1a811d8e341d8002942d97f`. That includes both disposal outcomes and configured-only lineage coverage. Summed case times were 14.531 s; no file wall time is available. This is reused composition evidence, not an exact-PR-head sibling run; the broader job failed in three other files.

The exact-head baseline ratchets, source contracts, additional boundaries, selected test types and lint jobs passed. Normal commit hooks and diff checks passed. Build artifacts and the published-driver update cell were not selected for this test-only change.

Knip evidence is reused narrowly from [run 38311910220](https://github.com/openclaw/openclaw/actions/runs/38311910220/job/115019807997): both changed test blobs, package/lock/workspace, all-exports configuration and runner match; the primary Knip configuration differs only in a comment. That actual scan reported only three unrelated team-scale exports, all already removed on this branch. This is scoped evidence for this diff, not a claim that the earlier whole-tree scan passed. The same composition's actual Madge check reported zero cycles; this change adds no production import edge. This green PR run does not establish green scheduled CI on main.
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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