feat(workstation): add Workstation resource kind#29
Conversation
Reconcile SSH workstations: create/update/delete via WS RPC (workstations.create/update/delete, permissions.add/remove, linkAgent). SSH credentials (privateKey/host/user/fingerprint) are write-only — never returned by API, never logged. Prune safety: workstations.list returns createdBy; prune skips any resource where createdBy != gcplane, so imperatively-created workstations (e.g. coding-agent/vanducng) are never auto-deleted. Agent links are add-only (nil current → no unlinks) since goclaw has no workstations.links.list RPC yet. Adds 11 unit tests (observe, create, update, delete, params, write-only fields, list-all) + 2 reconciler tests (prune-skips-non-gcplane-owned, adopt-existing-workstation).
|
Warning Review limit reached
More reviews will be available in 56 minutes and 57 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Workstationresource kind: reconcile SSH workstations via WS RPC (workstations.create/update/delete,permissions.add/remove,linkAgent)privateKey,host,user,knownHostsFingerprint) declared write-only — excluded from diff, never logged, encrypted at rest by goclawworkstations.listreturnscreatedBy; prune skips any resource wherecreatedBy != "gcplane"— imperatively-created workstations (e.g.coding-agentwithcreated_by=vanducng) are never auto-deletedworkstations.links.listRPC yet; guarded bynilcurrent sentinel with explanatory commentTests
13 new tests (11 unit + 2 reconciler):
createdByTestReconcile_Prune_SkipsNonGcplaneOwned— prune never deletescreatedBy=vanducngworkstationTestReconcile_Workstation_AdoptExisting— existing non-gcplane workstation takes Update path (no duplicate Create)All 15 packages pass (
go test ./internal/... && go vet ./... && go build ./...).Deploy note
Do NOT merge the goclaw-config
feat/workstation-resourcebranch until this gcplane release is deployed — reconciling an unknownWorkstationkind on the running gcplane would break the reconcile loop.