Skip to content

Stop Noise relay recovery on rejected executor credentials - #59750

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9a55412e583146c094948618c7c9aeb4fb4b953e
Nov 5, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9a55412e583146c094948618c7c9aeb4fb4b953e

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Stop Noise relay recovery on rejected executor credentials

Why

Registry 401 responses during harness key validation previously produced generic relay resets, causing recovery to retry rejected executor credentials instead of surfacing the authentication failure.

What changed

  • Send an authenticated Noise handshake rejection for registry 401 responses without opening an application transport.
  • Propagate the rejection as EnvironmentRegistryAuth and preserve it in the terminal connection state so recovery stops with a specific authentication error.
  • Preserve registry HTTP status codes so 403 responses for stale harness grants and transient service failures can continue through recovery.

Testing

Add tests that reject tampered authentication rejections and exercise session recovery: 401 stops after one rejected recovery attempt, while 403, 502, and 503 retry with fresh harness grants and reconnect successfully.

## Why

Registry `401` responses during harness key validation previously produced generic relay resets, causing recovery to retry rejected executor credentials instead of surfacing the authentication failure.

## What changed

- Send an authenticated Noise handshake rejection for registry `401` responses without opening an application transport.
- Propagate the rejection as `EnvironmentRegistryAuth` and preserve it in the terminal connection state so recovery stops with a specific authentication error.
- Preserve registry HTTP status codes so `403` responses for stale harness grants and transient service failures can continue through recovery.

## Testing

Add tests that reject tampered authentication rejections and exercise session recovery: `401` stops after one rejected recovery attempt, while `403`, `502`, and `503` retry with fresh harness grants and reconnect successfully.

GitOrigin-RevId: 9a55412e583146c094948618c7c9aeb4fb4b953e
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/9a55412e583146c094948618c7c9aeb4fb4b953e branch from d0ee9bb to c48785a Compare November 5, 2026 22:04
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-05T22:04:08.003967Z d0ee9bb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit c48785a into main Nov 5, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/9a55412e583146c094948618c7c9aeb4fb4b953e branch November 5, 2026 22:04
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — c48785a9 Deployed Nov 5, 2026 by bvidhi17 via Translate non-English issue #24723
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants