Skip to content

Surface bound parameters, and make expired-result recovery real - #22

Merged
ivanvyd merged 1 commit into
mainfrom
feat/surface-parameters-and-recovery
Aug 1, 2026
Merged

Surface bound parameters, and make expired-result recovery real#22
ivanvyd merged 1 commit into
mainfrom
feat/surface-parameters-and-recovery

Conversation

@ivanvyd

@ivanvyd ivanvyd commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Two findings from the review panel, both cases of code that existed but never reached a user.

GenieQuery.Parameters was captured and dropped. Read off the wire in Normalize, then never rendered — so every output mode showed SQL with placeholders and never the values it actually ran with, which is half the point of showing the SQL. --format json now reports them under query.parameters, omitted rather than emitted as an empty array when there were none. Terminal and Markdown still omit them and docs/limitations.md now says so.

ReExecuteQueryAsync documented itself as the QUERY_RESULT_EXPIRED recovery and nothing called it — the flow did not exist end to end. export last now uses it when the cached result has aged out. That spends warehouse time, which is right there because the user explicitly asked for the rows; ask still refuses to re-run on their behalf.

149 tests.

…recovery real

GenieQuery.Parameters was read off the wire and then dropped before any renderer saw
it, so every output mode showed a statement with placeholders and never what it
actually ran with — half the value of showing the SQL. JSON now reports them under
query.parameters, omitted entirely rather than emitted as an empty array when there
were none, since absent is the honest encoding of "not applicable". The terminal and
Markdown renderers still omit them, and limitations.md now says so instead of
leaving a reader to notice.

ReExecuteQueryAsync documented itself as the recovery for QUERY_RESULT_EXPIRED, and
nothing called it — the recovery flow did not exist end to end. `export last` now
uses it when the cached result has aged out. That costs warehouse time, which is
the right trade there specifically: the user asked to export the rows. `ask` still
does not re-run on their behalf, because nobody asked it to spend money.

149 tests.
@ivanvyd
ivanvyd merged commit 569ecb8 into main Aug 1, 2026
10 checks passed
@ivanvyd
ivanvyd deleted the feat/surface-parameters-and-recovery branch August 1, 2026 08:53
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.

1 participant