feat: give feature switches the config.go treatment #925
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!925
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-854-feature-flag-table"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The numbers have one file, one helper, a validator, and a generated reference. The switches now have the same four.
What was there
Three switches, each a separate
boolOrDefault(os.Getenv(...), default)inLoadConfigwith the name, the default, and the variable on three lines apiece. Nothing enumerated them, so "what can this deployment turn on" had no answer short of readingLoadConfig.The four pieces
internal/community/featureflags.goholds the table. Each entry binds the environment name, the field it sets, its default, and one sentence on what it turns on, on one line each, so none of the four can drift from the others.applyFeatureFlagsruns the table once, so a switch cannot be read at a call site the reference does not know about.TestEveryFeatureFlagLivesInTheTablerefuses aboolOrDefaultanywhere else in the package. Mutation checked: a stray one fails it by file and line.just flagsrendersagent/rendered/flags.txt,just flags-checkand a staleness test fail when it falls behind, and a second test fails whendocs/sirens-echo-tuning.mdstops linking it.One deliberate difference from the knobs, now written down
A knob that does not parse keeps its default and is named in the startup log. A switch that does not parse is fatal, because a service running with a surface silently off is worse than one that refuses to start. That is the behaviour it already had; nothing changes except that it is now stated.
Two shape decisions worth reviewing
agent/rendered/flags.txt, not a markdown file underdocs/. The issue asks for a markdown doc.docs/is at 40 files against a 40 cap after the band migration, so a generated page there would break the band the repo just landed on.knobs.txtsits in the same place for the same reason, with the prose page pointing at it.*Configrather than package-level vars like the knobs, because these are fields of a per-callConfigrather than process globals.just gatePASS.closes #854