Skip to content

ref(sandbox): Extract credentialed egress execution - #675

Merged
dcramer merged 6 commits into
mainfrom
ref/shared-credentialed-egress
Jun 29, 2026
Merged

dcramer merged 6 commits into
mainfrom
ref/shared-credentialed-egress

Conversation

@dcramer

@dcramer dcramer commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

Sandbox egress now lives under a dedicated chat/sandbox/egress/ module. The sandbox proxy owns forwarded-request preflight: OIDC, forwarded URL validation, provider lookup, credential-context validation, trace continuation, and request policy checks.

execute.ts owns the verified credentialed provider request path: grant selection, lease issuance, header injection, upstream forwarding, response hooks, and auth/permission signal behavior.

This also centralizes local development config defaults so CLI and dev-server bootstrap use the same values for JUNIOR_SECRET, JUNIOR_STATE_ADAPTER, and the local scheduler secret. Runtime modules still require explicit production config; the defaults only apply during development bootstrap.

This is intended as a behavior-preserving first slice for GH-660 so future host/plugin egress work can reuse or split the credentialed request path without changing sandbox routing in the same PR.

Refs GH-660

Move the verified provider request path out of the sandbox egress proxy so the proxy owns only sandbox preflight concerns. This keeps the existing sandbox caller and behavior intact while giving the credentialed request path a smaller module boundary for future host/plugin egress work.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 29, 2026 8:15pm

Request Review

Move sandbox egress files under a dedicated egress module folder and update imports. This keeps the credentialed egress extraction scoped to sandbox-owned boundaries while making the file roles clearer.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
Apply the same development env defaults from CLI and dev-server bootstrap so local commands start with one config contract. Keep runtime modules strict so production still requires explicit secrets.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
Add module and exported-boundary comments to the sandbox egress code so the proxy, policy, credential, execution, and session responsibilities are easier to follow without changing behavior.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
Inline the sandbox proxy implementation wrapper and reduce repeated credential egress signal and telemetry payload construction. Keep the egress API and forwarding behavior unchanged.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 90f4c66. Configure here.

Comment thread scripts/dev-server.mjs Resolved
dcramer pushed a commit that referenced this pull request Jun 29, 2026
Adds the PR Risk Action as an advisory workflow for non-draft pull
requests. It runs on `pull_request_target` so it can keep the `risk:
low|medium|high` label in sync, but it does not checkout or execute PR
code.

The Action now has a bundled `getsentry__junior` profile in
`getsentry/pr-risk-action@v0`, so this repo does not need to vendor any
scorer code or model artifacts.

Validation:
- `ruby -e 'require "yaml";
YAML.load_file(".github/workflows/pr-risk.yml"); puts "pr-risk.yml
ok"'`\n- Verified `getsentry/pr-risk-action@v0` includes the Junior
profile and can score `#675` locally.

Co-authored-by: GPT-5 Codex <[email protected]>
Ensure the dev-server heartbeat fallback secret is also exported to JUNIOR_SCHEDULER_SECRET before pulses are sent. This keeps the sender and handler on the same config contract even when NODE_ENV is not development.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
@github-actions github-actions Bot added the risk: high PR risk score: high label Jun 29, 2026
@dcramer
dcramer merged commit 066ba44 into main Jun 29, 2026
19 checks passed
@dcramer
dcramer deleted the ref/shared-credentialed-egress branch June 29, 2026 20:23

This branch was successfully deployed

1 active deployment
Preview – junior-docs — a8916d73 Deployed Jun 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant