Engineering problem
Retain endpoint scan evidence through retries and delivery failures without silently accepting contradictory facts.
Requirements & constraints
ClamAV orchestration, NDJSON transport, stable endpoint/event identity, durable ingestion, and non-destructive fixture verification.
Architecture & technologies
Rust endpoint scanner and spool; authenticated ingest service and SQLite event store. Dependency and platform behavior are scoped to local Linux verification.
Security & trust boundaries
Endpoint identities scope event IDs. Import collision validation protects evidence integrity; the portfolio never starts endpoint quarantine or exposes scan administration.
Original engineering
CharlesDerek initial history and MIT attribution; later commits include explicitly named Omniplexs Agent assistance. Third-party ClamAV is a dependency, not an independently authored antivirus engine.
Working implementation
Scanning orchestration, event transport and ingest persistence exist in source. This cycle exercises legacy migration with synthetic JSON fixtures.
Experiments & missing capabilities
Cross-platform execution, production throughput, and integrated Athernex investigation are not established by these tests.
Failure modes & concurrency
Conflicting identities within import input fail before database creation. Conflicts against persisted evidence roll back the whole transaction; semantic JSON retries remain harmless.
Testing & evidence
40 tests pass after adding the deterministic exporter: 26 library, 4 CLI, 9 ingest and 1 replay-repeatability test. Build, fmt and strict Clippy pass. Three import-integrity regressions fail against the previous implementation.
Observable improvement
Before: legacy import silently discarded conflicting facts and could retain unrelated writes. After: fail-closed collision detection, atomic rollback, and accurate replay counts. Local commit 326fd79.
Deployment model
Independent endpoint and ingest components. The portfolio presents the tested spool/HTTP/SQLite replay; no live endpoint service or privileged scanning interface is exposed.
Decisions & alternatives
Semantic JSON comparison avoids treating formatting as evidence changes. Last-write-wins would hide contradictory facts and was rejected.
Demonstration & limitations
The Endpoint delivery replay exercises actual durable append, loopback HTTP sender, validation, SQLite commit and acknowledgment compaction. A 503 and incomplete acknowledgment retain the event; replay stores exactly one row. It does not exercise the scanner, TLS, authentication, Athernex, or investigation UI.