## 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>
2.8 KiB
timestamp-unification
AUDIT (2026-02-06)
Pattern: Multiple implementations of current_timestamp() and inline SystemTime::now() / Utc::now().timestamp() calls.
Found: 11 instances in 6 files (production code)
- 2 duplicate function definitions
- 4 inline implementations
- 5 test-only usages (acceptable)
Decision
- Keep
episteme/corpus.rs:current_timestamp()as canonical, make itpub - Export from
lib.rsfor easy access - Remove duplicate in
research/gap_store.rs - Replace inline implementations with function call
- Keep
scan/scanner.rsmillis variant separate (different unit) - Keep test code as-is (test isolation is acceptable)
FIX LOG
- episteme/corpus.rs:15 - Made
current_timestamp()public, added comprehensive docstring, addedcurrent_timestamp_millis()variant - episteme/mod.rs - Re-exported
current_timestampandcurrent_timestamp_millis - lib.rs - Added
pub use episteme::{current_timestamp, current_timestamp_millis} - research/gap_store.rs:297 - Removed duplicate
fn current_timestamp(), now imports fromcrate::current_timestamp - corpus_build.rs:63 - Replaced inline
SystemTime::now()withcurrent_timestamp() - policy.rs:128 - Replaced inline
SystemTime::now()withcurrent_timestamp() - policy.rs:236 - Replaced inline
SystemTime::now()withcurrent_timestamp() - expiry.rs:102 - Replaced
Utc::now().timestamp()withcurrent_timestamp() - scan/scanner.rs:267 - Replaced inline millis with
current_timestamp_millis()
VERIFY (2026-02-06)
cargo test -p aphoria # 782 passed
cargo clippy -p aphoria -- -D warnings # No warnings
Remaining instances (all acceptable):
episteme/corpus.rs:21,28- CANONICAL IMPLEMENTATIONexpiry.rs:132,153,212,219- Test code in#[cfg(test)]moduletests/ack_expiry.rs- Test file
ENFORCE (2026-02-06)
Updated .claude/skills/aphoria-dev/skill.md:
-
Added "Do Not #11": "Write inline timestamp code. Use
crate::current_timestamp()orcrate::current_timestamp_millis()" -
Added to Constraints/NEVER: "Write inline timestamp code (use
current_timestamp()from crate root)" -
Added to Constraints/ALWAYS:
- "Use
crate::current_timestamp()for Unix timestamps in seconds" - "Use
crate::current_timestamp_millis()for millisecond precision"
- "Use
DOCUMENT (2026-02-06)
Canonical implementation documented in episteme/corpus.rs:15-28:
current_timestamp()- Unix timestamp in secondscurrent_timestamp_millis()- Unix timestamp in milliseconds
Both functions exported via crate:: for easy import.
COMPLETE
Before: 6 production instances of inline/duplicate timestamp code After: 0 (all use canonical functions)
Enforcement: aphoria-dev skill updated with "Do Not" rule Documentation: Canonical functions documented with usage examples