Repository navigation
feat: track latest OpenShell SDK + wire v0.0.113 stop/start, exit code, draft-policy diff data - #52
Merged
Merged
Conversation
Bump github.com/NVIDIA/OpenShell/sdk/go to latest (v0.0.115 upstream) and adopt the additive API surface that shipped since the pinned Aug-14 build. - Sandbox stop/start (StopSandbox/StartSandbox) with STOPPING/STOPPED/ STARTING phases: BFF handlers + routes, frontend actions on the sandbox list and detail pages, PhaseLabel handling. - SandboxStatus.exitCode surfaced in the detail view (aids ERROR triage). - Draft-policy review_token: resolved server-side on approve (now required by ApproveDraftChunk) and exposed on chunks alongside applicationError and current/candidate effective policies for a future before/after diff. Also refresh the stale "no stop/start" docs (openshell-api rule, CLAUDE.md, CONTRIBUTING, README, create-sandbox modal copy). All green: go build/vet/test, tsc, eslint, jest (178 passing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
- Reorder SandboxStatus and PolicyChunk fields to minimize pointer-scan bytes (govet fieldalignment), preserving doc comments. - Run prettier on SandboxDetailPage.tsx. Both check-backend and check-frontend CI jobs were failing on these. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
- Fix false-positive success toasts: list-page Stop/Start now report success/failure from the mutation's actual outcome, not immediately on click. Detail-page Stop/Start gained the error feedback they were missing entirely. - Extract canStopSandbox/canStartSandbox so the list row and detail page page can't disagree on which phases allow which action. - Add STOPPED/STOPPING/STARTING colors to StatusDot (PhaseLabel already had them). - Drop the delete-confirmation copy claiming deletion is "the only way to stop a running sandbox" — no longer true now that Stop exists. - ApproveDraftChunk: accept an optional client-supplied reviewToken (the frontend already has it from GetDraftPolicy) and only fall back to the extra GetDraft round-trip when the client didn't send one. - Add handler tests for StopSandbox/StartSandbox (previously untested; the SDK mock's Stop/Start literally panicked) and for both ApproveDraftChunk token paths. - Correct .claude/rules/openshell-api.md and CLAUDE.md: backend/proto/ and backend/internal/gateway/ were removed by the SDK migration (#43) and are stale/unused — the vendored Go SDK is the source of truth now, not a local proto copy. Also documented ApproveDraftChunk's new review_token under the optimistic-concurrency hard fact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Now that the BFF is on the official Go SDK (#43), tracking upstream is a
go getbump. This bumpsgithub.com/NVIDIA/OpenShell/sdk/goto latest (pulls upstream v0.0.115; we were pinned to the Aug‑14 / ~v0.0.106 commit) and wires up the additive API surface that shipped since then.Delivers the "keep the repo working against the latest" ask from the #team-openshell thread.
Changes
SDK bump
go get github.com/NVIDIA/OpenShell/sdk/go@latest.ApproveDraftChunknow requires areview_token(optimistic concurrency). The BFF resolves the chunk's token server-side fromGetDraftbefore approving — no frontend contract change; older gateways return an empty token, which the RPC accepts.Sandbox stop/start (new
StopSandbox/StartSandboxRPCs, phasesSTOPPING/STOPPED/STARTING)StopSandbox/StartSandboxhandlers +POST /sandboxes/{name}/stop|startroutes.PhaseLabelrenders the new phases;SandboxPhasetype + create‑modal copy updated.Exit code
SandboxStatus.exitCode(modelsDTO + converter + detail view row) — helps triage ERROR‑phase sandboxes.Draft‑policy diff data
reviewToken,applicationError, andcurrent/candidateeffective‑policy hashes + full policies onPolicyChunk(BFF converter uses the existingmarshalSDKPolicy; TS types added) so the draft inbox can render a before/after diff. (Diff UI itself is a follow‑up.)Docs
.claude/rules/openshell-api.mdhard‑fact docs: add local OIDC dev setup with Keycloak + Podman #1,CLAUDE.mdRPC count (68 in OpenShell),CONTRIBUTING.md,README.md.Testing
go build ./...,go vet ./...,go test ./...— green.npm run typecheck,npm run lint,npm test(178 passing) — green.Follow-ups (not in this PR)
SandboxCard(only table row + detail wired here).backend/gen/+internal/gateway/removed by feat(bff): migrate BFF handlers to OpenShell Go SDK [RHOAIENG-83116] #43 — belongs to the SDK migration cleanup (RHOAIENG-83124).🤖 Generated with Claude Code