Skip to content

fix(supervisor): report isolation backend Attach refusals to the gateway - #4791

Open
shiju-nv wants to merge 1 commit into
ai-openshell:mainfrom
shiju-nv:fix/4739-attach-refusal-report/shiju-nv
Open

shiju-nv wants to merge 1 commit into
ai-openshell:mainfrom
shiju-nv:fix/4739-attach-refusal-report/shiju-nv

Conversation

@shiju-nv

@shiju-nv shiju-nv commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When an isolation backend rejects a policy during Attach, startup can fail while the sandbox still shows the configuration as accepted. For backends that report a policy refusal, openshell sandbox get now shows a short reason. openshell policy list marks the refused revision Failed if that startup created it.

Related Issue

Closes #4739

Changes

  • Report safe reasons, such as a workload user or group mismatch. Detailed errors stay in supervisor logs.
  • Record the refusal for the accepted configuration even after a newer policy is saved. Keep the policy write receipt across snapshot retries.

Testing

  • Branch Checks, Helm Lint, and core E2E passed.
  • Regression tests cover policy and authentication denials, a concurrent configuration update, and a transient snapshot failure.

Checklist

@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. rust-sdk — No explicit risk acceptance found

ReportSandboxConfigurationRequest gains refused_before_start, so its publicly re-exported prost Rust struct now has a fourth required struct-literal field instead of three.

  • Impact: Rust consumers constructing openshell_sdk::raw::proto::ReportSandboxConfigurationRequest { ... } without ..Default::default() fail to compile because refused_before_start is missing.
  • Action: Remove the field from v0.1.6 and introduce it in a minor release with migration guidance for Rust raw callers to add refused_before_start: false or ..Default::default().
  • PR: fix(supervisor): report isolation backend Attach refusals to the gateway #4791
Review details
  • Execution: complete
  • Candidate: PR #4791 (ad0916e8d87c8ebd32c53bac3dca78208b750ca8)
  • Baseline: d22394370d2d8b27859ffa772cac3aaaa79feb2c (d22394370d2d8b27859ffa772cac3aaaa79feb2c)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

@shiju-nv
shiju-nv force-pushed the fix/4739-attach-refusal-report/shiju-nv branch from 085e666 to 882780f Compare October 21, 2026 07:28
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

2. typescript-sdk — No explicit risk acceptance found

@nvidia/openshell-sdk/raw's generated ReportSandboxConfigurationRequest previously lacked refusedBeforeStart but now requires that boolean property on complete message values.

  • Impact: Existing complete object literals typed as ReportSandboxConfigurationRequest fail TypeScript checking for missing refusedBeforeStart, while create() and partial RPC initializers remain compatible.
  • Action: Defer this required-property addition from v0.1.7 to a minor release with notice to add refusedBeforeStart: false or use create(ReportSandboxConfigurationRequestSchema, init).
  • PR: fix(supervisor): report isolation backend Attach refusals to the gateway #4791
Review details
  • Execution: complete
  • Candidate: PR #4791 (cda1f4fd5879a70b028ae3bbc11261568cbebde0)
  • Baseline: 42671c2dd2c02b744850e0bda72b99d5509969c1 (42671c2dd2c02b744850e0bda72b99d5509969c1)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. rust-sdk — No explicit risk acceptance found

Public raw protobuf structs ReportSandboxConfigurationRequest and UpdateConfigResponse now require refused_before_start and created_policy_revision, respectively, in previously complete Rust literals.

  • Impact: Existing request constructors and mock/server response constructors fail to compile unless they initialize the new fields or use struct-update defaults.
  • Action: Preserve both existing raw message shapes for v0.1.7 and defer the documented false-field or Default initialization migration to a qualified minor train.
  • PR: fix(supervisor): report isolation backend Attach refusals to the gateway #4791

2. typescript-sdk — No explicit risk acceptance found

Generated raw ReportSandboxConfigurationRequest and UpdateConfigResponse types now require refusedBeforeStart and createdPolicyRevision, respectively, where neither property previously existed.

  • Impact: Existing complete request literals and mock response values fail TypeScript checking, while generated create() builders and partial RPC initializers remain compatible.
  • Action: Preserve both existing raw message shapes for v0.1.7 and defer the documented boolean-default or create() migration to a qualified minor train.
  • PR: fix(supervisor): report isolation backend Attach refusals to the gateway #4791
Review details
  • Execution: complete
  • Candidate: PR #4791 (0c86101ef8de2a2f4fd6716b347550adaf6fa3b2)
  • Baseline: 42671c2dd2c02b744850e0bda72b99d5509969c1 (42671c2dd2c02b744850e0bda72b99d5509969c1)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

@shiju-nv shiju-nv added the test:e2e Requires end-to-end coverage label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Label test:e2e applied for dc58469. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@shiju-nv
shiju-nv force-pushed the fix/4739-attach-refusal-report/shiju-nv branch from dc58469 to 5c45561 Compare November 2, 2026 14:46
copy-pr-bot Bot pushed a commit that referenced this pull request Nov 2, 2026
Classify Build, Attach and Confirm failures with fixed public diagnostics and a bounded reporting budget while preserving the original startup error.

Closes #5107

Depends on corrected PR #4791.

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv
shiju-nv force-pushed the fix/4739-attach-refusal-report/shiju-nv branch from 5c45561 to 37d1373 Compare November 3, 2026 11:46
shiju-nv added a commit to shiju-nv/OpenShell that referenced this pull request Nov 4, 2026
Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv shiju-nv added area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. topic:observability Logs, metrics, traces, telemetry, dashboards, event correlation, and operational data export. labels Nov 4, 2026
@purp purp added topic:api Public APIs, gRPC/protobuf, SDK interfaces, versioning, compatibility, and API design standards. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. topic:policy Policy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening. topic:ux CLI commands/flags, help, errors/exit codes, human-readable output, TUI, and first-run experience. and removed topic:observability Logs, metrics, traces, telemetry, dashboards, event correlation, and operational data export. labels Nov 15, 2026
@shiju-nv
shiju-nv force-pushed the fix/4739-attach-refusal-report/shiju-nv branch 2 times, most recently from 29f7cd3 to df23baf Compare November 26, 2026 16:31
Show why isolation backend Attach refused a policy after the gateway accepted the startup configuration. Keep private details in supervisor logs and mark only the policy revision the startup created as failed.

Validate the refusal against the accepted generation. Retry snapshot reads independently of acknowledged writes, and carry startup reporting details in metadata to preserve the gateway protobuf API.

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv
shiju-nv force-pushed the fix/4739-attach-refusal-report/shiju-nv branch from df23baf to 98d013e Compare November 27, 2026 08:04

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

area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. test:e2e Requires end-to-end coverage topic:api Public APIs, gRPC/protobuf, SDK interfaces, versioning, compatibility, and API design standards. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. topic:policy Policy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening. topic:ux CLI commands/flags, help, errors/exit codes, human-readable output, TUI, and first-run experience.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the backend reason when it rejects a sandbox policy during Attach

2 participants