Repository navigation
Conversation
5 of 6 tasks
grok47MaxEffort imported the server feature-flag module directly. cursorAutoCatalog imports it and ProviderDetailPageClient reaches cursorAutoCatalog, so the browser bundle pulled in the SQLite adapters behind @/lib/db/core and the production build rejected the bundle on node builtins. Read the flag through open-sse's isRegisteredFeatureFlagEnabled helper instead. It reads the same process-wide resolver that featureFlags.ts registers when it loads on the server, so the answer is unchanged while that resolver is registered, and open-sse no longer takes an import from src. A test pins the file to that helper and checks that a resolver registered through the bridge is the one the helper reads; nothing else in the suite ties those two symbols together. Signed-off-by: Minxi Hou <houminxi@gmail.com>
HouMinXi
force-pushed
the
fix/grok47-flag-client-bridge
branch
from
October 30, 2026 04:47
e8baba8 to
37c23d5
Compare
7 of 8 tasks
Contributor
Author
|
After syncing f75a937, this PR contains only the bridge-to-open-sse regression test and its changelog entry. The production fix is already in release/v3.8.53 through #18625. The new test checks both sides of the shared symbol lookup. In an isolated mutation check, changing the bridge's symbol prefix made it fail while the existing tests for each side still passed. The shared Gemini midnight-clock and VS Code catalog-discovery test fixes are tracked separately in #18748. Their targeted cases have passed in its Ready CI run; this does not establish that this PR's full checks are green. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What breaks
grok47MaxEffort.tsimported the server feature-flag module directly. The chainthat reaches a client component:
#17388addedgrok47MaxEffort.tsand wired it intocursorAutoCatalog.ts,which did not import it before. That puts the SQLite adapters and
fsinto thebrowser bundle, and the production build rejects the bundle on node builtins.
The change
grok47MaxEffort.tsnow callsisRegisteredFeatureFlagEnabledfromopen-sse/utils/registeredFeatureFlag.ts. That helper already exists for thispurpose and is what
codebuddy-cn.tsandproviderSafety.tsuse. It reads theresolver
featureFlags.tspublishes on a process-wide symbol, so it reaches thesame answer without importing from
src/.This removes an
open-sse -> srcimport rather than adding one.Behaviour
The server answer is unchanged while the resolver is registered, which it is on
every DB-backed path:
src/lib/db/core.tsimportsfeatureFlags.ts, and thatmodule registers the resolver when it loads.
instrumentation-node.tsawaitsdb/coreduring boot, so registration happens before any request.One side effect worth naming: reading the flag no longer forces the database
layer to load. Nothing in the tree relied on that.
With no resolver registered the helper is env-only. This flag defaults to
false, and both call sites (requestedModelParameters.ts,cursorAutoCatalog.ts) run inside DB-backed request paths, so that branch isnot reachable there today.
Verification
client-bundle-no-server-only-10692, the whole-graph guard, is red on theparent commit and names the trail above; it passes here.
again and fails both assertions in the new test. Restoring the helper returns
everything to green.
read cannot see: the helper call left in place while the server import comes
back alongside it.
grok47-flag-client-safe-import,cursor-grok-47-context-17386,cursor-grok-effort-aliases,feature-flag-resolver-bridge,grok47-max-effort-flag,registered-feature-flag: 17/17.CI note
Unrelated to this diff, and present on the parent commit:
Change Classificationfails onfree-catalog-evidence: tokenharbor/claude-haiku-5.5,which makes the downstream unit job skip, and
source-scanner-guardsreportstwo other files. Neither is touched here.