Repository navigation
test(agents): share sparse transcript input fixtures - #139589
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 9:25 PM ET / September 6, 2026, 01:25 UTC. ClawSweeper reviewWhat this changesShares minimal transcript fixtures across the repair and tool-call-ID tests while preserving deliberately missing metadata and existing assertions. Merge readiness✅ Ready for maintainer review Keep open as a useful, bounded test cleanup with no actionable findings. The previous draft-only blocker is resolved, and the consolidation is absent from the inspected main revision. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw prepares conversation history for model replay by repairing tool-call/result pairing and normalizing IDs. These tests feed malformed and legacy messages through those owners and verify the resulting transcript. flowchart LR
A[Legacy and malformed messages] --> B[Shared sparse fixtures]
B --> C[Transcript repair tests]
B --> D[Tool call ID tests]
C --> E[Production replay helpers]
D --> E
E --> F[Unchanged expected transcripts]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -237. Total -237 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep sparse fixture construction lightweight while retaining independent literal expectations and all existing replay scenarios. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates existing test inputs rather than fixing a reported runtime defect. Is this the best way to solve the issue? Yes. Minimal constructors preserve the intentionally incomplete message shapes that the existing complete-message builders would change. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against abd18df28d85. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* origin/main: fix(cli): keep note text with Windows and Unicode line endings (#139512) fix(agents): keep isolated completion context on its admitted generation (#139607) fix: avoid declaration builds during source-server updates (#139392) fix(models): keep discovered models after catalog refresh failures (#139357) fix(gateway): record a transcript notice when a run fails before replying (#139439) refactor(ios): reuse shared integer conversion (#139581) fix(sessions): prevent database lock failures during reclamation (#139469) perf(test): reuse transforms within owned scheduler slots (#139553) test(agents): share sparse transcript input fixtures (#139589) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479)
* commit 'refs/openclaw/tasks/pr-135167-main': (2467 commits) refactor(ios): reuse shared integer conversion (#139581) fix(sessions): prevent database lock failures during reclamation (#139469) perf(test): reuse transforms within owned scheduler slots (#139553) test(agents): share sparse transcript input fixtures (#139589) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) ...
Related: #139428
What Problem This Solves
Transcript-repair and tool-call-ID suites repeat sparse input message construction. Complete message builders would add metadata that these legacy and malformed-input scenarios deliberately omit.
Why This Change Was Made
Share two neutral sparse constructors and reuse the ID suite's existing text-result builder for exactly matching inputs. Preserve supplied content references, fresh object allocation, property absence versus explicit false/undefined, legacy aliases, policy options and literal expected outputs.
User Impact
No production behavior changes or scenarios removed. Net 237 test/support lines removed: tests -255, local support +18.
Evidence
All 94 owner test identities match baseline and pass, along with 15 replay-composition sibling cases. Whole-program AST expansion preserves original fixtures, assertions, options and expected outputs. Runtime checks verify fresh allocations, retained content references and optional-property presence.
The full changed gate, formatting/diff checks, deslop and independent P2 review pass. Recorded owner timings were 1.90s before and 1.65s after, with roughly 362/360 MiB peak RSS; this small warmed comparison is not an established runtime improvement.