Skip to content

test(codex): trim duplicate app-server regressions - #124141

Merged
steipete merged 1 commit into
mainfrom
test/trim-codex-duplicate-tests
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/trim-codex-duplicate-tests

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes three Codex app-server tests that repeat stronger regressions at the same or more observable boundary: an intermediate prepared approval-policy assertion, a simple unphased replacement sequence, and a plain silent-final sequence.

Why This Change Was Made

The retained wire-level yolo test verifies both thread/start and turn/start approval/sandbox payloads. The retained unphased-plus-silent-final sequence proves replacement survives a later terminal item. The retained JSON silent payload test captures the structured regression, while the shared delivery contract independently covers plain, padded, and JSON silent classification.

Direct sibling Codex inspection confirms the underlying contracts: phase is optional with legacy-final semantics, turn/completed.items is only a last-message summary, and Never is the no-approval policy applied through turn settings.

User Impact

No runtime behavior changes. Codex coverage stays focused on the strongest wire and event sequences instead of retaining simpler subsets.

Evidence

  • Codex connection, full run-attempt, event projector, delivery contract, and shared token owners: 5 files, 245 tests passed across two Vitest shards.
  • extensionTests changed gate passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready; extension test typecheck, formatting, lint, dead-export scan, and plugin/dependency guards passed.
  • git diff --check passed.
  • Fresh complete-branch structured autoreview reported no accepted/actionable findings.
  • Direct sibling Codex source at 2ca575026cef066a58c70f6bdee4feafa6e63d3a inspected:
    • codex-rs/protocol/src/items.rs:116-134 and models.rs:794-808
    • codex-rs/app-server/src/thread_state.rs:174-187
    • codex-rs/app-server/src/bespoke_event_handling.rs:979-1034,1277-1302
    • codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs:268-300
    • codex-rs/protocol/src/protocol.rs:914-937
    • codex-rs/app-server/src/request_processors/turn_processor.rs:532-550,685-824

Production delta: 0. Tests: -92. No docs, config, schema, protocol, dependency, or changelog change.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 15, 2026 09:48
@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 Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 5:54 AM ET / 09:54 UTC.

ClawSweeper review

What this changes

Removes three Codex app-server regression tests that the branch describes as subsets of broader retained wire-level and terminal-sequence coverage.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer review: this is a coherent test-only consolidation, but its rationale depends on upstream Codex protocol semantics that cannot be independently checked because the required sibling Codex checkout is absent. The protected maintainer label also prevents automated cleanup.

Priority: P3
Reviewed head: ba614668176d45376c2f8e8dfb326f130474e09b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused test-only consolidation with stronger retained local boundary coverage; direct upstream contract verification remains a maintainer gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only cleanup has no changed user-visible runtime behavior requiring external real-behavior proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only cleanup has no changed user-visible runtime behavior requiring external real-behavior proof.
Evidence reviewed 6 items Retained terminal-sequence coverage: The retained scenarios still exercise an unphased replacement after an earlier final, including a later normal final and a later silent final, and assert the earlier candidate is absent from output.
Current owner behavior: The projector delegates item and turn-completion notifications to the assistant projection; its authoritative terminal-item selection explicitly accepts an omitted phase and its result builder handles silent payloads separately.
Independent silent-payload contract: The shared delivery contract covers plain, padded, and JSON silent payload classification at the Codex projector boundary.
Findings None None.
Security None None.

How this fits together

The Codex plugin translates app-server notifications into OpenClaw assistant output and sends resolved approval and sandbox policy in thread and turn requests. These tests protect the event projector’s terminal-answer selection and the connection path’s policy propagation.

flowchart LR
  A[Codex app-server notifications] --> B[OpenClaw event projector]
  B --> C[Assistant candidate selection]
  C --> D[Assistant transcript output]
  E[Resolved approval and sandbox policy] --> F[Connection preparation]
  F --> G[Thread and turn requests]
  G --> A
Loading

Decision needed

Question Recommendation
Should this maintainer-authored test consolidation land after direct inspection of the cited upstream Codex protocol and app-server source? Verify upstream contract, then land: Inspect the cited Codex source at the relevant revision and land if it confirms optional phase, last-message summary, and no-approval behavior.

Why: The local tests indicate overlap, but repository policy forbids a Codex dependency-contract verdict without the acting reviewer directly inspecting the sibling Codex source.

Before merge

  • Resolve merge risk (P1) - The test deletion relies on optional-phase and turn-summary semantics from upstream Codex; direct source verification is mandatory here but cannot be completed without the required sibling checkout.
  • Complete next step (P2) - No repair lane: the protected maintainer label and unavailable direct Codex contract check require maintainer review.
Agent review details

Security

None.

PR surface

Tests -92. Total -92 across 2 files.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production 0, tests -92 This removes only regression coverage, so landing depends on retained tests preserving each independent contract.

Stored data model

Persistent data-model change detected: serialized state: extensions/codex/src/app-server/event-projector.assistant.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain one owner-boundary regression per behavior only after a maintainer independently verifies the cited Codex protocol semantics; otherwise restore the narrowly targeted test whose contract cannot be confirmed.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain one owner-boundary regression per behavior only after a maintainer independently verifies the cited Codex protocol semantics; otherwise restore the narrowly targeted test whose contract cannot be confirmed.

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

Not applicable: this PR changes only test coverage and reports no production defect to reproduce.

Is this the best way to solve the issue?

Unclear: local source supports the consolidation, but direct upstream Codex contract inspection is required before calling it the best safe coverage reduction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c9da900a961e.

Labels

Label changes:

  • add P3: This is a test-maintenance cleanup with no runtime, configuration, or user-visible 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: This maintainer-authored, test-only cleanup has no changed user-visible runtime behavior requiring external real-behavior proof.

Label justifications:

  • P3: This is a test-maintenance cleanup with no runtime, configuration, or user-visible 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: This maintainer-authored, test-only cleanup has no changed user-visible runtime behavior requiring external real-behavior proof.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame attributes the removed coverage to Peter Steinberger’s Codex work, including the recent coverage commit and the earlier unattended-approval repair. (role: feature owner and recent area contributor; confidence: high; commits: 079bb3419613, a19132e7ebc1; files: extensions/codex/src/app-server/event-projector.assistant.test.ts, extensions/codex/src/app-server/run-attempt-connection.test.ts, extensions/codex/src/app-server/run-attempt.test.ts)

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

Copy link
Copy Markdown
Contributor Author

Land-ready proof for ba614668176d45376c2f8e8dfb326f130474e09b:

Direct Codex contract proof at sibling SHA 2ca575026cef066a58c70f6bdee4feafa6e63d3a:

  • Optional phase and legacy-final semantics: codex-rs/protocol/src/items.rs:116-134, codex-rs/protocol/src/models.rs:794-808.
  • Last-message-only turn summary: codex-rs/app-server/src/thread_state.rs:174-187, codex-rs/app-server/src/bespoke_event_handling.rs:979-1034,1277-1302, codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs:268-300.
  • No-approval policy and turn override application: codex-rs/protocol/src/protocol.rs:914-937, codex-rs/app-server/src/request_processors/turn_processor.rs:532-550,685-824.

Production delta: 0. Tests: -92. No behavior, docs, config, schema, protocol, dependency, or changelog change.

@steipete
steipete merged commit 20e81a7 into main Aug 15, 2026
171 checks passed
@steipete
steipete deleted the test/trim-codex-duplicate-tests branch August 15, 2026 09:56
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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