Skip to content

PG compatibility: baseline policy and deterministic CI cases (Task 6) #51

Description

@renecannao

Context

This issue tracks Task 6 from docs/superpowers/plans/2026-06-11-postgresql-libpg-query-compatibility.md and follows #48.

Goal

Implement baseline transition evaluation and deterministic pull-request case generation for the PostgreSQL compatibility harness.

Implemented

  • Added scripts/pg_compat/baseline.py.
  • Added tests/pg_compat/test_baseline.py.
  • Added transition_allowed(previous, current) with the complete six-result policy.
  • Added evaluate_baseline(previous_rows, current_rows) with deterministic allowed, regressions, review_required, new_cases, and missing_ids output.
  • Added build_ci_cases(inventory_rows, release_delta_rows, witness_rows).
  • Added atomic, sorted JSONL publication through write_ci_cases(path, cases).
  • Added duplicate-ID, conflicting-case, invalid-result, missing-SQL, input-order, and input-mutation validation coverage.

Transition policy

Allowed transitions:

  • unchanged result
  • any result to DEEP_SUPPORTED
  • PARTIAL, ERROR, TRAILING_INPUT, or TYPE_MISMATCH to CLASSIFIED_ONLY

Disallowed support-level drops are reported as regressions. Other disallowed result changes are reported as review-required. Unknown current IDs require baseline refresh; missing IDs are reported separately.

CI case selection

The generated set deterministically includes:

  • every known non-DEEP_SUPPORTED result
  • every release-delta statement
  • every reviewed witness
  • one DEEP_SUPPORTED and one CLASSIFIED_ONLY example per oracle node where available

Cases are deduplicated, sorted by statement ID, retain complete SQL, and include expected_result.

Verification

Status

Implementation is complete on PR #50. The issue will close when that PR merges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions