Skip to content
Code Recycle

Component · for humans & their agents

Unbounded Result Guard

verified · first-partyactively maintained$0 during beta (was $59)

A query returned fifty rows in development and five million in production. Nothing about it changed — the table grew, and nothing ever bounded what it could hand back.

by ringbuffer · Code Recycle admin

Get it free — beta

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 61 tests

A query returned FIFTY ROWS IN DEVELOPMENT. Nothing about it changed. In production it returns FIVE MILLION, because the table grew and nothing in the query ever bounded how many rows it could hand back.

A query returned FIFTY ROWS IN DEVELOPMENT. Nothing about it changed. In production it returns FIVE MILLION, because the table grew and nothing in the query ever bounded how many rows it could hand back.

THE SYMPTOM. The process runs out of memory. Or a request that used to take 40ms now takes 40 seconds. You go look at the query in the logs and it looks completely ordinary -- maybe there is even a LIMIT right there in the text. Nothing errored. Nothing warned. The query has been silently doing this since the day the table crossed some size nobody picked on purpose.

A LIMIT IN THE TEXT IS NOT A BOUND. A LIMIT applied after a join can still require the whole join to be materialised first. A LIMIT inside a subquery bounds the subquery, not the result. A LIMIT with no ORDER BY bounds the count and not the content, which is a different bug that shows up as flaky pagination. And a query bounded only by a WHERE clause on a column that grows is bounded by nothing at all.

This decides which of those a given query is, and says which fact makes it so. It REFUSES rather than guessing when the shape cannot be determined from what it was given -- because 'it has a LIMIT, it is fine' is exactly the reasoning that ships this to production.

VERIFIED: 61 tests, measured by running the suite.

DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.

Interface

What you call, and what comes back. Types and signatures only — the implementation ships with the source.

  export function createState(): AnalyzeState;
  export function analyzeFromSource(source: FromSource, ctx: Ctx, path: string, state: AnalyzeState): SourceBound;
  export function analyzeQuery(node: QueryNode, ctx: Ctx, path: string, state: AnalyzeState): SourceBound;
  export function createRootContext(): Ctx;
  export function analyzeBoundedness(query: QueryNode): BoundednessReport;
  export function withinAcceptableCap(report: BoundednessReport, acceptableCap: number): CapCheck;
  export function worseVerdict(a: BoundedVerdict, b: BoundedVerdict): BoundedVerdict;
  export function combineVerdicts(verdicts: readonly BoundedVerdict[]): BoundedVerdict;
  export function isNonNegativeInteger(n: number): boolean;
  export type BoundedVerdict = "bounded" | "unbounded" | "not-determinable";
  export type JoinType = "inner" | "left" | "right" | "full" | "cross";
  export type JoinFanout = "one-to-one" | { maxPerRow: number } | "unbounded" | "unknown";
  export type FromSource = | { kind: "table";
  export type SetOperationKind = "union" | "unionAll" | "intersect" | "except";
  export type QueryNode = SelectNode | SetOperationNode;

01Capabilities

Does

  • + Payload truncation safety
  • + Reliability
  • + Query planning and index eligibility

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 28 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableAug 6, 2026First public release.