Skip to content

fix(test): keep Codex validation error fixture invalid - #200684

Merged
vincentkoc merged 1 commit into
mainfrom
fix/test-codex-validation-fixture-20261118
Nov 17, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/test-codex-validation-fixture-20261118

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The hourly Codex tests fail their bounded validation-error check because its ten numeric values now validly coerce to strings after #193200. The fixture therefore executes the tool instead of exercising rejection.

User Impact

No runtime behavior changes. Restore the test of bounded validation errors returned to Codex.

Why This Change Was Made

Use empty objects for the string fields so they remain invalid after the shared coercion step. Preserve the execution-rejection, omitted-violation, detail-truncation, and response-length assertions.

Evidence

  • Original failure: hourly Codex shard. The unchanged case reproduced the same unexpected execution with all ten values converted to "47".

  • Candidate: all 52 tests in dynamic-tools.test.ts pass under pinned Bun (7.34 seconds reported by Vitest; 8.95 seconds wall time). The original focused failure took 37.25 seconds including cold worker compilation.

  • Targeted type-aware lint, formatting, and git diff --check pass. Fresh full-source P0–P3 review found no actionable issues.

  • Local proof used the qualified native620 checkout with the two exact current validation owners and candidate test overlaid; original bytes were restored. This is bounded bridge-owner proof, not a full current-main or real-Gateway run. PR CI supplies broader coverage.

  • Exact-head CI 44123517060 completed with one setup failure: job134182012909 exhausted Git PPA downloads with HTTP503 and exited100 before Node/dependencies/tests. The aggregate failed downstream; all other selected jobs, including security, passed. The CI checkout was merge ee6bba6bef60226d5ad1801e217649a49abf78d8, whose tree exactly equals this PR head. CI workflow, setup action, and Git installer blobs match the baseline. This inherited infrastructure failure remains recorded as failed CI; it is not a passing test result.

@vincentkoc vincentkoc self-assigned this Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review November 17, 2026 16:14
@vincentkoc
vincentkoc enabled auto-merge (squash) November 17, 2026 16:17
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Replace numeric test values with empty objects so the Codex validation-error fixture remains invalid after argument coercion.

Example: The bounded-error test supplies ten fields declared as strings.

  • Before: Each value 47 becomes "47", execution succeeds, and the rejection assertion fails.
  • After: Each value {} remains invalid, exercising rejection and the omitted-violation response limit.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The narrow repair is correct by source inspection, with an independently visible original failure and reported focused success; exact-head broad tests have not run.
Proof confidence 🦐 gold shrimp (3/6) This test-only repair requires no shipped-entry-point demonstration; the body reports the original failure and 52 passing bridge tests with the current validation owners overlaid.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: The hourly Codex suite fails because an intended rejection fixture now contains valid coercible values.
Reason: The maintainer-authored change restores distinct error-bounding coverage without changing production behavior or adding test machinery.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR restores a meaningful validation-error test with the smallest complete change; no actionable patch defects were found.

Priority: P2
Reviewed head: 4b15a6d2e67b2a8673bfd5f4a43ff633ee369bd2

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Codex dynamic-tool bridge receives JSON arguments, runs shared argument coercion and schema validation, and returns tool results or bounded validation errors.

flowchart LR
  A[Codex tool call] --> B[Dynamic tool bridge]
  B --> C[Shared argument coercion]
  C --> D[Schema validation]
  D --> E[Tool execution]
  D --> F[Bounded error response]
Loading

Technical review

Best possible solution:

Land this fixture-only repair once the required CI checks complete successfully.

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

The hourly failure trace shows the exact unexpected execution, and current source explains its numeric-to-string conversion; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Changing the invalid fixture is appropriate because coercion is intentional and objects remain invalid; weakening assertions or reverting production coercion would defeat existing contracts.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Bounded Codex validation-error fixture keeps the original intent (fix(codex): reject malformed native tool arguments #124649: Reject malformed native arguments before execution and bound returned validation details; later consolidation retained these contracts.)
  • Shared argument coercion keeps the original intent (40437fa: Make validated OpenClaw tool routes accept the same coercible inputs as direct agent-loop calls.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 834900c adds extensions/codex/src/app-server/dynamic-tools.test.ts:332 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 834900cda81c; files: extensions/codex/src/app-server/dynamic-tools.test.ts)
  • PollyBot13: Raw commit cef77d1 adds extensions/codex/src/app-server/dynamic-tools.test.ts:303 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cef77d1aeb49; files: extensions/codex/src/app-server/dynamic-tools.test.ts)

PR surface

Tests 0. Total 0 across 1 file. Added test files: 0.

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

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: A confirmed test-fixture regression breaks Codex validation coverage and the hourly shard without changing runtime behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A confirmed test-fixture regression breaks Codex validation coverage and the hourly shard without changing runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 17, 2026, 11:29 AM ET / 16:29 UTC.

@vincentkoc
vincentkoc disabled auto-merge November 17, 2026 16:31
@vincentkoc
vincentkoc merged commit 3aa72ab into main Nov 17, 2026
192 of 195 checks passed
@vincentkoc
vincentkoc deleted the fix/test-codex-validation-fixture-20261118 branch November 17, 2026 16:34
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
RomneyDa added a commit that referenced this pull request Nov 20, 2026
Preserve intentional numeric-to-string coercion and use an actually invalid object in the high-cardinality fixture. Baseline reproduced; fixed file 52 tests pass. Targeted parent lint/format pass.

(cherry picked from commit 3aa72ab)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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