Skip to content

test(agents): reuse complete Responses model fixtures - #147015

Merged
steipete merged 1 commit into
mainfrom
codex/test-responses-model-fixtures
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-responses-model-fixtures

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Responses transport tests repeat complete model defaults that are already owned by their shared fixture builder.

User Impact

Internal-only test maintenance; there is no user-visible behavior change.

Why This Change Was Made

Reuse the existing builder for ten complete model inputs, retaining explicit scenario values, fresh nested objects, and every assertion. Remove seven redundant outer casts. The intentionally unsupported supportsStore fixture remains unchanged after the typecheck correctly rejected including it in the typed builder.

The change removes 55 test lines with no helper or production edits. One input moves compat after the default fields; the tested consumers read named fields and construct separate request objects, so this does not alter an ordering contract.

Evidence

The full four-file baseline and initial candidate each passed 103 cases. After retaining the unsupported fixture, the complete affected file passed all 17 cases again; the other three files were unchanged. Per-file case names, order, and outcomes match, with no skips. Ten controls against the actual helper confirm equal values/property descriptors and fresh allocations. The corrected mapped gate, including actual typechecks, and fresh independent P2 review passed. The superseded typecheck failure was preserved and resolved by excluding the unsupported input, without widening types or adding casts.

@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 12:21
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling 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, 8:28 AM ET / 12:28 UTC.

ClawSweeper review

What this changes

Reuses the existing Responses model fixture builder in ten test inputs while preserving scenario values and assertions.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, behavior-preserving cleanup that remains absent from the inspected main revision. No actionable correctness findings were identified, and the protected maintainer label precludes automated closure.

Priority: P3
Reviewed head: 184143119b6cd26d73cb14311be6cfc9747527f3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused cleanup preserves test inputs and assertions, with useful reported validation and no identified defects.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a maintainer-authored PR, and no production owner or authority behavior changes; reported test-equivalence checks are appropriate supplemental evidence for this cleanup.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a maintainer-authored PR, and no production owner or authority behavior changes; reported test-equivalence checks are appropriate supplemental evidence for this cleanup.
Evidence reviewed 8 items Introduced scope: The pinned merge-base-to-head comparison contains only the four supplied test files; the host-verified test merge preserves that scope. No production, dependency, workflow, or shared-helper changes are introduced.
Equivalent fixture defaults: The existing builder creates fresh input and cost objects, supplies the removed defaults, and applies overrides last. All ten replacements preserve their explicit scenario values.
Typed compatibility boundary: The local Model contract supports the reasoning and instructions overrides used by the replacements. supportsStore is absent from OpenAIResponsesCompat, and its intentionally unsupported test input remains unchanged.
Findings None None.
Security None None.

How this fits together

OpenClaw’s Responses transport converts conversation context and model settings into provider requests and streams results back to agents. These tests exercise request shaping, recovery, and HTTP status handling using shared model fixtures.

flowchart LR
  A[Scenario model settings] --> B[Shared fixture builder]
  B --> C[Complete test models]
  D[Conversation and provider fixtures] --> E[Responses transport]
  C --> E
  E --> F[Requests and streamed results]
  F --> G[Existing assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -55. Total -55 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 21 76 -55
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 21 76 -55

Review metrics

None.

Technical review

Best possible solution:

Keep common model defaults in the existing fixture builder while retaining explicit scenario overrides and independent transport assertions.

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

Not applicable: this PR consolidates test setup rather than reporting a runtime defect; fixture equivalence was checked from source.

Is this the best way to solve the issue?

Yes: reusing the existing typed builder removes duplicated defaults without adding a helper, weakening assertions, or widening the model contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is internal test maintenance with preserved assertions and 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 supplied repository state identifies a maintainer-authored PR, and no production owner or authority behavior changes; reported test-equivalence checks are appropriate supplemental evidence for this cleanup.

Label justifications:

  • P3: This is internal test maintenance with preserved assertions and 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 repository state identifies a maintainer-authored PR, and no production owner or authority behavior changes; reported test-equivalence checks are appropriate supplemental evidence for this cleanup.

Evidence

What I checked:

  • Introduced scope: The pinned merge-base-to-head comparison contains only the four supplied test files; the host-verified test merge preserves that scope. No production, dependency, workflow, or shared-helper changes are introduced. (184143119b6c)
  • Equivalent fixture defaults: The existing builder creates fresh input and cost objects, supplies the removed defaults, and applies overrides last. All ten replacements preserve their explicit scenario values. (src/agents/openai-transport-stream.test-harness.ts:48, 184143119b6c)
  • Typed compatibility boundary: The local Model contract supports the reasoning and instructions overrides used by the replacements. supportsStore is absent from OpenAIResponsesCompat, and its intentionally unsupported test input remains unchanged. (packages/llm-core/src/types.ts:565, 184143119b6c)
  • Production owner and dependency boundary: The test support module imports OpenClaw’s own packages/ai request-shaping and replay implementations. The changed fixtures use ordinary openai-responses routes; the cleanup does not depend on a Codex harness contract. Inspected consumers read named model fields and construct separate requests, so the changed position of compat has no observed ordering contract. (src/agents/openai-transport-stream.test-support.ts:10, 184143119b6c)
  • Still distinct from main and release: The inspected main revision retains the inline inputs replaced by this branch and has the same shared builder. The latest release also retains the two inline proxy fixtures. No merged replacement was established; the narrow GitHub search was unavailable. (src/agents/openai-transport-stream.reasoning-and-cache.test.ts:272, 3a9d69db306c)
  • Validation evidence: The captured PR body reports matching baseline/candidate outcomes for 103 cases, a final 17-case rerun after excluding the unsupported fixture, allocation/equivalence controls, and corrected typechecks. Supplied checks include successful test types and changed-node tests. This review ran no tests; the read-only diff whitespace check passed. (184143119b6c)

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.

@steipete
steipete merged commit b5a3107 into main Sep 13, 2026
171 checks passed
@steipete
steipete deleted the codex/test-responses-model-fixtures branch September 13, 2026 13:05
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-145950: (101 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '060e856e5f9df245d63c98990fcb47e18108c6b9': (97 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-137049: (110 commits)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  ...
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

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