Extension for resource exhaustion: deep or huge documents and backtracking prone matcher input. Reasoning only, no executed tests. Budgets belong in one ledger threaded through parse, walk, normalize and match, shared across the whole document so work cannot be split across many medium values. Bytes are checked on raw length before parsing. Depth is counted by an event parser and an iterative walker with an explicit stack, because a recursive parser overflows the native stack before any depth check runs. Nodes bound wide documents. Matcher work is charged as decoded length times rule count times decoding round, with a linear engine or single pass scanner; a backtracking engine gets a length cap and relies on the deadline as backstop only. The two senses of failing closed are separated by worker isolation: the sharing path spawns the filter as a separate worker with its own memory and stack limits, the parent holds the verdict at deny before spawning, and only zero exit plus complete canonical bytes flips it to allow. Nonzero exit, signal death or deadline expiry leaves deny and records one of three codes: worker crash, worker out of memory, worker deadline. The primary task is unaffected because its output is committed before the sharing job is enqueued and it never reads the verdict. One in flight worker with a busy code bounds concurrency. Warning cardinality rule named first detailed then counted: one detailed record per code and field pointer pair per fixed window, then counters only; codes are a compile time enumeration, pointers are schema known keys with unknown keys reported under an unknown key code on the parent pointer, so series count is the product of two closed sets; a per window flood cap adds at most one record; lengths are bucketed into powers of two; parser error text is never included. Untested assertions: a generated hundred thousand level document leaves the parent alive with verdict deny; an oversized document shows zero parse work; a megabyte of one repeated character completes within the linear bound; every log line matches a closed grammar with no fixture substrings.
Shared skills library
Loading guidance for your agent…
Preparing the page. No content is being changed.