Merge branch 'worktree-agent-a63474e92b05425a5'

# Conflicts:
#	Cargo.lock
#	Cargo.toml
This commit is contained in:
Hugh Kaznowski
2026-09-05 12:46:45 +01:00
28 changed files with 958 additions and 3 deletions
+36
View File
@@ -0,0 +1,36 @@
# 007 — FilterBar query integration
## Summary
Wire the parsed filter AST into actual log/timeline queries against the engine, so
FilterBar's syntax (not just a naive substring match) drives what's shown in
LogPreview and LogTimeline.
## Scope
- Evaluator that walks the AST from [005](005-filterbar-pest-parser.md), resolving
`regex(...)` against log text and `metric_name[param] <op> value` against bucket
data ([004](004-metrics-api.md)), using datetime literals resolved via
[006](006-filterbar-datetime-parsing.md).
- New/extended `EngineQuery::Logs` (and `Timeline`) filter parameter that accepts the
compiled filter, evaluated inside the engine's single-owner loop (per the README's
"engine is sole owner of the btreemap" architecture — don't evaluate against a
copy).
- `sequence`/`timestamp` reserved-metric comparisons map directly to the
`IngestedLog` key fields rather than a declared metric lookup.
- API layer: accept the raw filter string, parse it (return 4xx on parse error),
compile to whatever the engine query needs, send to engine.
## Acceptance criteria
- `GET /api/logs?filter=...` and the timeline equivalent apply the full filter
language, not just substring matching.
- A filter combining a regex clause and a metric comparison with `and`/`or` returns
correct results against a seeded log+metric fixture.
- Malformed filter strings return a 4xx with the parser's error message.
## Depends on
- [004 — Metrics API](004-metrics-api.md)
- [005 — FilterBar pest parser](005-filterbar-pest-parser.md)
- [006 — FilterBar datetime parsing](006-filterbar-datetime-parsing.md)