Skip to content

feat: require metered execution in the hosted runtime - #254

Open
jefft72 wants to merge 1 commit into
codex/token-pr-companion-02-hosted-gatewayfrom
codex/token-pr-companion-03-metered-runtime
Open

jefft72 wants to merge 1 commit into
codex/token-pr-companion-02-hosted-gatewayfrom
codex/token-pr-companion-03-metered-runtime

Conversation

@jefft72

@jefft72 jefft72 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Requires the hosted server to use gateway credentials and validates the real WebSocket-to-model path, restart behavior, and runtime image inspection.

Reasoning

The optional gateway transport becomes enforceable only when the hosted entry point rejects direct provider credentials and receives a server-controlled output cap.

Acceptance uses the actual SDK and native process with a local gateway fixture so it exercises the deployed protocol without provider keys or paid tokens.

Release remains coordinated with the cloud gateway and a rebuilt runtime snapshot.

Changes

  • Requires gateway URL, credential, and output cap at server startup, and removes the credential from the process environment after configuration.
  • Replaces the bypassing smoke fixture with real Anthropic SDK requests to the local gateway fixture.
  • Adds native WebSocket authentication, prompting, pending-operation, and restart acceptance coverage.
  • Copies the required release instruction input into the Docker build stage without expanding the shipped runtime payload.
  • Supports compressed OCI layers while inspecting every image layer, including forbidden files hidden by later whiteouts.
  • Documents cloud and runtime rollout dependencies.

Testing

  • npm run check
  • npm run build:offline
  • From packages/coding-agent-server: node ../../node_modules/vitest/dist/cli.js --run test/gateway-runtime-process.test.ts
  • node --test scripts/runtime-image.test.mjs
  • ./test.sh, using the repository's isolated, non-E2E runner.
  • Verified the final tree preserves the reviewed gateway and runtime implementation while inheriting the catalog, CI, and dependency security fixes.
  • From packages/ai: node ../../node_modules/vitest/dist/cli.js --run test/together-models.test.ts test/generate-models-strict.test.ts: 7 tests passed after incorporating the catalog prerequisite.
  • node --test scripts/vendored-braces-security.test.mjs: 11 tests passed against the inherited dependency patch.
  • Reviewed native startup, acceptance fixtures, and compressed-layer inspection locally.

@jefft72 jefft72 added documentation Improvements or additions to documentation enhancement New feature or request coding-agent labels Oct 2, 2026
@jefft72 jefft72 assigned Issacboy123 and Pepps233 and unassigned Issacboy123 Oct 2, 2026
@Pepps233
Pepps233 self-requested a review October 4, 2026 18:02
@Pepps233 Pepps233 assigned jefft72 and unassigned jefft72 and Pepps233 Oct 4, 2026
@Pepps233
Pepps233 added this pull request to stack #256 October 4, 2026 18:34
Require hosted gateway credentials and the server output cap at startup, then remove the credential from the process environment. Verify the real SDK, WebSocket and restart paths through local acceptance fixtures, preserve required distribution inputs, and inspect compressed image layers without hiding prohibited earlier-layer files.
@Pepps233
Pepps233 force-pushed the codex/token-pr-companion-03-metered-runtime branch from 1777e29 to 8efb254 Compare October 4, 2026 18:35

@Pepps233 Pepps233 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not appropriate to merge yet. do not force cloud runtime to supply diffex credentials yet. this changes production runtime behavior and should be discussed with the team before modifications. please hold back on merging this pr stack.

This branch has not been deployed

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

Labels

coding-agent documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants