sql schema inspection
traverses clickhouse ddl and catalog queries to enforce database predicate hygiene and prevent shard replica duplication.
analyzers
five concurrent language analyzers inspecting clickhouse sql, python pipelines, and rust proxy buffers to detect contract drift and generate in-place degradation diffs.
clickhouse syntax trees & catalog reflection.
etl pipeline bounds & dict unpacking loops.
fixed buffer capacity & slice conversions.
repeated field bounds & schema checker.
criterion benchmark & proptest runner.
[00:00.012] stokes-sql: schema reflection query matches 280 columns (80 shard replicas in events_r0/r1)
[00:00.018] stokes-python: detected unbounded shadow column admission in extractor.py (priority = 0)
[00:00.024] stokes-rust: alert: cardinality risk ratio = 1.40 (280 features > [Feature; 200] stack capacity)
[00:00.027] coordinator: generating defensive bounds & database qualification patch for stokes-rust
[00:00.041] stokes-verify: patch validated: 10,000 proptest cases passed in 1.42s with 0 bytes heap allocation
analysis architecture
monolingual linters fail on multi-tier architectures because each compiler only inspects its local syntax. stokes isolates each language toolchain into a dedicated analysis worker with specialized ast patterns, coordinating findings concurrently across an in-memory event bus.
each worker inspects code within its language boundaries (clickhouse sql, python ast, rust fixed buffers, protobuf repeated bounds) to prevent mixed-grammar syntax errors.
workers stream typed diagnostics into an in-memory asyncio queue with cooperative backpressure and a 16.6ms render tick coalescer (60 fps) to avoid blocking cli output.
when contract drift is flagged, stokes generates parameterized unified diffs (such as database qualification for clickhouse or in-place quickselect for rust edge proxies) with zero heap allocations.
stokes requires all active language analyzers to pass invariant checks before updating the machine-verifiable stokes.lock and human-readable conformance.md.
// length-prefixed event frame payload
{
"event_id": "c7a8e291-f0b4-4e2a-92b1-8d2e82110c4a",
"timestamp_ns": 1727282400012000000,
"analyzer_id": "stokes-rust",
"phase": "invariant_evaluation",
"target_file": "crates/dirichlet-proxy/src/engine/feature_ingest.rs",
"line_offset": 98,
"ast_node_type": "call_expression",
"ast_symbol_name": "try_into().unwrap()",
"status_message": "fatal tryfromsliceerror: 280 elements exceed [feature; 200]",
"severity": "contract_violation",
"remediation_patch": {
"action": "defensive_bounds_guard",
"heap_allocation_limit_bytes": 0,
"error_type": "Result<[Feature; 200], PayloadError>"
}
}traverses clickhouse ddl and catalog queries to enforce database predicate hygiene and prevent shard replica duplication.
audits fixed stack buffers and slice conversions in rust proxy crates, applying in-place partitioning with zero heap allocations.
executes 10,000 ieee-754 property fuzzing iterations with randomized float inputs and validates criterion micro-benchmarks in isolated test harnesses.
faq
details on domain isolation, in-memory event queues, and external agent integrations.
install stokes to run autonomous cross-compiler verification across ClickHouse, Python, and Rust in your pre-commit hooks and ci pipelines.