Skip to content

refactor(openshell): type the operations that may report rejections - #13108

Merged
cv merged 3 commits into
v1from
refactor/openshell-rejected-operations
Oct 13, 2026
Merged

cv merged 3 commits into
v1from
refactor/openshell-rejected-operations

Conversation

@cv

@cv cv commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

remote_rejection now takes a RejectableOperation instead of an operation name, so the compiler checks which gateway operations may report rejection text.

Why

#13056 lets four gateway operations report a bounded, sanitized rejection message: CreateWorkspace, CreateSandbox, DeleteProvider, and DeleteProviderProfile. Their requests contain no credentials. remote_rejection took a &'static str and checked it against a hard-coded list. Any other name, including a misspelled allowed one, fell back to remote_error, and no error reported the mismatch. A test passed names outside the list to check that fallback.

Change

  • The RejectableOperation enum names the four operations. remote_rejection maps each to the same ObservationError::Rejected { operation, … } string as before.
  • openshell-provider passes enum values, and nemoclaw-openshell and nemoclaw-discovery re-export the type next to remote_rejection.
  • The test for names outside the list is removed, because the type rules them out.

Validation

  • cargo test -p nemoclaw-openshell -p openshell-provider -p nemoclaw-discovery: all passed.
  • cargo ci on linux_arm64: all steps passed.

cv added 3 commits October 13, 2026 10:36
ObservationError lost Copy in #13056, and #13081 merged after it with a test
that moves the class twice, so the SDK integration tests no longer compile on
v1 and CI fails at clippy.
remote_rejection took an operation name and fell back to remote_error for
any name outside a hard-coded list. RejectableOperation now names the
credential-free gateway operations, so the compiler enforces the opt-in and
the test for names outside the list is no longer needed.
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit cdab457 into v1 Oct 13, 2026
@cv
cv deleted the refactor/openshell-rejected-operations branch October 13, 2026 18:45
@wscurran wscurran added area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening refactor PR restructures code without intended behavior change labels Oct 13, 2026
@wscurran wscurran added the v1 NemoClaw v1 branch label Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening refactor PR restructures code without intended behavior change v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants