Skip to content

feat(cli): preserve owned exec request ID and read terminal result - #1

Open
eitan8888 wants to merge 1 commit into
platform-dev/exec04-owned-terminal-readbackfrom
platform-dev/exec04-cli-custody
Open

eitan8888 wants to merge 1 commit into
platform-dev/exec04-owned-terminal-readbackfrom
platform-dev/exec04-cli-custody

Conversation

@eitan8888

Copy link
Copy Markdown
Owner

Scope

Add a caller-supplied --request-id to the noninteractive OpenShell CLI exec path and a --result-only lookup for the exact original command. The CLI never generates or retries an ID. It refuses TTY, open or nonempty stdin, and streaming fallback when an ID is supplied. The lookup uses the accepted core GetExecSandboxResult RPC and refuses mismatched or transformed claim bindings before printing the 17 fields.

This is source support for the inspected RedLab N1 integrator-to-CLI route. It does not bind a RedLab run or child to the request ID, prove actual installed caller/target, install a binary, or qualify RD-154 native execution, cleanup, coverage, or dispatch. Interactive exec remains outside this result contract.

Verification

  • cargo check -p openshell-cli --tests passed.
  • cargo test -p openshell-cli owned_exec_result_requires_exact_untransformed_terminal_binding --lib passed (one focused test).
  • cargo fmt --all and git diff --check passed.

Review focus

Confirm the CLI sends the unchanged caller ID through unary ExecSandbox, its read path reconstructs the same request fields with no launch, and foreign/transformed/incomplete results remain refused. The protected integrator must separately establish the UUID before the mission command and preserve the original request; no capability flag should change from this PR.

Lessons and facts used

The actual N1 consumer calls the OpenShell CLI; Python SDK request forwarding does not wire this route. A terminal code is usable only with the original protected claim, current authorization, and unchanged target and payload bindings.

Signed-off-by: Eitan <eitan@securegion.com>
@eitan8888

Copy link
Copy Markdown
Owner Author

SOURCE ACCEPT at exact head 32d5332 for the bounded CLI unary request-ID and read-only result slice. No P1/P2 findings.

The caller UUID is preserved, TTY/open or nonempty stdin/streaming fallback are refused, and result-only builds the same supported request fields and cannot enter the launch branch. The accepted authenticated core supplies exact-request authorization; CLI internal equality checks alone do not establish RedLab mission or target provenance.

The protected integrator must separately preserve the complete original request, bind the returned claim to the admitted N1 mission and immutable target, and qualify actual installed/admitted CLI/core support. Transformed and interactive claims remain outside this contract. Native execution, cleanup, coverage and dispatch remain unqualified. Author compile/focused-test evidence was reused; no CLI/server or lab operation was run by this review.

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