Repository navigation
fix(codex): native persona test fails after policy framing - #196497
Conversation
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
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherOpenClaw 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 10, 2026, 2:38 AM ET / 07:38 UTC. |
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_policyhandoffs 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
baccc7e152916c7f4a48596b5cb544c12264ac54: the external WebSocket persona case failed athandoffs.length > 0(actual 0); the ordinary catalog and incognito-compaction siblings passed.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.git diff --check, and test-line ratchet passed (zero test-line growth; inherited ceiling debt unchanged).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), andcodex-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.gpt-6.1-sol, P0–P2, complete local candidate against basebaccc7e152916c7f4a48596b5cb544c12264ac54: scoped-clean, no actionable findings. Source and final candidate verification completed; review did not independently rerun tests. Hosted ClawSweeper also reviewed exact head1add3ad1849aa12138ae2ac6fb363b7b7d2dda8fwith no actionable findings.Requested and scoped by @vincentkoc.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by