feat: enable SHOT_STATS, PROMPT_CACHE_BREAK_DETECTION, TOKEN_BUDGET#140
Conversation
…eature flags Enable 3 verified compile-only feature flags in build.ts and dev.ts defaults: - SHOT_STATS: local shot distribution statistics in /stats panel - PROMPT_CACHE_BREAK_DETECTION: internal cache key change diagnostics - TOKEN_BUDGET: support +500k syntax for minimum output token targets All 3 flags verified by 6 parallel sub-agents + independent Codex CLI review. Build passes (475 files), zero new test failures. Also adds: - docs/features/feature-flags-codex-review.md: Codex review findings - Marks all enabled flags in feature-flags-audit-complete.md - Adds openai dependency (needed for OpenAI compat layer)
|
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 (1)
📝 WalkthroughWalkthroughAdds three compile-time feature flags ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Document the SHOT_STATS, TOKEN_BUDGET, PROMPT_CACHE_BREAK_DETECTION enablement process including verification methodology, Codex review findings, and key discoveries about audit report accuracy.
Summary
Enable 3 verified compile-only feature flags in default build/dev configuration:
/statspanel (zero external deps)+500k/spend 2M tokenssyntax for minimum output token targets with live progress barVerification Process
docs/feature-flags-audit-complete.md) claimed 22 flags as "COMPLETE"Changes
build.tsDEFAULT_BUILD_FEATURESscripts/dev.tsDEFAULT_FEATURESpackage.json/bun.lockopenaidependency (for OpenAI compat layer)docs/features/feature-flags-audit-complete.md[build: ON]/[dev: ON]docs/features/feature-flags-codex-review.mdTest Plan
bun run buildpasses (475 files bundled)bun test— zero new test failures (23 pre-existing failures unchanged)extractShotCountFromMessages,shotDistributionaggregation, Stats.tsx renderingparseTokenBudget,checkTokenBudgetauto-continuation loop, Spinner progress barrecordPromptState,checkResponseForCacheBreak, diff file writing with try-catchSummary by CodeRabbit
New Features
Documentation
Chores