Skip to content

improve: prove Codex auth migration product flow - #109291

Merged
RomneyDa merged 1 commit into
mainfrom
fix/qa-codex-auth-product-proof
Jul 17, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/qa-codex-auth-product-proof

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The QA catalog claimed Codex auth-profile migration coverage through fixture-only lifecycle oracles. Those rows did not prove that openclaw doctor --fix repaired the real persisted store, that the selected OAuth profile reached Codex App Server, or that a production Gateway turn and account read completed.

Why This Change Was Made

This retargets both owned auth scenarios to native product-backed Vitest flows. The tests run the real doctor command, inspect canonical per-agent SQLite state, execute a Codex-backed Gateway turn, verify durable chat.history, and exercise the production status/usage handoff through an upstream-shaped App Server fixture. The auth proof reuses the existing incremental JSONL tailer and Gateway client helper; both Codex fixtures now share one App Server transport/thread-response builder instead of maintaining parallel protocol copies.

AI-assisted: yes. The implementation was reviewed with the repository autoreview workflow and all actionable findings were resolved.

User Impact

There is no runtime behavior change. Maintainers now get honest regression proof for legacy Codex OAuth migration, mixed-profile selection, completed Gateway execution, and the Codex account handoff instead of fixture-parity assertions.

Evidence

  • Exact head b8d800f50142eaee157b0a448afca45ec08bcbb9: fresh Blacksmith Testbox tbx_01kxpfpkxy7k7jc43ap8aey0xp passed repository-wide oxfmt --check across 22,760 files, all core/extension/root test-type projects, and the overlapping QA catalog 43/43. The byte-identical task commit was then rebased conflict-free onto the canonical blocker-fix base with stable patch ID 5a39495f204f11c4a5c85f1c8a8ec8e69eee9782 and an equal git range-diff.
  • The unchanged task patch previously passed 370 focused tests across the shared media fixture, changed-target resolver, Gateway helper, doctor, Codex auth bridge, QA catalog, and both product E2Es; its path-scoped check:changed passed all-project typecheck, full core/extensions/scripts lint, formatting, dependency/boundary/migration guards, and runtime import-cycle checks.
  • Redacted product evidence selected openai:qa-oauth, preserved canonical order and OAuth refresh/expiry fields, removed legacy JSON, completed QA_CODEX_AUTH_PRODUCT_PROOF_OK through Gateway history, then emitted account/login/start before account/read with {} and the upstream ChatGPT account response shape.
  • waitForAssistantHistory concurrently checks every returned session key on every poll with bounded request timeouts and retains deliver: false production Gateway history proof.
  • Knip discovers the spawned auth fixture through its static new URL(..., import.meta.url) reference and both fixtures import the shared App Server helper; production and full-tree unused-file scans report zero entries.
  • Fresh Codex autoreview of the final oxfmt correction (019f6cdb-ac02-7db2-9837-802cc47f4bd5): clean, no accepted/actionable findings, confidence 1.
  • The branch is based directly on a70d583f2461a0313735d3e0331b9eafd1931a7b, including canonical cleanup squash 1f5299da7e1636c625e3f77790fedb2deee5f78f; the docs-sync declaration is singular and the product-backed scenario routing and fixture resolver mapping are preserved.
  • Direct upstream contract inspection: openai/codex@2e1607ee2fa8099a233df7437adee5f16a741905, especially codex-rs/app-server-protocol/src/protocol/v2/account.rs:500, thread.rs:170, turn.rs:166, turn.rs:395, and item.rs:1304.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts commands Command implementations extensions: qa-lab extensions: codex size: L maintainer Maintainer-authored PR labels Jul 16, 2026
@RomneyDa
RomneyDa force-pushed the fix/qa-codex-auth-product-proof branch 4 times, most recently from d8f6122 to 1b779ef Compare July 16, 2026 21:20
@RomneyDa
RomneyDa force-pushed the fix/qa-codex-auth-product-proof branch 2 times, most recently from 399fdd8 to 611a7bd Compare July 16, 2026 22:08
@RomneyDa
RomneyDa force-pushed the fix/qa-codex-auth-product-proof branch from 611a7bd to b8d800f Compare July 16, 2026 22:53
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 16, 2026, 7:50 PM ET / 23:50 UTC.

Summary
The PR replaces fixture-only Codex auth migration catalog coverage with product-backed doctor, SQLite, Gateway, and fake App Server tests while consolidating shared Codex App Server E2E helpers.

PR surface: Tests +624, Other -25. Total +599 across 15 files.

Reproducibility: not applicable. This PR improves regression proof rather than fixing a reported current-main failure, and its exact-head evidence exercises the intended product paths.

Review metrics: 1 noteworthy metric.

  • QA scenario upgrades: 2 fixture-only scenarios converted. Both Codex auth catalog rows now traverse real doctor and persisted-state paths instead of lifecycle-oracle fixtures.

Stored data model
Persistent data-model change detected: migration/backfill/repair: extensions/qa-lab/src/scenario-catalog.test.ts, migration/backfill/repair: qa/scenarios/runtime/auth-profile-codex-mixed-profiles.yaml, migration/backfill/repair: qa/scenarios/runtime/auth-profile-doctor-migration-safety.yaml, migration/backfill/repair: src/commands/doctor-auth-flat-profiles.test.ts, migration/backfill/repair: test/e2e/qa-lab/runtime/codex-auth-doctor-migration-product-proof.e2e.test.ts, migration/backfill/repair: test/e2e/qa-lab/runtime/codex-auth-product-proof.test-support.ts, and 5 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • No automated repair is indicated; this member-authored, protected PR needs only normal owner review and merge handling.

Security
Cleared: The patch changes test fixtures and QA routing without adding dependencies, external downloads, secret access, workflow permissions, or production execution paths.

Review details

Best possible solution:

Keep the product-backed QA scenarios and shared App Server fixture, then land them after ordinary owner review confirms the fixture remains aligned with the pinned Codex protocol revision.

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

Not applicable: this PR improves regression proof rather than fixing a reported current-main failure, and its exact-head evidence exercises the intended product paths.

Is this the best way to solve the issue?

Yes. Replacing fixture-parity assertions with bounded product-backed doctor, SQLite, Gateway, and App Server flows is the narrowest maintainable way to prove the existing auth-migration contract.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P3: This is low-risk maintainer QA and regression-proofing work with no runtime behavior change.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member-authored PR, though its exact-head Testbox logs and product-flow transcript provide strong supporting evidence.

Label justifications:

  • P3: This is low-risk maintainer QA and regression-proofing work with no runtime behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member-authored PR, though its exact-head Testbox logs and product-flow transcript provide strong supporting evidence.
Evidence reviewed

PR surface:

Tests +624, Other -25. Total +599 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 9 637 13 +624
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 6 191 216 -25
Total 15 828 229 +599

What I checked:

Likely related people:

  • pashpashpash: Auth-bridge history includes app-server state isolation, fallback behavior, profile rotation, effective environment handling, and user-home preservation. (role: feature owner; confidence: high; commits: 027ea5f, 401ae38, a412603; files: extensions/codex/src/app-server/auth-bridge.ts)
  • vincentkoc: Introduced and hardened the canonical Codex OAuth bridge and later committed the auth-order fix directly related to mixed-profile selection. (role: feature owner; confidence: high; commits: 859eb06, 78288e3, a018257; files: extensions/codex/src/app-server/auth-bridge.ts)
  • steipete: Merged or committed many foundational Codex auth bridge changes, including canonical OAuth routing, security hardening, fallback behavior, and harness authentication. (role: merger and adjacent owner; confidence: high; commits: 859eb06, a018257, 2fc429d; files: extensions/codex/src/app-server/auth-bridge.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@RomneyDa
RomneyDa merged commit a9dc393 into main Jul 17, 2026
155 of 163 checks passed
@RomneyDa
RomneyDa deleted the fix/qa-codex-auth-product-proof branch July 17, 2026 23:10
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 18, 2026
steipete added a commit that referenced this pull request Oct 9, 2026
Give the status CLI its own instance-owned app-server log. The running
Gateway keeps its original environment and can continue catalog discovery
without being mistaken for a usage account read or response with the same
numeric request ID. Restore the CLI environment on settlement.

Preserve the product-proof contract from #109291: every login payload,
ordering, identity response, migration and recovery assertion, and all
existing timeouts.

Co-authored-by: Dallin Romney <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
Give the status CLI its own instance-owned app-server log. The running
Gateway keeps its original environment and can continue catalog discovery
without being mistaken for a usage account read or response with the same
numeric request ID. Restore the CLI environment on settlement.

Preserve the product-proof contract from openclaw#109291: every login payload,
ordering, identity response, migration and recovery assertion, and all
existing timeouts.

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

Labels

commands Command implementations extensions: codex extensions: qa-lab maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XL 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