Skip to content

perf: remove nodes api feature flag checks#200

Merged
sigmachirality merged 2 commits into
mainfrom
cursor/remove-nodes-api-feature-flag-checks-3f1f
Sep 18, 2025
Merged

perf: remove nodes api feature flag checks#200
sigmachirality merged 2 commits into
mainfrom
cursor/remove-nodes-api-feature-flag-checks-3f1f

Conversation

@sigmachirality
Copy link
Copy Markdown
Member

Remove the "vm-provider" feature flag checks because the nodes API is now in open beta and the flag was causing flakiness.


Slack Thread

Open in Cursor Open in Web

Co-authored-by: danieltaox <danieltaox@gmail.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Sep 18, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Sep 18, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  deno.lock Unsupported file format
  src/lib/nodes/index.ts  0% smaller
  src/lib/posthog.ts  0% smaller

@sigmachirality sigmachirality changed the title Remove nodes api feature flag checks perf: remove nodes api feature flag checks Sep 18, 2025
@sigmachirality sigmachirality marked this pull request as ready for review September 18, 2025 01:59
@sigmachirality sigmachirality merged commit 6fb80cf into main Sep 18, 2025
1 check passed
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR removes the "vm-provider" feature flag that was gating access to the nodes API functionality in the SF Compute CLI. The changes span two files: src/lib/nodes/index.ts and src/lib/posthog.ts.

In src/lib/nodes/index.ts, the PR eliminates the async feature flag check that was preventing the nodes command from being registered when the flag was disabled. Previously, the registerNodes function would call isFeatureEnabled("vm-provider") and return early if the flag was false. Now, the nodes command is registered unconditionally, making it available to all users.

In src/lib/posthog.ts, the "vm-provider" option is removed from the FeatureFlags union type definition. This TypeScript change ensures that any remaining usage of this flag elsewhere in the codebase will be caught at compile time, preventing partial removals.

These changes align with the nodes API transitioning from experimental/gated access to open beta status. The feature flag was originally implemented to control access during development and testing phases, but is now obsolete. The removal also eliminates the async PostHog API call and caching logic required for feature flag evaluation, providing a performance improvement by making command registration synchronous.

The changes integrate cleanly with the existing CLI architecture. The nodes command registration follows the same pattern as other commands in the system, and the PostHog integration remains intact for the remaining feature flags ("procurements", "zones", and "custom-vm-images").

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it removes unused feature flag logic for a feature now in open beta
  • Score reflects straightforward cleanup changes with clear business justification and proper TypeScript safety
  • No files require special attention as the changes are simple removals with good type safety

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

sigmachirality added a commit that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants