Skip to content

refactor(workspace): rename pro to platform in pkg/workspace - #1580

Merged
skevetter merged 1 commit into
mainfrom
refactor/platform-rename-pro-to-platform-workspace-pkg
Oct 19, 2026
Merged

skevetter merged 1 commit into
mainfrom
refactor/platform-rename-pro-to-platform-workspace-pkg

Conversation

@skevetter

@skevetter skevetter commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renames Pro-named identifiers, locals, comments, and internal log/error text in pkg/workspace to Platform terms. pro.go becomes platform.go. Exported renames: ListProInstances → ListPlatformInstances, FindProviderProInstance → FindProviderPlatformInstance. Callers in cmd/ updated to the new identifier only.

Why

Part of the Loft/Pro → Devsy/Platform rename tracker. Behaviour-preserving.

Validation

  • go build ./...
  • GOOS=windows go vet ./pkg/workspace/... ./cmd/...
  • mise run cli:format
  • mise run cli:lint:ci (0 issues)
  • go test ./pkg/workspace/... ./cmd/provider/... ./cmd/pro/... ./cmd/workspace/... (pass)

CodeRabbit CLI

coderabbit review --agent --committed returned rate_limit (free OSS quota exhausted, wait ~4m39s). No review result yet.

Tier

T1. Exported API changed (two functions) with all callers updated in the same commit.

Auto-merge

Eligible: yes. 228 changed non-test lines (119 added, 109 deleted), 13 files.

Remaining

  • Pro tokens in pkg/workspace: 114 → 21 (PCRE count).
  • GetProInstance kept: open PR feat(wslg): discover display values for Windows Docker workspaces #1503 owns cmd/workspace/up/up_client.go.
  • listProWorkspacesForProvider kept: 5-arg signature violates revive argument-limit (max 4). Origin already has this signature. Renaming the changed declaration line trips diff-only lint. Needs a params-struct refactor in a separate change.
  • IsPro(), Workspace.Pro, ProMetadata, and provider2.ProInstance belong to the pkg/provider slice.
  • rename.go: error text changed from "cannot rename pro workspaces; ..." to "cannot rename platform workspaces; they are managed by the platform". The old text was tautological.
  • User-visible CLI strings unchanged.

Next

Re-run CodeRabbit once the rate limit resets. Then mark ready for review.

Summary by CodeRabbit

  • Updates
    • Workspace listings, host suggestions, login, and troubleshooting now use a consistent platform-wide view of instances.
    • Provider deletion and renaming checks account for all platform instances, preserving safeguards when a provider is in use.
    • Platform-related messages and workspace selection terminology are now more consistent.

@skevetter skevetter added the rename Loft/Pro rename label Oct 19, 2026
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 93a2933
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad5c070a2176ec5d12d31ca

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 85cfd283-bb7e-4dcf-8a0d-941b67f15dc9
📥 Commits

Reviewing files that changed from the base of the PR and between 2b30bfa and 93a2933.

📒 Files selected for processing: 13
  • cmd/pro/cluster/add.go
  • cmd/pro/completion/suggestions.go
  • cmd/pro/list.go
  • cmd/pro/login.go
  • cmd/provider/delete.go
  • cmd/provider/rename.go
  • cmd/workspace/troubleshoot.go
  • pkg/workspace/list.go
  • pkg/workspace/platform.go
  • pkg/workspace/provider.go
  • pkg/workspace/provider_update.go
  • pkg/workspace/rename.go
  • pkg/workspace/workspace.go

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The change replaces Pro-specific workspace and instance terminology with platform terminology across workspace helpers and command call sites. Existing listing, selection, provider-check, and update behavior is retained.

Changes: Platform terminology migration

Layer / File(s) Summary
Platform instance and workspace listing
pkg/workspace/platform.go, pkg/workspace/list.go
Instance listing, workspace reconciliation, conversion, and related helpers use platform terminology. Existing filtering, merging, and cleanup behavior remains.
Platform workspace resolution and import
pkg/workspace/workspace.go
Workspace resolution, selection, and import helpers use platform terminology. The existing IsPro() selection condition and import flow remain.
Platform provider lookup and updates
pkg/workspace/provider.go, pkg/workspace/provider_update.go, pkg/workspace/rename.go
Provider lookup and update helpers use platform terminology. Existing provider matching and update behavior remain. The workspace rename rejection message now refers to platform workspaces.
Command call sites
cmd/pro/cluster/add.go, cmd/pro/completion/suggestions.go, cmd/pro/list.go, cmd/pro/login.go, cmd/provider/delete.go, cmd/provider/rename.go, cmd/workspace/troubleshoot.go
Commands use ListPlatformInstances for their existing instance-listing paths. Existing error handling and checks remain.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 93a29

The terminology migration appears mergeable after normal checks; no concrete behavior regression is established.

Security architecture risk: ⚪ Minimal · up to 93a29

No material security risk was found introduced by this rename. Provider restrictions, ownership filtering and state-transition guards remain unchanged. Source consumers of the two old exported function names must update.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The reviewed entrypoint changes do not expand attacker-controlled reachability: supplied context, provider and host values continue through the same instance loaders and provider matching. No additional authority or instance scope is introduced by renaming the called functions.

Trust Boundaries and Controls

  • observed — Provider deletion still checks instance and workspace usage unless explicitly forced. Provider rename still rejects platform-managed provider types and instance associations. Workspace rename still rejects platform-managed workspaces before mutation. These restrictions are preserved, not newly introduced controls.

Resilience and Maintainability Implications

  • observed — Listing reconciliation retains provider-keyed results, owner propagation, mutex-protected collection and completion waiting before cleanup. Missing or failed provider results retain local workspaces; successful results use the existing imported-workspace and UID-counterpart checks. Cancellation propagation and failure outcomes are unchanged by this PR.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 40 functions across 13 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the refactor from Pro to Platform terminology in the workspace package. It is concise and follows Conventional Commits format.
Description check Passed The description explains the scope, motivation, behavior-preserving intent, validation commands, out-of-scope items, and review status. It does not use every template section, such as the explicit cha…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the scope, motivation, behavior-preserving intent, validation commands, out-of-scope items, and review status. It does not use every template section, such as the explicit change-type, AI-assistance, checklist, and manual-verification sections, but it is sufficiently complete for review.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 93a2933
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad5c070cf94e67c3def4c6a

@skevetter
skevetter marked this pull request as ready for review October 19, 2026 07:15
@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

1 similar comment
@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@skevetter
skevetter merged commit 91c3655 into main Oct 19, 2026
199 of 201 checks passed
@skevetter
skevetter deleted the refactor/platform-rename-pro-to-platform-workspace-pkg branch October 19, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rename Loft/Pro rename size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant