You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2c84aaa
Browse filesBrowse the repository at this point in the historyBrowse files
fix: address self-review findings on sandbox stop/start + draft approve
- 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>
**THE PROTO FILES IN `backend/proto/` ARE THE SOURCE OF TRUTH.**Before writing any gateway wrapper method, REST handler, or TypeScript type, read the actual RPC and message definitions in the proto. Never invent RPCs, fields, or lifecycle states. If a UI idea has no backing RPC, flag it — do not fabricate an endpoint.
9
+
**THE VENDORED GO SDK IS THE SOURCE OF TRUTH.**Since the SDK migration (PR #43), the BFF calls `github.com/NVIDIA/OpenShell/sdk/go` directly — there is no local `backend/proto/` copy or `backend/gen/` anymore (both were removed; `backend/proto/*.proto` predates the migration and is stale/unused — do not edit or regenerate from it). Before writing any handler or TypeScript type, read the actual RPC/message definitions in `$(go env GOMODCACHE)/github.com/!n!v!i!d!i!a/!open!shell/sdk/go@<version>/openshell/v1/` (hand-written client wrappers with doc comments; `types/*.go` for message shapes) or via `go doc`. Never invent RPCs, fields, or lifecycle states. If a UI idea has no backing RPC, flag it — do not fabricate an endpoint. Track upstream via `go get github.com/NVIDIA/OpenShell/sdk/go@latest`.
8.**Provider model** (`datamodel.v1.Provider`): metadata, type (profile slug like "claude"/"gitlab"), credentials (map, `secret` option — strip before returning to browser), config (map), credential_expires_at_ms, profile_workspace. No endpoint-URL/status/model fields. Valid types come from `ListProviderProfiles`.
30
30
9.**No list-images API.** Sandbox images are free-text OCI refs; community images by convention `ghcr.io/nvidia/openshell-community/sandboxes/<name>`.
31
31
10.**`GetGatewayInfo` returns only** status, gateway_version, compute_drivers[]. No uptime/db/TLS/auth-mode fields.
32
-
11.**Optimistic concurrency:**`AttachSandboxProvider`, `DetachSandboxProvider`, `UpdateConfig`, `UpdateProviderProfiles` accept `expected_resource_version` — pass the ObjectMeta.resource_version from the last read.
32
+
11.**Optimistic concurrency:**`AttachSandboxProvider`, `DetachSandboxProvider`, `UpdateConfig`, `UpdateProviderProfiles` accept `expected_resource_version` — pass the ObjectMeta.resource_version from the last read.`ApproveDraftChunk` similarly takes a `review_token` (from the chunk's last `GetDraft` read) pinning the exact evaluated candidate; the BFF falls back to resolving it server-side if the client doesn't send one.
33
33
12.**Workspace scoping:** most requests carry a `workspace` field (empty = "default"); list RPCs offer `all_workspaces`. Workspaces themselves are top-level.
34
34
13.**Secret fields** are annotated `[(openshell.options.v1.secret) = true]` in proto — grep for `secret` when adding a wrapper and never serialize those fields to the frontend.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Each rule has a corresponding Architecture Decision Record in [`docs/adrs/`](doc
53
53
54
54
## OpenShell API reference
55
55
56
-
The gateway exposes 72 gRPC RPCs across 2 services (68 in `OpenShell`, 4 in `Inference`). Proto files are in `backend/proto/`.
56
+
The gateway exposes RPCs across 2 services (`OpenShell`, `Inference`), consumed via the vendored `github.com/NVIDIA/OpenShell/sdk/go` (see `.claude/rules/openshell-api.md`) — not a local proto copy.
0 commit comments