Repository navigation
refactor(sessions): isolate legacy transcript fixtures - #115231
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 10:56 AM ET / 14:56 UTC. ClawSweeper reviewWhat this changesThis PR replaces the global legacy JSONL Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 6 items remain Keep this PR open for maintainer review. The fixture-isolation direction is sound, but it removes an exported Plugin SDK test-contract symbol without evidence that no shipped or external consumer imports it; its stated validation is also test/CI-only rather than direct after-fix behavior proof. Likely related people: Priority: P3 Review scores
Verification
How this fits togetherOpenClaw production sessions now use SQLite or in-memory managers, while a limited set of legacy tests still need observable JSONL files. The fixture layer feeds those tests with decorated in-memory managers, while the production flowchart LR
A[Legacy JSONL tests] --> B[Explicit fixture factory]
B --> C[In-memory session manager]
C --> D[Test-only file persistence]
D --> E[Legacy transcript assertions]
F[Production session callers] --> G[Production SessionManager]
G --> H[SQLite or in-memory runtime state]
H --> I[Gateway and embedded-agent flows]
Decision needed
Why: The branch intentionally deletes a named exported helper to eliminate unsafe global class mutation, but repository policy requires direct compatibility evidence before removing a potentially shipped Plugin SDK surface. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -10, Tests +5. Total -5 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the fixture-local design, first establish the release/consumer status of the removed test-contract export, then either retain a narrowly documented migration path for shipped consumers or remove it with proof that it is internal-only; add redacted direct execution evidence for the isolated fixture behavior. Do we have a high-confidence way to reproduce the issue? Yes, at source level: importing the old adapter patched static methods onto the shared Is this the best way to solve the issue? Unclear: instance-local decoration is the narrower maintainable fix for the global mutation, but deleting the barrel export is only the best solution after its shipped/external compatibility status is proven. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 206f989069fb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…etwork-none * origin/main: (24 commits) refactor(sessions): isolate legacy transcript fixtures (#115231) fix(discord): clear pending launch watchdog (#115100) fix(agents): stop quadratic subagent prompt rendering (#115263) fix(memory-core): recover dreaming cron reconciliation (#115174) fix(qa-lab): filter incompatible channel scenarios (#115087) fix(android): respect locale in compact labels test(i18n): prove iOS discovery catalog ownership chore(i18n): refresh gateway discovery catalogs fix(i18n): include shared discovery copy in macOS catalog fix(apple): localize gateway discovery status chore(i18n): drop release-owned changelog entry fix(macos): localize privacy permission prompts fix(voice-call): bracket IPv6 webhook hosts (#115135) test(ci): split control UI scope coverage fix(ui): detect composed accessibility copy fix(ci): run localization checks for UI changes test(ui): catch untranslated accessibility labels fix(ui): localize chat action labels fix(ui): localize chat status indicators fix(ui): sync document locale metadata ...
…-20260728 * origin/main: (21 commits) refactor(sessions): isolate legacy transcript fixtures (#115231) fix(discord): clear pending launch watchdog (#115100) fix(agents): stop quadratic subagent prompt rendering (#115263) fix(memory-core): recover dreaming cron reconciliation (#115174) fix(qa-lab): filter incompatible channel scenarios (#115087) fix(android): respect locale in compact labels test(i18n): prove iOS discovery catalog ownership chore(i18n): refresh gateway discovery catalogs fix(i18n): include shared discovery copy in macOS catalog fix(apple): localize gateway discovery status chore(i18n): drop release-owned changelog entry fix(macos): localize privacy permission prompts fix(voice-call): bracket IPv6 webhook hosts (#115135) test(ci): split control UI scope coverage fix(ui): detect composed accessibility copy fix(ci): run localization checks for UI changes test(ui): catch untranslated accessibility labels fix(ui): localize chat action labels fix(ui): localize chat status indicators fix(ui): sync document locale metadata ...
* origin/main: (199 commits) refactor(workboard): tidy Control UI card execution helpers (openclaw#115195) perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281) fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232) fix: restore Fish completion after global CLI options (openclaw#115222) refactor(agents): collapse the client-tool catalog branch (openclaw#115212) fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957) fix(agents): prevent repeated Code Mode output across waits (openclaw#115213) refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229) fix(cli): reject malformed infer model refs (openclaw#115225) feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (openclaw#115264) test(migrations): avoid mtime precision in checkpoint fixture (openclaw#115269) test(signal): verify archive limits without malformed tar (openclaw#115270) refactor(sessions): isolate legacy transcript fixtures (openclaw#115231) fix(discord): clear pending launch watchdog (openclaw#115100) fix(agents): stop quadratic subagent prompt rendering (openclaw#115263) fix(memory-core): recover dreaming cron reconciliation (openclaw#115174) fix(qa-lab): filter incompatible channel scenarios (openclaw#115087) fix(android): respect locale in compact labels test(i18n): prove iOS discovery catalog ownership ...
* test(sessions): isolate legacy file fixtures * test(sessions): hide fixture-only manager type
Related: #113233
What Problem This Solves
The SQLite transcript teardown retained a test-only compatibility installer that patched
SessionManager.createandSessionManager.openFileonto the shared production class. Importing one legacy fixture therefore changed the constructor API for every test in the worker, and a declaration merge made those retired file methods look like real runtime surface.This is a maintainer-requested follow-up to #113233. AI-assisted implementation and review were used; the resulting boundary and proof were manually checked.
Why This Change Was Made
Legacy JSONL tests now opt into explicit file-backed fixture factories. The factories decorate only the returned in-memory manager, preserve the old write-through, rotation, cwd, and newline behavior, and leave the production constructor untouched. The embedded-runner E2E fixture now uses storage-neutral compatibility keys and canonical SQLite targets for the tests that inspect persisted history.
The removed installer was internal-only and never shipped. It was introduced by untagged commit
4273ca9dbd9b3e3172f34a7231d41bcd8b5d200c;git tag --containsreturns zero tags. The package inventory explicitly excludes bothdist/plugin-sdk/agent-runtime-test-contracts.jsand its declaration, and a live dry-run inventory of[email protected]contains neither that barrel norsession-manager-file-compat.User Impact
There is no user-visible runtime change. Test fixtures no longer manufacture production-looking file persistence APIs, and the embedded-runner coverage now exercises the current SQLite ownership contract.
Evidence
Direct after-fix Testbox proof: run 30375350433 printed:
{"productionRetiredStaticsAbsent":true,"fixtureFileExists":true,"reopenedMessageCount":1,"reopenedText":"fixture proof"}Compatibility proof:
git tag --contains 4273ca9dbd9b3e3172f34a7231d41bcd8b5d200c | wc -lreturned0.package.jsonexcludes the test-contract JS and declaration files from the npm package.npm pack openclaw@latest --dry-run --jsonresolved2026.7.1-2and found zero paths containingagent-runtime-test-contractsorsession-manager-file-compat.Blacksmith Testbox
tbx_01kymdaxsms6qztfag69dnevc9(run 30361705407):Exact-head PR CI run 30369330386: dependency/dead-code, SDK, type, lint, build, and changed-surface lanes passed. Its only failed shard was an unrelated UI test-state leak (
#agent-tool-read); the failed-job rerun passed, includingopenclaw/ci-gate.Targeted formatting passed for all changed files;
git diff --checkis clean.Codex autoreview (
gpt-5.6-sol, high) was clean before the initial commit and after the CI fix, with no accepted/actionable findings.ClawSweeper rank-up moves