Skip to content

fix(codex): native persona test fails after policy framing - #196497

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/codex-persona-ci-gap
Nov 10, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/codex-persona-ci-gap

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Related maintainer request: https://x.com/vincent_koc/status/2119631310474076613

What Problem This Solves

Fixes: the native Codex persona regression test fails after generic policy refresh switched to framed thread_policy handoffs in #189112, despite persona withdrawal reaching the model.

User Impact

No user-visible runtime change. Developers retain real native coverage for shared persona creation, edits, and withdrawal without depending on retired handoff wording. No migrations or user actions are required.

Why This Change Was Made

Inspect the latest framed OpenClaw policy in each actual Responses request, rather than searching historical developer messages for legacy refresh prose. Require the current SOUL and shared USER in that policy, reject retired SOUL content, and retain the model-owned collaboration policy, personal USER omission, and single native thread checks.

Simplification: reuse the existing isolated WebSocket/native fixture; no production changes or new test seams. Test delta: 20 additions / 20 deletions, zero net test lines, so no allocation increase.

Evidence

  • Reproduced on base baccc7e152916c7f4a48596b5cb544c12264ac54: the external WebSocket persona case failed at handoffs.length > 0 (actual 0); the ordinary catalog and incognito-compaction siblings passed.
  • Real pinned Codex binary, isolated HOME/CODEX_HOME, externally listening WebSocket Harness, and loopback Responses fixture: repaired native file 3/3 passed, including persona creation, edit, withdrawal, shared USER, personal-overlay omission, model policy, and one thread. Final native-file wall time 10.51s, test cases 3.98s; initial cold reproduction wall time 69.72s included worker compilation.
  • node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt.skills.native.test.ts extensions/codex/src/app-server/thread-policy.test.ts --maxWorkers=1: 6/6 passed across both files.
  • Extension-test typecheck, focused type-aware oxlint, focused format check, git diff --check, and test-line ratchet passed (zero test-line growth; inherited ceiling debt unchanged).
  • Personally inspected sibling Codex 8f73cdee456b6c46b791780d40cadf9d556d22a4: codex-rs/app-server/src/request_processors/turn_processor.rs (thread_inject_items_response_inner), codex-rs/core/src/codex_thread.rs (inject_response_items), and codex-rs/core/src/session/mod.rs (initial developer context). Native injection appends history, so the latest framed policy—not all historical messages—is the relevant assertion boundary.
  • Fresh independent local autoreview, Codex gpt-6.1-sol, P0–P2, complete local candidate against base baccc7e152916c7f4a48596b5cb544c12264ac54: scoped-clean, no actionable findings. Source and final candidate verification completed; review did not independently rerun tests. Hosted ClawSweeper also reviewed exact head 1add3ad1849aa12138ae2ac6fb363b7b7d2dda8f with no actionable findings.
  • Published-head changed-node CI passed in 129s. A fresh complete API inventory after recovery observed 203/203 latest checks, no pending or failed checks; skipped checks are not described as executed proof.
  • The initial OpenGrep job scanned the changed test with 0 findings, then failed its SARIF upload on installation API rate limiting. Its raw artifact was retained. After the cooldown, one authorized rerun of that job was accepted at 08:22:13 UTC. Attempt 2 / job 129714325454 scanned 105 rules / 1 file / 0 findings and successfully uploaded results at 08:23:17 UTC; the workflow completed successfully. Recovered SARIF artifact. No suppression or bypass was used. The original failed attempt is historical evidence, not relabeled as a pass.

Requested and scoped by @vincentkoc.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 10, 2026 07:17
Inspect the latest framed thread policy in each native Responses request, including persona edits and withdrawal. Preserve shared USER, model policy, personal overlay isolation, and native thread identity proof.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: f4230c8e-9672-4f32-be91-ac2466543e6b
@clawsweeper

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

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 10, 2026 07:19
@roboclaw-bot roboclaw-bot changed the title fix(codex): keep native persona refresh regression current fix(codex): native persona test fails after policy framing Nov 10, 2026
@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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR updates the native Codex persona test to inspect the latest framed policy in each model request.

Example: SOUL.md changes from SYNTHETIC_REMOTE_PERSONA_FIRST to SYNTHETIC_REMOTE_PERSONA_EDITED and is then deleted.

  • Before: The withdrawal assertion fails because it searches for retired handoff wording.
  • After: Each request must contain the current shared USER and persona, with withdrawn persona absent from its latest policy.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, correct test repair supported by source inspection, reported native harness results, and passing changed-node CI; independently inspected execution logs were unavailable.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only repair has no changed shipped behavior requiring contributor media; the supplied native harness reports exercise creation, edit, and withdrawal through real Codex WebSocket and HTTP transports.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Developers encounter a false native persona regression failure after the intentional policy framing change.
Reason: The maintainer-authored patch restores useful coverage without changing runtime behavior, configuration, or the established persona contract.

Regression provenance

Regression provenance — verified: source commit c53974ad5d19 by Dmitry Golubev; canonical PR #189112 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a stale native regression assertion while preserving persona refresh and privacy coverage; no actionable patch defect was found.

Priority: P3
Reviewed head: 1add3ad1849aa12138ae2ac6fb363b7b7d2dda8f

Before merge

None.

Findings

None.

Agent review details

How this fits together

OpenClaw loads shared workspace instructions and delivers them through Codex thread policies; the native test captures outgoing Responses requests to verify creation, edits, withdrawal, and personal-overlay exclusion.

flowchart LR
  A[Workspace persona files] --> B[OpenClaw run attempt]
  B --> C[Framed thread policy]
  C --> D[Native Codex WebSocket server]
  D --> E[Responses HTTP fixture]
  E --> F[Captured request assertions]
Loading

Technical review

Best possible solution:

Retain the existing native fixture and validate current persona against the latest framed policy, preserving historical messages and privacy checks.

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

Source establishes the mismatch between the old withdrawal search and the current framed handoff; the PR reports a matching base failure, but this read-only review did not execute tests.

Is this the best way to solve the issue?

The patch is a focused test-oracle repair using the existing production transport fixture, with stronger current-policy checks and no additional machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Native persona assertions keeps the original intent (6f91eda: Verify shared persona reaches native requests across creation, edits, and withdrawal while personal overlays remain excluded.)
  • Current policy carrier keeps the original intent (c53974a: Explicitly frame replacement policy while retaining conversation history and independent instructions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Kimi Yu: Raw commit 6f91eda adds extensions/codex/src/app-server/run-attempt.skills.native.test.ts:284 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6f91eda9c72d; files: extensions/codex/src/app-server/run-attempt.skills.native.test.ts)
  • Peter Steinberger: Raw commit 1b1cd3e adds extensions/codex/src/app-server/run-attempt.skills.native.test.ts:166 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1b1cd3e7fb35; files: extensions/codex/src/app-server/run-attempt.skills.native.test.ts)
  • Dmitry Golubev: Raw commit c53974a adds extensions/codex/src/app-server/thread-policy.ts:62 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c53974ad5d19; files: extensions/codex/src/app-server/thread-policy.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 20 20 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 20 20 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 P3: This repairs development regression coverage without changing shipped 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:

  • P3: This repairs development regression coverage without changing shipped 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 10, 2026, 2:38 AM ET / 07:38 UTC.

@roboclaw-bot
roboclaw-bot merged commit cb54d27 into main Nov 10, 2026
214 of 216 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/codex-persona-ci-gap branch November 10, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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