feat: M3.8.1 phase 1 — content router + log compressor
Build and Push / Test (push) Failing after 1m46s
Build and Push / Build and push image (push) Skipped

ContentRouter uses Google Magika ML for content detection (<1ms) with regex
fallback. Detects JSON, code, logs, diffs, config, text.

LogCompressor reuses M3.7.7 patterns (markers, cascade, strip_ansi) to
shrink build logs by keeping errors/stacks and dropping noise.

17 unit tests passing:
- router: json, code, diff, log, text detection
- log: error lines, stack traces, ansi stripping, compression
- optimizer: token estimation, passthrough mode

Magika + ort ONNX runtime added to Cargo.toml.
This commit is contained in:
Story Crater Bot
2026-08-28 09:29:56 -07:00
parent 1f9b30b1ec
commit 05aec4e23b
8 changed files with 872 additions and 13 deletions
+2
View File
@@ -6,6 +6,7 @@ pub mod prompt;
pub mod gate_parser;
pub mod gated_loop;
pub mod query_executor;
pub mod optimizer;
pub use gate_parser::{GateResponse, ParseError, parse_gate_response};
@@ -19,3 +20,4 @@ pub use lesson::{
pub use query::{Query, QuerySet, SynthesisQuery};
pub use prompt::{PromptBuilder, PromptMessages};
pub use symptom_projection::{project_symptom, SymptomVector};
pub use optimizer::{ContextOptimizer, ContextOptimizerConfig, ContentType, OptimizedChunk};