## Phase 8: Enterprise Extractor Improvements ✅ - 14 security extractors (TLS, JWT, SQL injection, XSS, etc.) - 10 framework-specific extractors (Spring, Django, Rails, etc.) - Config file security detection (YAML, TOML) ## Phase 9: Autonomous Extractor Generation ✅ - Shadow mode executor with TP/FP tracking - Graduation pipeline with confidence thresholds - Auto-rollback on regression detection - Cross-project pattern syncing ## UAT Suite Complete (14 scripts, 90 tests) - test-core-detection.sh (6 tests) - test-declarative-extractors.sh (5 tests) - test-domain-frameworks.sh (5 tests) - test-domain-unreal.sh (3 tests) - test-llm-extraction.sh (6 tests) - test-eval-harness.sh (5 tests) - test-cross-language.sh (3 tests) - test-precommit-performance.sh (4 tests) - test-output-formats.sh (8 tests) - test-drift-detection.sh (6 tests) - test-exit-codes.sh (12 tests) + 3 more scripts ## Other Changes - Updated roadmap to mark Phase 8-9 complete - Added .gitignore entries for build artifacts - Updated pre-commit: 800 line limit, exclude tests/data/cmd Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.7 KiB
1.7 KiB
aphoria-config-access
AUDIT (2026-02-06)
Pattern: Config cloning vs references, no getter methods Found: 5 problematic instances across 4 files
Problematic Cloning Instances
-
handlers/scan.rs:33-40 - Clones entire config just to modify thresholds for strict mode
- Should use
with_strict_thresholds()method or Cow pattern
- Should use
-
scan/filter.rs:54 - ClaimProcessor stores
config: AphoriaConfig(owned, cloned from &)- Only uses
config.learning.max_patternsandconfig.learning.min_confidence - Should store references or just the needed values
- Only uses
-
extractors/high_entropy/mod.rs:43 - Stores
config: EntropyConfig(cloned)- Uses thresholds for entropy checks
- EntropyConfig is small, clone is acceptable but could be reference
-
shadow/registry.rs:43 - Stores
config: ShadowConfig(cloned)- Uses config for graduation criteria checks
- ShadowConfig is small, clone is acceptable but could be reference
Deeply-Nested Access (Candidates for Helpers)
config.learning.promotion.output_dir- 12+ occurrencesconfig.learning.promotion.min_projects- 4+ occurrencesconfig.episteme.data_dir- 8+ occurrencesconfig.shadow.*- 10+ occurrences
Recommended Approach
- Add builder method on
AphoriaConfig::with_strict_thresholds()to avoid clone-and-modify - For structs that store config, prefer storing
&'a AphoriaConfigwith lifetime - Add convenience getters for deeply-nested common paths:
config.output_dir()->&Path(promotion output dir)config.gaps_path()->PathBuf(episteme/gaps.json)config.data_dir()->&Path(episteme data dir)
FIX
- handlers/scan.rs:33-40 - Add with_strict_thresholds() method <- CURRENT