Skip to content

WIP: feature_flags detector (#4114) - #4130

Merged
squid-protocol merged 1 commit into
mainfrom
signal/feature-flags-4114
Oct 2, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
signal/feature-flags-4114

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

DRAFT / WIP. No engine change yet. Stopped early because the orchestrator ran short of token budget. Fixes #4114 once finished.

Done

  • Scope: this is a dormant-slot activation, the same shape as cobol: no base-schema owner for the auth surface (SIGNON, VERIFY PASSWORD, EXEC SQL GRANT/REVOKE) #3004/Activate auth_middleware as a first-class domain sensor across the registry (#3004) #3157. feature_flags (arch_feature_flags) is already in SIGNAL_SCHEMA, the record_keeper map, the density schema and the debt SURFACE_FAMILY. Vector width and feature_contract_sha do not change. A retrain is owed at merge.
  • Risk impact:
    • risk_tech_debt does NOT move. _calc_tech_debt (signal_processor.py) reads only planned_debt, fragile_debt, unreferenced_by_name and duplicate_logic.
    • Activating the rule moves the raw-signal debt surface-family total (fam_debt) and its percentiles.
    • It also moves the legacy file k-means feature log_density_arch_feature_flags (median 0, IQR 1) used by the record_keeper file brain.
    • The function brain and the composition file/repo brains do not read it.
  • Draft rules and a precision harness, run over all 1.0M+ source files in /nvme-data/gitgalaxy-data. The scratch copy is at /home/joe/.claude/jobs/29795dfd/tmp/feature-flags/ff_rules.py and scan.py. Hits so far:
Language Hits Files What fires
go 1906 580 kubernetes FeatureGate.Enabled / SetFeatureGateDuringTest
ruby 1081 canvas-lms feature_enabled?
python 316 sentry features.has("org:..")
java 263 toggle-shaped @ConditionalOnProperty, ES *_FEATURE_FLAG.isEnabled()
javascript 177 React shared/ReactFeatureFlags imports
csharp 169 AppContext.TryGetSwitch/SetSwitch
typescript 167 grafana OpenFeature, GrowthBook, VS Code getTreatment
dart 4
kotlin 3
cpp, php, swift, objc, rust, scala 0
  • False positives found and removed:
    • JVM .getBooleanValue( (Jackson parsers)
    • a string-literal @ConditionalOnProperty
    • config-selection @ConditionalOnProperty (now narrowed to .enabled/havingValue="true|false" plus @ConditionalOnBooleanProperty)
    • sentry featureFlags/utils UI-module imports (now matches the last path segment only)
  • Known remaining FP: pypy feature_flags.get( (compiler future flags).

Left

  • Hand-checked precision sample of about 100 hits.
  • Contract trio: _c row, # feature_flags: OUTPUT SCHEMA comment, domain_sensor_contracts.md addendum, then --render.
  • Add the rules to the 38 sibling-set languages. Stated-absence None planned for: c, shell, perl, lua, haskell, zig, solidity, matlab, fortran, ada, assembly, livecode, embedded_python, makefile, dockerfile, sqlite, db2_sql, cobol, hlasm, pli, rexx, bms, csd, powershell.
  • Strict-test baseline pins for the 6 pinned languages (all None).
  • Leaf-only golden bless of both split masters (.../7_structural_signatures_net_mitigated_signals/feature_flags.json).
  • Run pr_gates.py.
  • tests/signal_coverage_baseline.json does not exist on main yet, because the Golden master signal coverage: 20 signals never fire on the crucible (mostly security/AI), so regressions in them are invisible #4108 PR is unmerged.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 2, 2026 16:20
@squid-protocol
squid-protocol merged commit f69ba02 into main Oct 2, 2026
4 checks passed
@squid-protocol
squid-protocol deleted the signal/feature-flags-4114 branch October 2, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature_flags signal has no detector: always 0, yet it feeds the debt risk family

1 participant