Repository navigation
refactor: compose shared sanitizing gate logic (refs #3174) - #3177
Conversation
|
|
Delivered in merge commit 6058741 (PR #3177). Physically removed duplicated gate logic: five JavaScript files, 135 net lines removed. Validation on reviewed HEAD 0cc5071: 47 self-tests, 167 complete equivalence comparisons, 23 rejection/restoration controls, two Atomic regressions and both independent code approvals. Native CI: 13 successful checks and seven skipped full-tier jobs (full=false). Real Sonar quality gate passed: duplication 0.0% (0/89 new lines, limit 3%), reliability A; S7727 resolved. Only #3174 is closed. Epic #3166 and follow-up #3169 remain open. No application build was requested. Local main is synchronized and clean; the feature branch and its remote tracking reference have been removed. |



The four sanitizing detectors duplicated the same gate traversal, alias resolution and metric helpers. Extract that logic into one shared module and keep each detector's policies and public runGate/CLI behavior intact. The change removes 135 net lines across five JavaScript files; the original 47 tests are unchanged.
The follow-up commit makes the shared filter callback explicitly unary to address Sonar S7727. That is the only change after the first reviewed implementation. Its physical extraction proof records this exact adaptation and continues to reject other differences.
Validation on reviewed HEAD 0cc5071: self 47/47, four newly executed gate CLIs, 23 PASS→symptom FAIL with diagnostic→restoration PASS controls, 167 complete PRE/candidate equivalence comparisons, Atomic regressions and bounded physical extraction proof. Both independent reviewers approved this exact HEAD. Unchanged Rust structural guards are reused by complete input identity. Local Node26 validation complements required CI Node22 validation.
The previous HEAD's real Sonar duplication result was 0.0% (0 duplicated lines among 89 new lines; unchanged limit 3%), but its quality gate failed on S7727. All remote results for the new HEAD remain pending until native CI and real Sonar complete. The earlier PR3173 CI exception does not apply.
Native CI tiers remain unchanged; no ci:full label or manual full dispatch. No Rust/TypeScript, dependencies, workflows, protection rules, Sonar thresholds/exclusions, versions, application build or release changes.
Refs #3166, #3168, #3173.
Closes #3174