Roadmap¶
Done¶
- PQL front-end — Lexer, parser and typed AST for the PuppetDB entities (
nodes,resources,facts,inventory,catalogs,reports,events,edges,fact_contents,fact_paths,factsets,environments,packages,package_inventory), the comparison / regexp (~!~~>) / boolean operators,inmembership, null tests, projection with aggregate/transform functions (count,avg,sum,min,max,to_string),group by, the legacyselect_*subquery spelling, andorder/limit/offset. - AST-query compiler & parser — Compile PQL to PuppetDB's canonical
["from", entity, ["and", …]]JSON wire form viaMarshalAST;ParseASTreads that JSON back into aQuery(byte-exact round-trip). - In-memory evaluator —
NewStorewith recursive subquery evaluation,group by+count/avg/sum/min/maxaggregation,~>array matching, ordering, paging and projection — no server required, fully testable. - HTTP client —
NewClientPOSTs PQL or a compiled AST to a live/pdb/query/v4, with token auth, behind an injectablehttp.RoundTripperseam. - HTTP server & command ingestion —
NewServerserves/pdb/query/v4(PQL + AST + per-entity paths) and ingests commands at/pdb/cmd/v1;Store.Ingesthandles replace facts (v5), replace catalog (v9) and store report (v8), expanding each into the derived query entities. - Embedded storage — pure-Go JSON-file backend (
Open/Save/Snapshot/Load), no external database.
Residuals (named, not silently capped)¶
to_string(field, fmt)and implicit subqueries parse and compile (the client sends them to a real PuppetDB) but return a clear error in the in-memory evaluator.- Older command wire-format versions; PuppetDB-identical catalog/report content hashes (the store uses deterministic SHA-1 hashes); the
latest_report_*node rollups; and the query API's pagination/count HTTP headers.
Quality is a standing gate: 100% coverage including error branches, gofmt + go vet clean, CI green across the six 64-bit Go targets (amd64, arm64, riscv64, loong64, ppc64le, s390x).