Skip to content

test(agents): share sparse transcript input fixtures - #139589

Merged
steipete merged 1 commit into
mainfrom
codex/test-audit-sparse-transcript-fixtures
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-audit-sparse-transcript-fixtures

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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.

@clawsweeper

clawsweeper Bot commented Sep 6, 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 agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Sep 6, 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 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 9:25 PM ET / September 6, 2026, 01:25 UTC.

ClawSweeper review

What this changes

Shares 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
Reviewed head: e77db5ce2ef91b3c9296e5538955b184e9c6004d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with useful reported validation and no actionable review findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER association exempts this test-only PR from external-contributor runtime proof; fixture equivalence and reported focused test results address its actual scope.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER association exempts this test-only PR from external-contributor runtime proof; fixture equivalence and reported focused test results address its actual scope.
Evidence reviewed 7 items Introduced changes preserve fixture semantics: Read both complete test files and their introduced diffs. Replacements retain content, ordering, legacy aliases, policy options, assertions, and literal expected outputs; no production files are changed.
Sparse construction remains distinct from complete builders: The new constructors allocate fresh objects, retain the supplied assistant-content reference, and spread optional fields without adding defaults. Existing complete assistant builders add provider, model, usage, stop reason, and timestamp, making them unsuitable replacements for deliberately sparse fixtures.
Still distinct from main and latest release: The two tests and production owners are unchanged between the pinned merge base and fetched main. The new sparse helper is absent from fetched main and v2026.9.2; no merged replacement is established by the supplied related context.
Findings None None.
Security None None.

How this fits together

OpenClaw 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -237. Total -237 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 256 493 -237
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 256 493 -237

Review metrics

None.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is a test-maintenance 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 supplied MEMBER association exempts this test-only PR from external-contributor runtime proof; fixture equivalence and reported focused test results address its actual scope.

Evidence

What I checked:

  • Introduced changes preserve fixture semantics: Read both complete test files and their introduced diffs. Replacements retain content, ordering, legacy aliases, policy options, assertions, and literal expected outputs; no production files are changed. (src/agents/session-transcript-repair.test.ts:40, e77db5ce2ef9)
  • Sparse construction remains distinct from complete builders: The new constructors allocate fresh objects, retain the supplied assistant-content reference, and spread optional fields without adding defaults. Existing complete assistant builders add provider, model, usage, stop reason, and timestamp, making them unsuitable replacements for deliberately sparse fixtures. (src/agents/test-helpers/sparse-transcript.test-support.ts:1, e77db5ce2ef9)
  • Still distinct from main and latest release: The two tests and production owners are unchanged between the pinned merge base and fetched main. The new sparse helper is absent from fetched main and v2026.9.2; no merged replacement is established by the supplied related context. (src/agents/test-helpers/sparse-transcript.test-support.ts, 3928bad9badf)
  • Review continuity and sponsored scope: The supplied snapshot records draft=false and a ready-for-review event after the previous review requested only leaving draft. The linked campaign, Test audit: reduce redundant test code and full-suite runtime #139428, explicitly sponsors independently reviewed test consolidation while preserving behavioral coverage. (e77db5ce2ef9)
  • Validation evidence and review limits: The captured PR body reports 94 retained owner cases and 15 replay-composition sibling cases passing, AST fixture equivalence, allocation/property checks, and the changed gate. These are contributor-reported results; this read-only review ran no tests. The inspected diff passes git diff --check. (e77db5ce2ef9)
  • Area-history routing: Current-main path history includes Peter Steinberger's prior fixture documentation and test refactors, independently supporting routing beyond authorship of this PR. Older blob inspection failed because required objects could not be fetched; no source-line introduction attribution is claimed. (src/agents/test-helpers/agent-message-fixtures.ts, 87b5796649be)

Likely related people:

  • steipete: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T01:18:39.617Z sha e77db5c :: needs changes before merge. :: none

@steipete
steipete marked this pull request as ready for review September 6, 2026 01:21
@steipete
steipete merged commit a475d1d into main Sep 6, 2026
169 checks passed
@steipete
steipete deleted the codex/test-audit-sparse-transcript-fixtures branch September 6, 2026 01:45
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
* 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)
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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: L 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