Major additions: - Community Next.js app (port 18187) for browsing claims with API docs - stemedb-chaos crate: Fault injection, chaos testing, CRDT properties - Latent ingestion system: Reddit/FDA ingesters with ADK-Go agents - Disputed claims handling: Manual review workflows and validation - Aphoria security scanner: New extractors (SQL injection, command injection, weak crypto, TLS version), policy-based ignores, UAT reports - Docker infrastructure: Dockerfile, docker-compose.yml for full stack - VulnBank demo: Intentionally vulnerable multi-language test corpus SDK & API enhancements: - Source registry handlers for tracking data provenance - Metrics endpoint - Skeptic filtering improvements Code quality: - Split 14 large files (>500 lines) into focused modules - All files now under 500-line limit per project guidelines Documentation: - Chaos testing guide, circuit breakers, observability docs - Phase 7 UAT documentation updates - Martin Kleppmann technical writer agent Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
23 lines
715 B
Rust
23 lines
715 B
Rust
//! Core key builder functions.
|
|
|
|
use super::SEPARATOR;
|
|
|
|
/// Build a subject-prefixed key: `{subject}\x00{tag}{suffix}`.
|
|
pub(super) fn subject_key(subject: &str, tag: &[u8], suffix: &[u8]) -> Vec<u8> {
|
|
let mut key = Vec::with_capacity(subject.len() + 1 + tag.len() + suffix.len());
|
|
key.extend_from_slice(subject.as_bytes());
|
|
key.push(SEPARATOR);
|
|
key.extend_from_slice(tag);
|
|
key.extend_from_slice(suffix);
|
|
key
|
|
}
|
|
|
|
/// Build a global key: `\x00{tag}{suffix}`.
|
|
pub(super) fn global_key(tag: &[u8], suffix: &[u8]) -> Vec<u8> {
|
|
let mut key = Vec::with_capacity(1 + tag.len() + suffix.len());
|
|
key.push(SEPARATOR);
|
|
key.extend_from_slice(tag);
|
|
key.extend_from_slice(suffix);
|
|
key
|
|
}
|