stemedb/.agentive-remediation/raw-allocserializer-usage/history.md
jordan 1ce4004807 feat: Complete Phase 2 (The Cortex) - query, lens, and API layers
This commit adds the read path (Cortex) to complement the write path (Spine):

## Crates
- stemedb-api: HTTP API with axum + utoipa OpenAPI
  - /v1/assert, /v1/query, /v1/epoch, /v1/skeptic, /v1/trace, /v1/audit
  - Metered endpoints with quota enforcement
  - Ed25519 signature verification
- stemedb-lens: Truth resolution lenses
  - RecencyLens, ConsensusLens, ConfidenceLens
  - VoteAwareConsensusLens (Ballot Box pattern)
  - TrustAwareAuthorityLens (The Hive pattern)
  - SkepticLens (conflict analysis)
  - EpochAwareLens (paradigm-safe queries)
- stemedb-query: Query engine with materialized views

## Storage Extensions
- VoteStore: Vote aggregation with cached counts
- TrustRankStore: Agent reputation with decay
- AuditStore: Query audit trail
- IndexStore: SP/P/S index structures
- SupersessionStore: Epoch supersession chains

## SDKs
- sdk/go/steme: Go HTTP client with Ed25519 signing
- sdk/go/adk: ADK-Go tools for AI agents

## Documentation
- Updated CLAUDE.md, architecture.md, roadmap.md
- New ai-lookup entries for all services
- Use case docs for consumer health intelligence
- Arena roadmap for simulation advancement

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:22:44 -07:00

37 lines
1.2 KiB
Markdown

# raw-allocserializer-usage
## AUDIT (2026-02-01)
Pattern: Raw `AllocSerializer` usage outside canonical `stemedb_core::serde` module
### Search Results
| Location | Lines | Context | Violation? |
|----------|-------|---------|------------|
| `stemedb-core/src/lib.rs` | 26, 58, 105, 140, 170, 211, 239 | `#[cfg(test)]` module | NO |
| `stemedb-core/src/serde.rs` | 5, 39, 65, 100, 102 | Canonical implementation | NO |
| `stemedb-query/src/engine.rs` | 247, 269 | `#[cfg(test)]` module | NO |
| `stemedb-storage/src/serde_helpers.rs` | 30 | Type bound, delegates to core | NO |
### Conclusion
**Found: 0 production code violations**
All `AllocSerializer` usages are either:
1. Inside the canonical `stemedb_core::serde` module (correct)
2. Inside `#[cfg(test)]` blocks (allowed)
3. Type bounds that delegate to the canonical module (correct)
## RESOLUTION (2026-02-01)
Status: **No Action Required**
The codebase is already compliant.
## ENFORCEMENT (Already Exists)
CLAUDE.md line 39:
> **Zero-Copy:** Use `rkyv` for serialization. ALWAYS use `stemedb_core::serde::{serialize, deserialize}` — NEVER use raw `AllocSerializer` in production code.
No additional enforcement needed.