Skip to content

fix(sdk): forward caller-owned exec request IDs - #57

Open
eitan8888 wants to merge 2 commits into
ai-openshell:mainfrom
eitan8888:platform-dev/exec04-forward-request-id
Open

eitan8888 wants to merge 2 commits into
ai-openshell:mainfrom
eitan8888:platform-dev/exec04-forward-request-id

Conversation

@eitan8888

@eitan8888 eitan8888 commented Nov 22, 2026 •

Copy link
Copy Markdown

Summary

  • Add an optional caller-owned request_id to the sandbox exec APIs and forward it unchanged to ExecSandboxRequest.request_id.
  • Reject malformed, noncanonical, and zero UUIDs before opening the RPC. Omitted IDs retain the existing request behavior.
  • Add focused transport tests for forwarding through the client and session, invalid IDs, context forwarding, stream loss without retry, and the legacy default.

Evidence

  • uv run pytest tests/sandbox_test.py -q — 157 passed.
  • uv run ruff check src/openshell/sandbox.py tests/sandbox_test.py — passed.
  • uv run ruff format --check src/openshell/sandbox.py tests/sandbox_test.py — passed.

Scope and remaining runtime dependency

This supplies the caller-owned admission ID to the existing protocol. It does not add a terminal result lookup or convert a lost stream into a confirmed result. The server currently returns REQUEST_STREAM_UNAVAILABLE for duplicate requests, so consumers must retain uncertain outcomes and must not retry with a new ID or claim native execution proof from this change alone. A separately reviewed server-side durable terminal/read-only result contract and consumer admission bindings remain required for RD154 EXEC04.

Lessons and facts used

The protocol already defines ExecSandboxRequest.request_id as an optional nonzero UUID for durable launch admission. The Python exec surfaces omitted it at the current owning source head. A caller-owned ID is preserved as received; it is not synthesized from a sandbox or observation ID. Source tests do not establish installed consumer behavior or a terminal original.

Signed-off-by: Eitan <eitan@securegion.com>
@eitan8888
eitan8888 requested review from a team as code owners November 22, 2026 17:02
Signed-off-by: Eitan <eitan@securegion.com>
@eitan8888

Copy link
Copy Markdown
Author

SOURCE ACCEPT — exact head 785764d07730ce5b1a9aee3035ca577126343518. Complete two-file source review; no P1/P2 findings.

The optional caller-owned UUID reaches the actual generated ExecSandboxRequest.request_id field 11 through the execution APIs. Invalid/noncanonical/zero IDs refuse before RPC; omission preserves the existing empty field. No ID generation, new retry, reattachment or terminal identity is introduced.

Seven affected mocked tests and eleven additional inert checks passed, including real protobuf assignment, invalid-ID refusal and partial-stream missing-terminal behavior. The unchanged full suite was reused rather than rerun. No real SDK/server/provider execution or installation occurred.

This accepts request-ID forwarding source only. The separate durable terminal/read-only result contract is still absent; lost streams and REQUEST_STREAM_UNAVAILABLE remain uncertain. This change alone does not qualify native execution or EXEC04, cleanup or coverage. Existing holds remain.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants