Uh oh!
There was an error while loading. Please reload this page.
T9: bounded_query_refusal end-to-end memory-invariant acceptance smoke - #551
Merged
philcunliffe merged 1 commit intoJul 31, 2026
Conversation
…T9, LLP 0059) Adds the end-to-end gate that proves LLP 0054's #memory-invariant holds across every mechanism the bounded-query-execution change set landed: signal threading (T1), scanColumn streaming (T2-T5), and the execution budget with typed refusal (T6-T8). Unlike the tiny synthetic ceilings the unit/kernel-integration tests use (query-sql-budget.test.js, query-column-scan-aggregates.test.js), this smoke drives the REAL, unconfigured host-default execution budget (DEFAULT_EXECUTION_BUDGET, T7) over a fixture shaped and sized like the actual ~495k-row ai_gateway_messages crasher from hyparam/hypaware-server#9, composed through the real production stack (withSchemaColumns(unionSources(...))), the same way T5's own test proves the streaming path but now asserting the acceptance-level contract: - ORDER BY over the full dataset refuses with a typed QueryBudgetExceededError (operator ORDER BY) instead of buffering every row and OOM-crashing the process. - COUNT(DISTINCT content_text) (high-cardinality) also refuses (operator COUNT(DISTINCT)) even on the streaming column-scan fast path, since its dedup set is charged per distinct value. - COUNT(DISTINCT session_id) (low-cardinality) completes over the full scan with the exact cardinality and bounded heap growth, proving O(cardinality) memory, not O(rows). Each refusal's `observed` high-water mark is asserted to trip right at the ceiling, not anywhere near the full row count - the deterministic, GC-independent proof of boundedness - backed by a coarse process.memoryUsage() heap-growth check as a secondary signal. The assert_telemetry step reads the T8 budget/refusal log/trace records directly (error_kind: budget_exceeded, operator, limit, observed) so the internal path is proved, not just the process's return/throw behavior. Registered in the README V1 smoke battery (the flow index). Task-Id: T9
philcunliffe
merged commit Jul 31, 2026
3ed959d
into
integration/bounded-query-execution
0 of 6 checks passed
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements task T9 of bounded-query-execution: the end-to-end memory-invariant gate (
@ref LLP 0054#memory-invariant).Adds
hypaware-core/smoke/flows/bounded_query_refusal.js, abounded_query_refusalacceptance smoke (registered in the README V1 smoke battery). Drives the two known issue-#9 crashers (ORDER BYover the full ~495k-rowai_gateway_messagesdataset;COUNT(DISTINCT content_text)) against the real, unconfigured host-default execution budget and asserts a clean typedQueryBudgetExceededErrorrefusal with a bounded high-water mark instead of an OOM crash, plus a now-streamingCOUNT(DISTINCT session_id)that completes over the full scan with bounded heap growth. Asserts the internal path via the T8 budget/refusal telemetry (error_kind: 'budget_exceeded', operator, limit, observed), not only the process's return/throw behavior.Test plan
npm test- 1697 passed, 1 skipped, 0 failednpm run lint- cleannpm run typecheck- cleannpm run smoke -- bounded_query_refusal- oknpm run smoke -- core_boot_noop/s3_query_roundtrip- ok (no regression)Task-Id: T9