Skip to content

feat(network): add organization outbound routing - #7786

Open
waleedlatif1 wants to merge 2 commits into
codex/http-transport-foundationfrom
codex/organization-egress
Open

feat(network): add organization outbound routing#7786
waleedlatif1 wants to merge 2 commits into
codex/http-transport-foundationfrom
codex/organization-egress

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add organization outbound routing to the existing validated HTTP helpers and guarded SDK transports, with isolated pools, TLS CONNECT, canonical ownership and fail-closed routing.
  • Migrate managed requests to explicit destination profiles and extend the existing boundary audit. Preserve supported streaming, uploads, retries, model endpoints and deployment proxies.
  • Combine session policies and outbound IP addresses in Security settings using shared components. Keep SSO separate and document transport coverage.
  • Keep credentials and organization assignments in operator configuration. Assigned routes reject unsupported remote sandbox, raw database and SDK transports; initial account OAuth and SDK-owned control traffic remain outside coverage. Activation is separate.
  • Depends on improvement(network): consolidate validated HTTP transports #7795. This PR contains the organization feature; the prerequisite contains reusable HTTP transport changes.

Type of Change

  • New feature

Testing

  • Full combined application regression passed 50,986 tests with 185 skipped before the staging sync. After the sync and final redirect-replay fix, 3,490 focused tests passed with 18 skipped.
  • All 26 workspace type checks, lint, 46 repository audits, block registry and docs manifest checks passed. Real Node and Bun socket tests cover TLS identity, destination pinning, default ports, proxies and cancellation.
  • Security settings were verified locally with synthetic data. CI on the new commit, deployed app/worker acceptance and connection coverage remain release gates.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner September 11, 2026 21:01
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 12, 2026 4:50pm UTC

Request Review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please review this PR.

@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge because no new actionable issue was introduced after the previous review and all prior findings are resolved.

Summary

  • Routes supported organization traffic through dedicated gateways while preserving direct routing where explicitly allowed.
  • Applies canonical organization scope to workflow execution, credentials, connectors, background jobs, model providers, and other managed requests.
  • Adds an organization network read API and shared Security settings UI.
  • Expands transport, routing, proxy, cancellation, authorization, and integration regression coverage.
  • The post-review change only corrects a gateway test title; it does not modify transport behavior.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Resource[Canonical workspace or organization resource] --> Scope[Outbound organization scope]
  Scope --> Resolver[Route resolver]
  Resolver -->|Assigned route| Gateway[Organization gateway pool]
  Resolver -->|Allowed direct route| Direct[Validated direct transport]
  Resolver -->|Missing or unsupported scope| Reject[Fail closed]
  Gateway --> TLS[TLS CONNECT and destination pinning]
  TLS --> Provider[External provider]
  Direct --> Provider
  Settings[Security settings] --> NetworkAPI[Organization network API]
  NetworkAPI --> Addresses[Configured outbound IP addresses]
Loading

Reviews (10) · Last reviewed commit: "chore(network): clarify Request body cov..."

Comment thread apps/sim/lib/credential-groups/standard-oauth-provider.ts Outdated
Comment thread apps/sim/lib/workflows/executor/execution-core.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please review this PR.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/lib/core/config/appconfig.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please review this PR.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please review this PR.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please review this PR.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 force-pushed the codex/organization-egress branch from 94d423e to 3b319c5 Compare September 12, 2026 09:57
@waleedlatif1
waleedlatif1 changed the base branch from staging to codex/http-transport-foundation September 12, 2026 09:57
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1
waleedlatif1 force-pushed the codex/organization-egress branch from 3b319c5 to 7169f79 Compare September 12, 2026 10:13
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

The current base is codex/http-transport-foundation (#7795). liftFetchArgs is identical to that base; this PR's changes in input-validation.server.ts add only the direct-transport guard for database connections.

The staging implementation at 9294beb326 already materializes inherited Request bodies with input.clone().arrayBuffer() in both guarded and pinned fetch normalization. The prerequisite narrows that existing behavior to inherited bodies in follow mode and preserves streaming for manual/error modes and explicit init bodies. It does not introduce eager Request buffering relative to staging. The memory limitation for inherited Request bodies is real, but it is pre-existing.

The newly injected OpenAI/AzureOpenAI and Anthropic SDK transports call fetch with a URL and explicit init body. The audited multipart/audio upload paths do the same, so they bypass inherited-Request materialization. I also corrected the gateway test title from "streams Request bodies" to "preserves Request bodies"; its assertions are unchanged.

@greptile please reassess this finding against the current PR base. If a newly migrated caller creates additional exposure, please identify that call path so we can address it directly.

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