Skip to content

feat(server): retain and read owned exec terminal results - #5883

Open
eitan8888 wants to merge 1 commit into
ai-openshell:mainfrom
eitan8888:platform-dev/exec04-owned-terminal-readback
Open

eitan8888 wants to merge 1 commit into
ai-openshell:mainfrom
eitan8888:platform-dev/exec04-owned-terminal-readback

Conversation

@eitan8888

Copy link
Copy Markdown

Summary

Store the observed SSH exit code with the existing durable exec claim before delivering its terminal event. Add an authenticated, read-only GetExecSandboxResult RPC that accepts the exact original noninteractive request and returns the confirmed exit code with its claim, caller scope, workspace, target, protected request fingerprints, and timestamps.

The lookup does not launch, reattach, sweep, repair, or extend an execution. Pending, legacy marker, mismatched, rotated-key, replaced-target, and expired claims remain unavailable. Duplicate exec submissions still cannot replay output or stdin.

Verification

  • cargo check --tests -p openshell-server -p openshell-cli -p openshell-sdk
  • LIBRARY_PATH=/Users/master/.workbench/dev-deps/exec04-z3/lib cargo test -p openshell-server grpc::mutation_replay::streaming::tests --lib (13 passed)
  • cargo fmt --all --check and git diff --check

Scope

This is source only. It does not install the server or SDK, establish a product-owned native command result, qualify cleanup or coverage, or authorize a QA run. A confirmed SSH exit code does not by itself prove application behavior.

Lessons and facts used

The existing replay journal has the exact claim and protected request binding, but its former terminal marker omitted the SSH exit code. The exit code is available at the terminal boundary, so it must be committed with that claim before the terminal event is sent. The original request and current authorization remain necessary for a safe read; a detached UUID and exit code are insufficient.

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

Copy link
Copy Markdown

Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

@eitan8888

Copy link
Copy Markdown
Author

SOURCE ACCEPT — exact fd569f9eee06d5916842f3c7fa471614523f59d3, bounded noninteractive untransformed-claim terminal-result slice. Complete pass: no P1/P2 findings.

Real SSH exit status is committed with the original claim through its CAS before terminal delivery. The authenticated read derives the caller/method/scope key, reauthorizes the current immutable target and checks original/effective protected bindings. Its 17 response fields preserve claim/result identity; it never admits, executes, reattaches, sweeps, repairs or extends a claim. Legacy, unresolved, missing, foreign, mismatched, rotated-key and expired states remain unavailable. Nonzero SSH exit is a terminal failure, not application success.

The disclosed narrower transform limit is acceptable for this source component: transformed effective command/target claims remain unavailable. Actual RD154 N1 original/effective equivalence is still unproven. P3 documentation follow-up: state that limitation explicitly in API docs and PR body; callers must not reconstruct effective payloads or infer N1 support. No code/test rerun is requested for that text clarification.

Inspected all 17 changed files and targeted cases; reused reported 13-test/compile qualification without another build or local RPC run. Record: ~/.workbench/reviews/openshell-core-pr5883.json. Contribution/DCO/issue gates remain separate; no owner declaration or issue link is supplied by this review.

Source only. No install/admission, SDK consumer mapping, native capability, owned cleanup, coverage or QA acceptance. Existing provider/owner 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