Skip to content

feat: add secure code worker pairing - #67

Open
danny-avila wants to merge 6 commits into
danny-avila/remote-code-bridgefrom
danny-avila/secure-code-pairing
Open

feat: add secure code worker pairing#67
danny-avila wants to merge 6 commits into
danny-avila/remote-code-bridgefrom
danny-avila/secure-code-pairing

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Summary

  • add one-time worker pairing with locally generated Ed25519 identities
  • bind short-lived credentials to exact-request proof-of-possession with timestamp and nonce replay protection
  • add automatic rotation, administrator revocation, owner-only identity storage, and jittered reconnects
  • require paired authentication for hardened remote-bridge deployments
  • record the stateful-environment architecture and security boundaries in ADR 001

Stack

This PR is stacked on #66 and should be reviewed after that remote-bridge foundation.

Verification

  • npm test in packages/code (8 passing)
  • full service suite (575 passing)
  • bun run build in service
  • targeted ESLint for changed service modules

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head 0e399560cd1bbe7741730adc5d312912e1c58572. Please report only actionable findings introduced by this PR.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T01:27:18.360585Z 86640e9 Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e399560cd

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread service/src/bridge/pairing.ts Outdated
Comment thread service/src/bridge/pairing.ts Outdated
Comment thread service/src/bridge/router.ts Outdated
Comment thread packages/code/src/worker.ts
Comment thread service/src/secure-startup.ts
Comment thread packages/code/src/cli.ts Outdated
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head 61debeea3a691e92ee0620b06bad1477ae77cf53. Please report only actionable findings introduced by this PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61debeea3a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread service/src/secure-startup.ts Outdated
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head b99daf7. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b99daf775e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread service/src/secure-startup.ts Outdated
Comment thread docs/remote-bridge/README.md Outdated
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head cc0c7f7. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc0c7f7164

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread service/src/lifecycle.ts
Comment thread packages/code/src/worker.ts Outdated
@danny-avila
danny-avila force-pushed the danny-avila/secure-code-pairing branch from cc0c7f7 to f85a537 Compare August 31, 2026 01:11
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current restacked PR head f85a537. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

error instanceof BridgeProtocolError &&
(error.status === 401 || error.status === 403 || error.status === 409)
) {

P1 Badge Keep the worker running after assignment-level conflicts

When an execution reaches its absolute deadline, executeAndSettle aborts the sandbox at that deadline and then attempts settlement; RedisBridgeStore.settle rejects the now-expired assignment and the router returns 409. Treating every 409 as fatal here therefore terminates the CLI after a normal execution timeout, taking the worker offline until it is restarted. Only worker fencing/quarantine conflicts should stop the process; assignment-expired or other assignment-level conflicts should be discarded before continuing.

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 86640e9. The prior assignment-expiration finding is fixed by preserving structured bridge error codes and treating only worker fencing/quarantine conflicts as fatal among HTTP 409 responses. Confirm this exact commit is reviewed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 86640e9644

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant