Skip to content

refactor(provider): rename ProInstance to PlatformInstance - #1593

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

skevetter merged 1 commit into
mainfrom
refactor/platform-rename-pro-instance

Conversation

@skevetter

@skevetter skevetter commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renames the ProInstance family to PlatformInstance across pkg/provider, pkg/config, pkg/platform, pkg/workspace, and cmd/{pro,provider,workspace}. Renames DevsyProInstance to DevsyPlatformInstance and pkg/provider/pro.go to platform.go. Behaviour is unchanged.

Why

ProInstance describes a Devsy Platform host, not a "pro" instance. Follows #1585 (ProMetadata to Platform).

Tier

T1, token-only rename. Kept (persisted or wire values, T3): pro.json, pro_instances, lock name pro-instance-%x.lock, json tags, provider ids pro/devsy-pro, config.ProReleaseName, env vars, and the DevsyProInstances troubleshoot JSON field. Deferred: workspace.GetProInstance and its caller in cmd/workspace/up/up_client.go, because PR #1503 touches them.

Validation

  • go build ./...: pass
  • GOOS=windows go vet on touched packages: pass
  • mise run cli:format: pass
  • mise run cli:lint:ci: 0 issues
  • golangci-lint run --new-from-rev=origin/main on touched packages: 0 issues. Full-package run shows 72 existing issues in untouched code.
  • go test on pkg/provider, pkg/config, pkg/platform, pkg/workspace, cmd/pro, cmd/provider, cmd/workspace: pass
  • Token counts (lines, cmd and pkg, HEAD to branch): ProInstance|proInstance 136 to 7 (remaining: 3 DevsyProInstances, 4 GetProInstance and its caller). Broader pattern including pro instance, pro host, DevsyProInstance: 189 to 26 (remaining: product strings and help text).

CodeRabbit CLI

Not completed. coderabbit review --agent --committed failed 3 times with Connection failed: WebSocket closed (recoverable). No findings.

Auto-merge

Not eligible. Non-test changed lines: 348 (187 added, 161 deleted), over the 300 cap. Error and log text also changed (for example pro instance host is empty to platform instance host is empty).

Remaining

  • GetProInstance and up_client.go:188-189 (after feat(wslg): discover display values for Windows Docker workspaces #1503).
  • DevsyProInstances JSON field and pro.json/pro_instances on-disk names (persisted, need migration).
  • Help and product strings still say "pro instance" or "Devsy Pro instance" in untouched files (cmd/pro/workspace/*, cmd/pro/proutil/proutil.go, cmd/pro/start.go, cmd/pro/list.go:37, cmd/pro/login.go:50,340).
  • CodeRabbit CLI review.

Summary by CodeRabbit

  • Updates
    • Platform instances are now referred to consistently as “Platform” across instance selection, listing, login, logout, provider management, and troubleshooting.
    • Platform instance settings and version checks now use the updated terminology, while existing selection and matching behavior remains unchanged.

@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 53804de
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad6365542d6314712c5521f

@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: 4de69809-c5f5-4e44-8b2b-64e5b470ecd9
📥 Commits

Reviewing files that changed from the base of the PR and between 099d79c and 53804de.

📒 Files selected for processing: 22
  • cmd/pro/cluster/add.go
  • cmd/pro/completion/suggestions.go
  • cmd/pro/list.go
  • cmd/pro/login.go
  • cmd/pro/login_test.go
  • cmd/pro/logout.go
  • cmd/provider/delete.go
  • cmd/provider/rename.go
  • cmd/workspace/troubleshoot.go
  • pkg/config/pathmanager.go
  • pkg/config/pathmanager_linux_test.go
  • pkg/platform/client.go
  • pkg/platform/version.go
  • pkg/provider/dir.go
  • pkg/provider/operationlock.go
  • pkg/provider/persist_test.go
  • pkg/provider/platform.go
  • pkg/provider/pro.go
  • pkg/provider/provider.go
  • pkg/workspace/platform.go
  • pkg/workspace/provider.go
  • pkg/workspace/provider_update.go
💤 Files with no reviewable changes: 1
  • pkg/provider/pro.go

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

📝 Walkthrough

The pull request replaces Pro-instance types and APIs with platform-instance equivalents across configuration, workspace operations, and CLI commands. The existing pro_instances directory layout and instance matching behavior remain unchanged.

Changes: Platform Instance Migration

Layer / File(s) Summary
Platform-instance type and persistence APIs
pkg/provider/platform.go, pkg/provider/pro.go, pkg/provider/dir.go, pkg/provider/operationlock.go, pkg/config/pathmanager.go, pkg/config/pathmanager_linux_test.go, pkg/provider/persist_test.go, pkg/provider/provider.go
A PlatformInstance type and platform-instance path, persistence, and lock APIs replace Pro-instance equivalents. The directory remains pro_instances, and the lock-file prefix remains pro-instance-.
Workspace and platform instance consumers
pkg/workspace/platform.go, pkg/workspace/provider.go, pkg/workspace/provider_update.go, pkg/platform/client.go, pkg/platform/version.go, cmd/workspace/troubleshoot.go
Workspace listing, provider lookup, update checks, version retrieval, and troubleshooting now use platform-instance types and configuration APIs.
Platform-instance login and logout
cmd/pro/login.go, cmd/pro/login_test.go, cmd/pro/logout.go
Login resolves, locks, validates, and saves platform instances. Logout loads platform-instance configuration, uses its provider, and removes its directory. Login tests use the renamed APIs.
CLI listing, selection, and provider checks
cmd/pro/cluster/add.go, cmd/pro/completion/suggestions.go, cmd/pro/list.go, cmd/provider/delete.go, cmd/provider/rename.go
CLI listing and selection use platform-instance terminology and values. Provider deletion and rename checks retain their matching behavior and update their messages.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~22 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 53804

No actionable merge-blocking risk is identified; the platform-instance rename appears ready for normal merge checks.

Security architecture risk: ⚪ Minimal · up to 53804

The change renames Go APIs while preserving stored data, host selection, authentication inputs, and locking behavior. Source integrations using the old names require updates, but no material security risk was found to be introduced or worsened.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The renamed APIs have broad repository usage, but inspected consumers continue to address the same context-scoped hosts and providers. The comparison does not show an increase in independently reachable hosts, credentials, or provider authority.

Trust Boundaries and Controls

  • observed — Host and provider values follow the same resolution and authentication paths before and after the rename. The list command passes the same instance Host and Provider values to login, and provider deletion and rename retain their instance-association checks.

Resilience and Maintainability Implications

  • observed — Login preserves lock acquisition before instance resolution and deferred release. Provider creation still precedes instance persistence; logout still deletes provider configuration under its provider lock before removing the instance directory. Failure, repetition, interruption, and concurrency behavior in these sequences is not changed by the rename; no new atomicity or recovery guarantee is introduced.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 24.39% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 21 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 and concisely describes the primary change: renaming ProInstance to PlatformInstance. It follows the repository's Conventional Commits format.
Description check Passed The description clearly explains what changed, why it changed, preserved persisted values, deferred work, validation results, and known limitations. It does not complete every template checkbox, espec…
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 clearly explains what changed, why it changed, preserved persisted values, deferred work, validation results, and known limitations. It does not complete every template checkbox, especially the AI assistance and checklist sections, but it provides the critical review context and is mostly complete.

  • 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 53804de
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad636556ec64c50d74162ae

@skevetter
skevetter marked this pull request as ready for review October 19, 2026 18:51
@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.

@skevetter

Copy link
Copy Markdown
Contributor Author

Bot: all gates green on 53804de (CI, CodeRabbit success, 0 threads, signed). Not auto-merged: 348 non-test lines exceeds the 300-line cap -> needs human: size.

@skevetter
skevetter merged commit 81b14d2 into main Oct 19, 2026
111 checks passed
@skevetter
skevetter deleted the refactor/platform-rename-pro-instance branch October 19, 2026 22:08
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