Repository navigation
Description
Umbrella — PromQL parser-fork gaps (tracking)
233 of the ~322 PromQL corpus rejections (72%) are L1 parse failures in the private promql-parser fork (ProjectASAP/promql-parser, branch asap), before the lowerer ever runs. This repo consumes the parser via a git pin; the fixes land in the fork, and the only change here is bumping that pin once each lands.
Correction (2026-07-10): none of these are "mirror upstream"
An earlier read of this issue assumed some gaps (smoothed/anchored/start/end) were just a rebase onto GreptimeTeam upstream away. That was checked against the actual grammar and it does not hold — GreptimeTeam upstream lags Prometheus (Go) on every one of these:
smoothed/anchoredare stub tokens even upstream —src/parser/promql.y:124marks them%expect-unused(declared, no production consumes them) on both the fork and GreptimeTeammain.- trim operators, duration expressions, and callable
start()/end()have no token / AST anywhere upstream.
The fork's asap commit (c51beaf) added the experimental functions (info, histogram_quantiles, min_of/max_of/step/range, the *_over_time reducers) but explicitly deferred the grammar/lexer features. So all five gaps are net-new parser work on the asap branch; there is nothing to mirror.
Split (all in ProjectASAP/promql-parser)
| gap | corpus | kind | issue |
|---|---|---|---|
smoothed / anchored |
61 | grammar production for existing stub tokens (lexer done) | ProjectASAP/promql-parser#1 |
trim </ >/ |
110 | from-scratch operator port (lexer + grammar + AST) | ProjectASAP/promql-parser#2 |
| duration-arithmetic exprs | 51 | DurationExpr AST + lexer + grammar |
ProjectASAP/promql-parser#3 |
start() / end() callable |
6 | reserved-keyword lexer/grammar work | ProjectASAP/promql-parser#4 |
info() 2nd-arg matcher |
5 | validation bug fix | ProjectASAP/promql-parser#5 |
Ordered easiest-first: #5 (bug fix) → #1 (token exists) → #4 → #3 → #2 (biggest).
The remaining ~89 non-parser rejections are lowering gaps (tracked elsewhere) and deliberate rejections (out-of-range φ, __name__ regex per #67).
Activity
[-]PromQL: five parser-fork gaps account for 60% of corpus rejections (trim ops, smoothed/anchored, duration exprs, start()/end(), info() matcher)[/-][+]PromQL parser-fork gaps (umbrella) — 72% of corpus rejections, all in promql-parser[/+]zzylol commentedon Aug 26, 2026
Related open work