feat: enable GrowthBook local gate defaults for P0/P1 features#151
Closed
amDosion wants to merge 1 commit intoclaude-code-best:mainfrom
Closed
feat: enable GrowthBook local gate defaults for P0/P1 features#151amDosion wants to merge 1 commit intoclaude-code-best:mainfrom
amDosion wants to merge 1 commit intoclaude-code-best:mainfrom
Conversation
Add LOCAL_GATE_DEFAULTS mapping in growthbook.ts to enable 25+ features when GrowthBook is not connected. Modify 4 getter functions to check local defaults before returning hard-coded false. P0 (local): keybindings, streaming tool exec, cron, JSON tools, ultrathink P1 (API): session memory, auto memory, prompt suggestions, brief mode Kill switches: 10 gates kept true to prevent remote disable New compile flags: AGENT_TRIGGERS, ULTRATHINK, BUILTIN_EXPLORE_PLAN_AGENTS, LODESTONE, EXTRACT_MEMORIES, VERIFICATION_AGENT, KAIROS_BRIEF, AWAY_SUMMARY Bypass: CLAUDE_CODE_DISABLE_LOCAL_GATES=1
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR introduces local GrowthBook gate defaults for offline scenarios, expands feature flag compilations in build/dev configurations, adds comprehensive GrowthBook enablement documentation, and includes a new gate verification script that validates gate behavior against expected values. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Summary
LOCAL_GATE_DEFAULTSmapping ingrowthbook.tswith 25+ feature gate defaultsgetFeatureValueInternal,getFeatureValue_CACHED_MAY_BE_STALE,checkStatsigFeatureGate_CACHED_MAY_BE_STALE,checkGate_CACHED_OR_BLOCKING) to check local defaults when GrowthBook is not connectedbuild.tsandscripts/dev.tsscripts/verify-gates.tsfor programmatic gate verification (30/30 PASS)Features Enabled
P0 — Pure local (no external dependencies):
Custom keybindings, streaming tool execution, cron tasks, JSON tools (~4.5% token savings), immediate model switch, ultrathink, built-in Explore/Plan agents, deep link protocol, MCP delta, leaf pruning, message smooshing, auto-background agents, fine-grained tool state
P1 — API-dependent (works with any valid API key):
Session memory, auto memory extraction, prompt suggestions, verification agent, brief mode, away summary, auto dream, idle return prompt
Kill switches (10 gates kept true):
Prevent remote disable of ultrathink, explore/plan agents, agent teams, bash security analysis, clipboard, cache prefix, durable cron, attribution, agent progress
New Compile Flags
AGENT_TRIGGERS,ULTRATHINK,BUILTIN_EXPLORE_PLAN_AGENTS,LODESTONE,EXTRACT_MEMORIES,VERIFICATION_AGENT,KAIROS_BRIEF,AWAY_SUMMARYSafety
CLAUDE_CODE_DISABLE_LOCAL_GATES=1Test plan
bun run buildpasses (480 files)bun test— no new failuresNODE_ENV=test bun run scripts/verify-gates.ts— 30/30 PASSbun run dev→ type "ultrathink" → verify extended thinking activates/keybindings→ verify custom keybinding UI loads/brief→ verify brief mode togglesSummary by CodeRabbit
New Features
Documentation