Update README.md - #1
Open
Krishcalin wants to merge 1 commit into
Open
Conversation
Krishcalin
added a commit
that referenced
this pull request
Aug 1, 2026
LOQL is a Splunk-SPL-shaped pipeline language (search | stats | timechart | ...) that
compiles to PARAMETERIZED SQL over the month-partitioned events table — the first
backbone of the Splunk-class transformation (docs/SPLUNK_TRANSFORMATION_ROADMAP.md).
Analyst hunting, and later dashboards/RBA row-filters/federation, all hang off this
compiler.
New pure package app/loql/:
- nodes.py frozen AST contract
- parser.py lexer + recursive-descent parser — the security gate (malformed -> LoqlError)
- compiler.py pure Query -> (sql, params) CTE chain; EVERY user value/jsonb key/glob is a
bound %s param and identifiers pass _ident() — the whole injection story
- run.py DB execution boundary + guardrails (statement_timeout + row cap)
Batch-1 commands: search where eval fields rename sort head dedup stats top rare bin
timechart, with stats/timechart funcs (count/sum/avg/min/max/dc/values/list), schema-on-read
over raw jsonb, relative-time (_time > "-24h") and wildcard (host="web*") matching.
POST /api/v1/query (API-key auth) + config guardrails LOQL_DEFAULT_LIMIT / LOQL_MAX_ROWS /
LOQL_TIMEOUT_MS / LOQL_MAX_AGG_ELEMS so one heavy query can't starve ingest on the shared
Postgres.
Hardened by a read-only adversarial-verify pass (12 agents) — 6 confirmed defects (all
fail-closed, none actual injection), all fixed + regression-tested:
- top/rare on a raw field emitted 2 %s but bound 1 param (dangling placeholder) -> resolve
the field once and GROUP BY output ordinal (like timechart); top ... by g percent is now
per-group (PARTITION BY) not the grand total.
- the recursive-descent parser had no depth cap -> deep parens/NOT raised RecursionError
(HTTP 500) -> added a nesting-depth guard (LoqlError) + a RecursionError safety net.
- list()/values() array_agg was unbounded (LIMIT counts rows, not cell size) -> [1:cap]
slice via LOQL_MAX_AGG_ELEMS.
- POST /query with a non-string 'query' raised AttributeError (500) -> a type guard returns
a clean 400.
Tests: test_loql.py 38 unit (parser/compiler snapshots + the injection invariant + the 4
verify regressions) + integration; test_integration_api.py /api/v1/query. Unit suite
284 -> 322. Docs: docs/LOQL.md reference + README section + CLAUDE + .env.
Co-Authored-By: Claude Fable 5.0 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.