Skip to content

Pin envelope byte-equality: prove_query on single-path axis queries vs the direct indexed-axis provers #835

Description

@QuantumExplorer

Companion to the PathQueryRun skipped-field issue, for the same goal: platform routing all ranked / having-range queries through the unified PathQuery surface and retiring the direct indexed_* call sites.

What

A golden test (or family of tests) asserting that for the same state and arguments:

  • prove_query(PathQuery::new_axis_top_k(path, axis, k, offset, descending)) emits byte-identical proof bytes to prove_indexed_axis_top_k_paginated(path, axis, k, offset, descending, ...), and
  • prove_query(PathQuery::new_axis_bounded(path, axis, lo, hi, limit, descending)) emits byte-identical bytes to the direct prove_indexed_{count,sum,avg}_query(...) for the equivalent bounds,

across all three axes, empty and populated secondaries, offset 0 / mid / past-the-end, and both directions — plus the cross-check that verify_path_query and the direct verify_indexed_axis_* entry points accept each other's bytes.

Why

The unified dispatch was built over the same indexed-axis proof family, so equality is expected — but platform's switch from the direct provers/verifiers to prove_query/verify_path_query should be a pure refactor, proven by a pinned test rather than assumed. If the bytes genuinely differ somewhere, that is not a blocker (the surface is unreleased and platform owns both prover and verifier, so both sides can switch together) — but the difference should be a documented, deliberate fact rather than a surprise in a platform CI run.

Acceptance

  • Byte-equality goldens in place for the top-k-paginated and bounded shapes, or — where equality does not hold — a documented enumeration of the divergence and mutual-acceptance tests between the two verifier entry points.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions