stemedb/crates/stemedb-api/src/handlers/source_registry/mod.rs
jordan 157dbbb9eb feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing)
## 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>
2026-02-06 22:50:55 -07:00

41 lines
1.4 KiB
Rust

//! Handlers for Source Registry operations.
//!
//! These endpoints allow developers to register sources with human-readable
//! labels and retrieve source metadata by hash.
//!
//! # Flow
//!
//! 1. Agent stores source document via POST /v1/source (gets hash back)
//! 2. Agent registers source metadata via POST /v1/sources (label, tier, url)
//! 3. Later: Query includes source_hash with enriched metadata
//!
//! # Endpoints
//!
//! - POST /v1/sources - Register a new source
//! - GET /v1/sources/{hash} - Get source by hash
//! - PATCH /v1/sources/{hash}/status - Update source status
//! - GET /v1/sources - List/search sources
//! - GET /v1/sources/{hash}/impact - Get impact analysis
//! - POST /v1/sources/{hash}/quarantine - Quarantine source
//! - POST /v1/sources/{hash}/restore - Restore source
//! - GET /v1/sources/{hash}/impact/export - Export impact for audit
mod handlers;
mod validation;
#[cfg(test)]
mod tests;
// Re-export public handlers
pub use handlers::{
export_source_impact, get_source, get_source_impact, list_sources, quarantine_source,
register_source, restore_source, update_source_status,
};
// Re-export OpenAPI path items (generated by utoipa)
pub use handlers::{
__path_export_source_impact, __path_get_source, __path_get_source_impact, __path_list_sources,
__path_quarantine_source, __path_register_source, __path_restore_source,
__path_update_source_status,
};