Skip to content

Prove chunked result assembly end to end through Genie #54

Description

@ivanvyd

Chunked result assembly (ADR 0004)
is verified in both halves, but never as one flow.

What is already proven, live

  • A Genie-executed statement's chunks are readable with the caller's own identity — HTTP 200 on
    both /api/2.0/sql/statements/{id} and .../result/chunks/0. This was the unknown ADR 0004
    shipped with.
  • The wire contract behaves as the client assumes: on a deliberately chunked statement,
    total_chunk_count: 2, manifest.truncated: false, a workspace-relative
    next_chunk_internal_link, and following it returned the remainder with the row counts summing
    exactly to total_row_count.

What is not proven

Genie itself emitting a multi-chunk result. The Agent used for verification has a six-row
table, and Genie bounds its own SQL, so the composition of those two halves has never run.

Why it is not just "make a big table"

The demo Agent's table is also the fixture for the 9 live integration tests, which assert its exact
regions and totals. Enlarging it breaks them. Closing this needs a separate large table added
to a Genie Agent, which is a Genie Workbench configuration change.

What closing this looks like

  1. Create a table with enough rows that a full read exceeds one chunk — roughly 40,000+ rows, since
    a chunk observed live held about 41,000.
  2. Add it to a Genie Agent.
  3. Ask for all of it, and check truncated is false with the full row count:
    lakespeak ask --agent <agent> --format json "show every row of <table>"
  4. Record the outcome in docs/compatibility.md.

A negative result is a real result. If Genie always bounds its own SQL and never emits more
than one chunk, that is worth recording — it would mean this code path is unreachable in practice,
which changes how much it deserves to exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions