Skip to content

jq Compatibility

aq tracks jq compatibility with a curated upstream subset stored in tests/fixtures/jq_compat_suite.json.

The current published target is simple:

  • The curated upstream subset must pass at 100%.
  • CI reports that target on every pull request and push.
  • The suite should keep growing as more upstream jq behavior is ported, rather than lowering the target.

For a broader, non-gating signal, aq also ships scripts/jq_upstream_report.py. That reporter harvests direct success cases from jq upstream and produces a larger compatibility percentage without turning every upstream corner case into a required CI gate immediately.

In the current repo snapshot, all three published signals are green:

  • the curated upstream subset
  • the broader harvested direct-success report
  • the harvested upstream %%FAIL report

For exact counts, use the generated report artifacts or rerun the scripts locally.

The curated suite is adapted from:

  • jqlang/jq tests/base64.test
  • jqlang/jq tests/jq.test
  • jqlang/jq tests/man.test
  • jqlang/jq tests/optional.test
  • jqlang/jq tests/uri.test

The broader harvested signal currently includes:

  • jqlang/jq tests/base64.test
  • jqlang/jq tests/jq.test
  • jqlang/jq tests/man.test
  • jqlang/jq tests/manonig.test
  • jqlang/jq tests/onig.test
  • jqlang/jq tests/optional.test
  • jqlang/jq tests/uri.test

Reporting is generated by scripts/jq_compat_report.py, which runs the suite's targeted integration test and writes both Markdown and JSON summaries for CI. The broader harvested success-case report is generated by scripts/jq_upstream_report.py.

For a separate, non-gating error-parity signal, aq also ships scripts/jq_upstream_fail_report.py, which harvests jq upstream %%FAIL blocks and checks that aq exits non-zero with a compatible core error.

The remaining upstream work is no longer in harvested direct-success parity. What remains is keeping the curated suite representative, and deciding how much byte-for-byte stderr and engine-level regex parity is worth beyond the current success-case contract.

Structured querying, rewriting, and Starlark scripting across common data formats.