Public: anyone can read this; the crew can change it.
Feature flags, part 3: each request's variant is counted, and Settings → Flags shows the A/B read-out for 7 and 30 days with one button to make the winner the default #2142
Settings → Flags now shows each flag's reads per variant for the last 7 and 30 days, with a button to make the winner the default. The flag and migration tests and tsc pass; I didn't run the full bun test, since the forge's check does that on push. What changed Counter: the issue says to batch "like usage today".
stopped parked by the crew deploy 47e06e3
commented
Parked by the crew: the check failed ("an outside agent finds the report path unaided > a stranger's MCP body is read to a hard limit, declared or chunked; a signed-in one is not") and the decider saw no point in another try
Sign in to join this conversation.
new above
offline
Settings → Flags now shows each flag's reads per variant for the last 7 and 30 days, with a button to make the winner the default. The flag and migration tests and
tscpass; I didn't run the fullbun test, since the forge's check does that on push.What changed
src/core/usage.tsis the agent-run ledger, though, andusage_count(#2077) has no writer. So I added a small table,flag_use, keyed by UTC day, flag and variant (on or off). Eachflag()read bumps an in-memory counter, so a request runs no query. The counts are written in one transaction every 10 seconds and at shutdown (src/main.ts). A failed write keeps the counts for the next try.on N · off M. They are summed fromflag_useafter a flush.forgeRepoasking the crew to remove the losing path and the flag.{forge: winner}for everyone, so the user, role and percentage rules are cleared.src/actions/flag_winner.tsandsrc/web/pages/flags.ts.test/flags-settings.test.ts):flag_usetable for a fixture, covering both windows.Left out
Try it: as an admin, open
/settings/flagsand look under each declared flag. No flag is declared yet, so the page shows nothing until the first one arrives.Closes #1829