Skip to content

Release 2.0.0 - #1

Merged
N-T-Raghava merged 10 commits into
mainfrom
release/2.0.0
Nov 1, 2026
Merged

N-T-Raghava merged 10 commits into
mainfrom
release/2.0.0

Conversation

@N-T-Raghava

Copy link
Copy Markdown
Owner

NatQuery 2.0.0 turns the 1.x prototype into a governed, auditable natural-language
interface for PostgreSQL. The LLM only ever proposes SQL; a deterministic enforcement
layer decides whether it runs.

Added

  • SQL enforcer (sqlglot AST based): single read-only SELECT, allow-listed tables and
    columns, blocked functions and system catalogs, forced LIMIT, statement timeout.
  • Role policy engine with YAML/JSON policies: per-role table/column access, row filters,
    column masks and abstract (inheritable) roles; natquery policy init scaffolds examples.
  • Multi-schema mode and PostgreSQL Row-Level Security integration via
    db_session_vars and SET LOCAL ROLE, so the database enforces what the policy declares.
  • Hash-chained audit log (tamper-evident, verify()), secret scrubbing in logs,
    private (0600/0700) config and workspace files written atomically.
  • Pluggable authentication (local user store with hashed passwords and strength
    checks; extra providers through the natquery.auth_providers entry-point group).
  • Schema intelligence: weighted table ranking, wider-schema retry, value hints
    (natquery schema hints) and per-column semantics merged into the prompt.
  • Benchmarks: BIRD dev evaluation harness (benchmarks/bird), 5-case security suite
    (benchmarks/security) and a 40-question ERP benchmark (erp/), with results.
  • ERP test bed: 87 tables / 549 columns / 10 roles / ~368k rows reproducible generator.
  • Documentation: docs/ARCHITECTURE.md, docs/BIRD_REPORT.md, docs/SECURITY_REPORT.md
    and the full project report in LaTeX (report/).
  • 855 tests (unit + PostgreSQL integration), >= 90 % coverage gate.

Changed

  • Project layout, README and packaging rewritten; the wheel now ships only natquery
    (benchmarks and ERP assets live in the repository, not on PyPI).
  • CI and release workflows aligned: same lint/format/test gates, tag-vs-version check,
    release notes generated from this changelog.
  • Code formatted with black 25.1.0 and linted with ruff 0.15.6 across the whole repository.

Results

  • BIRD dev (500 questions): official EX 45.6 %, tolerant scorer 50.6 %.
  • ERP 40-question benchmark: 28/40 (70 %), 0 data leaks across 5 adversarial prompts.

Notes

  • Version 2.0.0 is the first release with the governance layer; configuration written by
    1.x remains readable, but policies are new and must be created with natquery policy init.

claude and others added 9 commits November 1, 2026 16:08
…ntelligence)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4Qdto1He95B3HZyvypxgB
…overage)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4Qdto1He95B3HZyvypxgB
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4Qdto1He95B3HZyvypxgB
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4Qdto1He95B3HZyvypxgB
…ate ruff config

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4Qdto1He95B3HZyvypxgB
…d release notes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4Qdto1He95B3HZyvypxgB
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

On Windows, Path.read_text() defaults to cp1252 and fails on the
non-ASCII characters in cli/shell.py and cli/formatter.py. Read the
repository files with an explicit UTF-8 encoding so the packaging tests
are platform independent.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@N-T-Raghava
N-T-Raghava merged commit 2e296fa into main Nov 1, 2026
20 checks passed
N-T-Raghava added a commit that referenced this pull request Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants