Skip to content

fix(responses): recover the null-code encrypted-content rejection and lock pool-switch stripping - #2269

Merged
lidge-jun merged 1 commit into
devfrom
codex/pool-ciphertext-regression
Aug 21, 2026
Merged

fix(responses): recover the null-code encrypted-content rejection and lock pool-switch stripping#2269
lidge-jun merged 1 commit into
devfrom
codex/pool-ciphertext-regression

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #2247: ChatGPT account-pool thread continuation could 400 with 'The encrypted content ... could not be verified' when the pool routed a thread to a different account than the one that minted the historical reasoning ciphertext.

  • The serving-identity PRE-FLIGHT (from fix(responses): routed-destination sanitize + opaque-state recovery series (#2254 rebased) #2258) was already correct for pool slot switches — now locked by an end-to-end A->B regression proving the second send strips reasoning encrypted_content and compaction blobs, plus a restart-style durable pool-account isolation regression.
  • The real gap: the RECOVERY matcher only accepted code: invalid_encrypted_content or the two invalid-argument prefixes. The reported ChatGPT rejection carries invalid_request_error with code: null and the message 'The encrypted content ... could not be verified. Reason: Encrypted content could not be decrypted or parsed.' — added a narrow exact-message matcher for that shape, keeping the fail-closed default.

Verification

  • Touched suites 25/0 (267 expects); mutation proof: the strip regression fails with the identity-change flag disabled.
  • tsc, privacy:scan green. Full-suite supplemental run green except a known unrelated GUI loader flake.

Checklist

Summary by CodeRabbit

  • Bug Fixes

    • Improved recovery when encrypted response content cannot be verified, including ChatGPT-style error responses.
    • Prevented stale encrypted content from being reused after switching between pooled accounts.
    • Ensured failed encrypted-content requests retry once without the unverifiable content.
  • Documentation

    • Updated error-handling documentation to cover the additional response format.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8cb2c1fe-0f46-4cac-85fc-4190f8f699be

📥 Commits

Reviewing files that changed from the base of the PR and between 3ffffc8 and 5d36686.

📒 Files selected for processing (3)
  • src/server/responses/core.ts
  • tests/responses-opaque-blob-recovery.test.ts
  • tests/thought-signature-credential-scope.test.ts

📝 Walkthrough

Walkthrough

The response proxy now detects ChatGPT’s code-less unverifiable encrypted-content error. Tests cover pooled-account switching, ciphertext removal before retry, single-retry behavior, and account-scoped replay signatures.

Changes

Opaque blob recovery

Layer / File(s) Summary
ChatGPT rejection identity
src/server/responses/core.ts, tests/responses-opaque-blob-recovery.test.ts
The detector accepts the exact code-less unverifiable encrypted-content message while retaining the existing error-code check. Tests reject unrelated signature errors.
Pooled-account ciphertext recovery
tests/responses-opaque-blob-recovery.test.ts, tests/thought-signature-credential-scope.test.ts
Tests verify ciphertext removal when a thread moves between pooled accounts, one retry after ChatGPT rejection, and stable account-specific replay signatures across reloads.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: ingwannu

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pool-ciphertext-regression

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant