Skip to content

feat: Run PTC in Selected BYOM Workspaces - #195

Merged
danny-avila merged 7 commits into
mainfrom
danny-avila/byom-workspace-ptc
Sep 14, 2026
Merged

feat: Run PTC in Selected BYOM Workspaces#195
danny-avila merged 7 commits into
mainfrom
danny-avila/byom-workspace-ptc

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Summary

  • negotiate Bash programmatic execution only for native SRT workers that can enforce the selected workspace boundary
  • execute replay-mode PTC inside the selected BYOM workspace while staging skills and attachments in a private per-execution directory
  • return bounded artifacts through the existing Code API file path without copying repository contents across the bridge
  • preserve per-workspace serialization and cross-workspace lease concurrency, with bounded transfer concurrency, cache size, input size, artifact size, and directory traversal
  • keep GitHub App credentials out of child process environment and command arguments

Compatibility

  • capability-negotiated and disabled for older workers, non-POSIX native Windows, workers without file relay, and workers whose command policy is not enabled
  • existing workspace tools and non-BYOM programmatic execution are unchanged

Focused verification

  • npm run build && node --test dist/native-programmatic.test.js dist/native-process.test.js dist/protocol.test.js dist/workspace-worker.test.js dist/worker-slots.test.js (82 passing)
  • bun test src/bridge/workspace-store.test.ts src/preamble-bash.test.ts src/sandbox-backend/remote-bridge.test.ts src/service/programmatic-state.test.ts (54 passing)
  • service build passed
  • isolated live E2E on non-default ports: LibreChat API helper -> linked Agents SDK -> Code API -> real native worker/SRT, including skill injection, selected-project persistence, tool replay, artifact return, and private scratch cleanup

Scale and security boundaries

  • inputs: 100 files, 10 MiB/file, 100 MiB total
  • artifacts: bounded walk and upload limits
  • transfers: max 4 concurrent per execution
  • parent input cache: 64 entries / 32 MiB with content-addressed keys
  • same-workspace mutations serialize; independent workspaces may use negotiated worker lease slots

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 786282d. 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 commented Sep 14, 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-09-14T13:52:20.701889Z ab15095 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: 786282d398

ℹ️ 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 packages/code/src/native-programmatic.ts Outdated
Comment thread service/src/service/programmatic-router.ts Outdated
Comment thread packages/code/src/native-process.ts Outdated
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/native-programmatic.ts
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/cli.ts
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head 89cac15

@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: 89cac159dc

ℹ️ 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/service/programmatic-router.ts
Comment thread packages/code/src/native-sandbox.ts Outdated
Comment thread packages/code/src/protocol.ts Outdated
Comment thread packages/code/src/protocol.ts
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head aed2719. The prior findings are fixed, focused tests/builds pass, and the second-order issue classes were self-reviewed.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head e18c379. CI portability follow-up only: production remains fail-closed on non-COW filesystems; the host-dependent integration assertion now skips there instead of failing all Node matrices.

@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: e18c37929e

ℹ️ 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 packages/code/src/native-sandbox.test.ts Outdated
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head 64c22b8

@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

pending.mutation && message.mutation !== false,
pending.mutation && !processTerminationConfirmed,

P1 Badge Preserve clean pre-dispatch failures across executor IPC

When the child rejects before starting either sandbox pass—for example, an input download fails, aggregate input validation rejects the request, or the copy-on-write clone is unavailable—it reports both mutation: false and requiresQuarantine: false. This reconstruction nevertheless sets requiresQuarantine for every non-cancellation programmatic RPC because pending.mutation is always true and processTerminationConfirmed only recognizes EXECUTION_ABORTED; BridgeWorker then retains the already-armed durable guard and quarantines a workspace that was never touched. Honor the child's clean classification whenever message.mutation === false, while continuing to fail closed for genuinely ambiguous post-dispatch failures.

ℹ️ 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 packages/code/src/cli.ts
Comment thread packages/code/src/native-sandbox.ts
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/protocol.ts
Comment thread packages/code/src/native-programmatic.ts Outdated
@danny-avila

Copy link
Copy Markdown
Collaborator Author

Addressed the review-body P1 in 6133b7d: the parent IPC layer now honors a child-reported mutation=false for every clean pre-dispatch failure, not only cancellation, and retains fail-closed quarantine for ambiguous post-dispatch failures. Focused coverage exercises the preserved classification.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head 6133b7d

@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: 6133b7d4b8

ℹ️ 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/sandbox-egress.ts Outdated
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/protocol.ts
Comment thread packages/code/src/native-sandbox.ts
Comment thread service/src/sandbox-backend/remote-bridge.ts
Comment thread packages/code/src/protocol.ts
Comment thread packages/code/src/native-programmatic.ts Outdated
Comment thread packages/code/src/native-process.ts Outdated
Comment thread packages/code/src/protocol.ts
@danny-avila
danny-avila added this pull request to stack #197 September 14, 2026 13:20
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

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

This round addresses all nine outstanding findings across replay isolation, trusted dependency discovery, reserved control files, file and transfer budgets, and single-slot result finalization. The real SRT canary exposed that per-command network overrides do not tighten the manager's proxy/socket policy. Probes now restrict the session and revoke its proxy endpoints before restoring the commit policy. The opt-in live regression passes with one external POST and one workspace write, including the trusted-vm policy.

Please scrutinize the ownership transitions and mixed capability paths, especially speculative execution versus committed effects, transfer budgeting before manifest signing, and workspace fencing through artifact restoration.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: ab15095501

ℹ️ 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 danny-avila changed the title 🧰 feat: Run PTC in Selected BYOM Workspaces feat: Run PTC in Selected BYOM Workspaces Sep 14, 2026
@danny-avila
danny-avila merged commit 03e2fc1 into main Sep 14, 2026
10 checks passed
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