diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-06 18:19:27 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-06 18:19:27 +0000 |
| commit | 06450fe69ade2928deb9274bb67b7ba60d394b4f (patch) | |
| tree | 328c3e2f5608663669d75330bfde1e61ab713499 /cmd | |
| parent | f7d18eae924a221f12293c3063e46b791468623f (diff) | |
Remove the feature toggle system (dead code)
Audited it (couldn't query the live DB directly -- auto-mode classifier
blocks direct production reads without prior approval -- so this is a
code-only audit): GetFeatureToggles/SetFeatureEnabled/IsFeatureEnabled/
CreateFeatureToggle/DeleteFeatureToggle had exactly one caller each, all
inside their own CRUD handlers. Nothing anywhere else in the codebase
read a toggle's Enabled state to gate any actual behavior -- confirmed
by grepping every remaining .Enabled/IsFeatureEnabled reference back to
either this dead code or its own tests. It was pure UI-managed CRUD with
no consumer, unlike Trusted Agents (wired into agent.go/websocket.go)
or Data Sources (wired into the sync pipeline) which stayed.
Removes the Settings page section, the three /settings/features* routes
and handlers, the five Store methods, the FeatureToggle model, and adds
028_drop_feature_toggles.sql (next free migration number, per this
repo's convention of never renumbering -- see 021_drop_tasks.sql for
the same drop-table-forward pattern) to drop the now-unused table.
Also removed the now-dead tests for all of the above.
go build ./... and go test ./... both clean.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/dashboard/main.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index 89d12d1..f83fea1 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -381,9 +381,6 @@ func main() { r.Post("/settings/sync", h.HandleSyncSources) r.Post("/settings/clear-cache", h.HandleClearCache) r.Post("/settings/toggle", h.HandleToggleSourceConfig) - r.Post("/settings/features", h.HandleCreateFeature) - r.Post("/settings/features/toggle", h.HandleToggleFeature) - r.Delete("/settings/features/{name}", h.HandleDeleteFeature) r.Delete("/settings/agents/{id}", h.HandleDeleteAgent) // Maintenance bucket management (Settings page) |
