Skip to content

test(auto-reply): reuse memory session fixtures - #147262

Merged
steipete merged 1 commit into
mainfrom
codex/test-memory-session-fixtures-main
Sep 13, 2026
Merged

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

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Memory-maintenance tests repeat complete session setup that their existing fixture builder already supplies.

User Impact

Internal-only cleanup; no user-visible behavior changes or required actions.

Why This Change Was Made

Reuse the existing builder for 20 complete session inputs while retaining explicit token counts, runtime pins, property order and fresh allocations. Sparse and clock-order-sensitive fixtures remain explicit. This removes 89 test lines, with no production changes or formatter-only reductions.

Evidence

  • Original baseline and candidate each passed all 130 tests with identical case names, order and outcomes. All assertions and table rows remain unchanged.
  • After integration onto current main at adb6e518, the complete 130-test candidate and required changed-file gate passed again. The earlier baseline is retained as earlier-graph evidence.
  • 22 checks against the actual helper confirmed ordered values, one clock read per construction and fresh nested objects, including both table branches.
  • Independent P2 review found no actionable issues. Its scope remains the identical fixture patch after main integration.

No runtime speedup is claimed. Hosted CI passed on the exact PR head.

@clawsweeper

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

@steipete
steipete marked this pull request as ready for review September 13, 2026 18:16
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 2:24 PM ET / 18:24 UTC.

ClawSweeper review

What this changes

Reuse the existing session fixture builder in memory-maintenance tests while preserving scenario-specific values and fresh objects.

Merge readiness

✅ Ready for maintainer review

This remains a useful, bounded cleanup absent from the inspected main revision. The fixture substitutions preserve test inputs and assertions, and no actionable defect was found.

Priority: P3
Reviewed head: 2fff0de056cba9a0894ca0c967faf1fed0b31055

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with reported equivalent test outcomes and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR changes only test construction; memory-flush and compaction production owners remain unchanged, so no real-runtime demonstration is required.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR changes only test construction; memory-flush and compaction production owners remain unchanged, so no real-runtime demonstration is required.
Evidence reviewed 6 items Introduced change: The complete merge-base-to-head patch replaces 20 session constructions with the existing helper; assertions, table rows, production code, dependencies, and workflows are unchanged.
Fixture equivalence: The existing helper constructs a new object, reads Date.now once, supplies the six removed defaults, and spreads scenario overrides last. Replaced inputs retain their explicit token counts, compaction counts, session identities, runtime pins, and nested allocations. Codex-named scenarios exercise OpenClaw routing through mocked execution; this cleanup makes no dependency-runtime compatibility claim.
Current-main necessity: Comparison with fetched main shows the same fixture-only substitutions still outstanding. No merged replacement is established by the supplied context, and this is test maintenance rather than a shipped-behavior fix.
Findings None None.
Security None None.

How this fits together

OpenClaw’s reply runner performs memory flushing and conversation compaction using session state and context budgets. These tests exercise those decisions with controlled session fixtures and mocked agent execution.

flowchart LR
  A[Test scenario overrides] --> B[Session fixture builder]
  B --> C[Fresh session state]
  C --> D[Memory maintenance]
  E[Context and transcript budgets] --> D
  D --> F[Mocked agent execution]
  D --> G[State and outcome assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -89. Total -89 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 39 128 -89
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 39 128 -89

Review metrics

None.

Technical review

Best possible solution:

Keep common complete-session defaults in the existing builder while leaving sparse and timing-sensitive fixtures explicit.

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

Not applicable: this PR removes repeated test setup rather than reporting a runtime defect; fixture equivalence is directly inspectable in the patch and helper.

Is this the best way to solve the issue?

Yes. Reusing the existing builder preserves scenario coverage without introducing another abstraction or changing production contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is low-risk test-fixture 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 maintainer-authored PR changes only test construction; memory-flush and compaction production owners remain unchanged, so no real-runtime demonstration is required.

Label justifications:

  • P3: This is low-risk test-fixture 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 maintainer-authored PR changes only test construction; memory-flush and compaction production owners remain unchanged, so no real-runtime demonstration is required.

Evidence

What I checked:

  • Introduced change: The complete merge-base-to-head patch replaces 20 session constructions with the existing helper; assertions, table rows, production code, dependencies, and workflows are unchanged. (src/auto-reply/reply/agent-runner-memory.test.ts:423, 2fff0de056cb)
  • Fixture equivalence: The existing helper constructs a new object, reads Date.now once, supplies the six removed defaults, and spreads scenario overrides last. Replaced inputs retain their explicit token counts, compaction counts, session identities, runtime pins, and nested allocations. Codex-named scenarios exercise OpenClaw routing through mocked execution; this cleanup makes no dependency-runtime compatibility claim. (src/auto-reply/reply/agent-runner-memory.test.ts:157, 2fff0de056cb)
  • Current-main necessity: Comparison with fetched main shows the same fixture-only substitutions still outstanding. No merged replacement is established by the supplied context, and this is test maintenance rather than a shipped-behavior fix. (src/auto-reply/reply/agent-runner-memory.test.ts:420, c72435e19089)
  • Merge ownership: Raw test-merge parents match the pinned base followed by the exact PR head; its comparison against that base changes only the test file. Unrelated endpoint drift is not introduced by this PR. (src/auto-reply/reply/agent-runner-memory.test.ts, 09cd7fd52d3a)
  • Validation evidence: The captured PR body reports 130 passing baseline and candidate tests, another complete candidate run after integration, and 22 helper-equivalence checks. These are author-reported results; this read-only review did not execute tests. The local diff whitespace check passed. (src/auto-reply/reply/agent-runner-memory.test.ts, 2fff0de056cb)
  • Area history and routing: Recent main history includes Peter Steinberger’s fixture and transcript-accounting work and Vito Cappello’s session-handoff work. These support routing suggestions, not introduction attribution; deeper pickaxe and blame inspection could not complete because a historical object was unavailable. (src/auto-reply/reply/agent-runner-memory.test.ts, c72435e19089)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vito Cappello: 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 38a4828 into main Sep 13, 2026
173 checks passed
@steipete
steipete deleted the codex/test-memory-session-fixtures-main branch September 13, 2026 19:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'cf45ff4d6a9c13164463db860285a02c1c4f2e8c':
  test(macos): observe readiness cancellation and deadline ownership (#145056)
  fix(ci): route QA Profile Evidence to its run-status owner test (#147293)
  fix(install): preserve runtime links when Node validation fails (#147221)
  test(auto-reply): reuse memory session fixtures (#147262)
  fix: hide subagent sessions from Activity (#147253)
  ci: record resources for slow runtime test commands (#147254)
  fix(update): recognize FreeBSD boot identities in triage leases (#147243)
  refactor(active-memory): share closing tag line scan (#147031)
  fix: resume Settings autosave after Reload Config (#147136)
  fix(cli): keep conversation context after cancellation (#147139)
  fix(channels): make system-agent approval cards actionable (#147152)
  refactor: retain shared database handles until their last worker closes (#147246)
  refactor(slack): share workspace-qualified target resolution (#147024)
  refactor(msteams): remove duplicate quoted-table test (#147270)
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'ac59d5e09eb468dc23cf95e447608b57e71b52af': (176 commits)
  improve(gateway): avoid redundant startup preflight work (#147285)
  test(macos): observe readiness cancellation and deadline ownership (#145056)
  fix(ci): route QA Profile Evidence to its run-status owner test (#147293)
  fix(install): preserve runtime links when Node validation fails (#147221)
  test(auto-reply): reuse memory session fixtures (#147262)
  fix: hide subagent sessions from Activity (#147253)
  ci: record resources for slow runtime test commands (#147254)
  fix(update): recognize FreeBSD boot identities in triage leases (#147243)
  refactor(active-memory): share closing tag line scan (#147031)
  fix: resume Settings autosave after Reload Config (#147136)
  fix(cli): keep conversation context after cancellation (#147139)
  fix(channels): make system-agent approval cards actionable (#147152)
  refactor: retain shared database handles until their last worker closes (#147246)
  refactor(slack): share workspace-qualified target resolution (#147024)
  refactor(msteams): remove duplicate quoted-table test (#147270)
  fix(qa): bind coverage IDs to producer assertions (#144000)
  fix(linux): explain FreeBSD desktop setup prerequisites (#147211)
  fix(memory): split embedding batches rejected for an input array item cap (#139541)
  test: isolate timing metadata persistence from inherited settings (#147112)
  refactor(status): retire test-only helper publication (#147071)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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: 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