* test(mcp): check schema parity against the served tools/list
Schema parity tests registered contracts on a bare SDK server, so they
checked a schema REA never serves and missed the compact presentation's
losses (#15310, #15311).
- Add servedToolCatalog, which lists every tools/list page from a session
server, and use it for parity checks in toolSchemaValidity and
advertisedDialect.
- Add a catalog-wide test that derives one violating value per
constrained canonical field from each contract example and requires
the served schema to reject it or the served description to name the
rule. Today's gaps are listed by root cause; an entry that stops
matching fails the test.
- Remove absoluteLocalPathTools.test.ts; the catalog test covers every
absolute-path field it checked.
Refs #15328
* test(mcp): add a seeded property and visited fields to served parity
- Generate string values for every constrained string field with a fixed
fast-check seed; the refinement gaps it found (rules in .refine() with
no served keyword or guidance) are listed with a violating value each.
- Assert the sweep derives violations for root, nested and array
absolute-path fields.
- Check canonical schema validity against the contract schemas directly
instead of a bare SDK server, and drop the served-listing test that
validated canonicalInputSchema.
- Move the reserved environment key check into the compact handler test,
which now requires the served description to name the rule.
- testing.md: assert parity against the served tools/list.
Refs #15328
* fix(mcp): advertise the absolute-path pattern and dialect-dropped rules
absoluteLocalPathStringSchema serialized as two allOf patterns, and the
dialect projection kept only the first (NUL-free), so every absolute-path
field advertised a schema that accepts relative paths.
- absoluteLocalPathStringSchema emits one pattern: the absolute envelope
over a NUL-free path. NUL is still refused first with its own message.
- mergeAllOf conjoins exactly what it can: bounds keep the tighter value
and negated-class patterns become one class. A pattern it cannot
conjoin is named in tool guidance instead of dropped silently.
- multipleOf, length bounds of 1999 or more and exclusive bounds on
non-integers become tool guidance, including on nullable values.
- Move the allOf merge into advertisedAllOf.ts.
Fixes#15310
Refs #15328
* fix(mcp): keep defaults, scalar rules, examples and field semantics in compact schemas
Compact input schemas dropped facts an agent needs for a correct first
call: every default, the enums and bounds of reduced root properties, any
example for reduced or pruned schemas, and the Frida cross-field rules.
Name-keyed fallback descriptions also labelled fields of another type.
- Tool guidance names root property defaults in one "Defaults:" sentence.
- A reduced schema keeps the enum, const, pattern and bounds of each
scalar root property.
- A reduced or depth-pruned schema states its smallest canonical example
(up to 1,024 bytes), and a pruned schema says nested fields are omitted.
- Frida contracts state each cross-field rule once, as the refusal and
the root description.
- Fallback descriptions apply only to a property of the JSON type they
describe; they move to propertyFallbackDescriptions.ts.
Refs #15311
Refs #15328
* test(mcp): validate the served schema in three advertisement tests
compare_artifacts sources, compare_web_captures inputs and the
analyze_javascript_application source selection called a canonical or
bare-server schema advertised. They now validate the served listing;
canonical rejections stay on the contract parser, and the gaps the
reduced form leaves are asserted with a pointer to the parity list.
Refs #15328
* test(mcp): check recovery promises on an agent's first wrong calls
Calls every served tool with generated wrong arguments on a session with
nothing open: an unknown path key, an omitted required field, valid
arguments for an active-target tool, a missing file and an unknown id.
Every refusal must name only advertised tools, name open_binary for an
active-target tool, give no schema remediation to arguments the served
schema accepts, and claim retryable only when an identical replay can
succeed. A seeded property varies the guessed key and missing path.
Known failures are listed by root cause (#15309, #15312, #15323 and the
active-target declarations #15350 removes); a new failure or a stale
entry fails the sweep.
* test(mcp): assert the served schema where tests claimed the advertisement
Five tests validated the canonical schema and called it advertised, so they
asserted rules the served tools/list does not carry: batch_decompile
maxItems, inspect_api_contract format and view, the inspect_dart_aot length
and line-terminator rules, extract_artifact uniqueItems, and examples on
compare_javascript_export_shapes. Each now validates the served schema and
keeps the handler enforcement. A missing rule is pinned as a known gap (in
the parity sweep where it can see the field, or beside the test where the
contract example leaves it unreachable), so the expectation fails once the
rule is served.
The parity sweep now also derives maxItems and uniqueItems violations from
example arrays; it finds inspect_managed_members type_names uniqueItems.
Two value-correct tests are relabelled and check the served schema too.
* fix(mcp): fit every advertised input schema under Codex's 5,000-byte compaction threshold
Codex compacts any MCP input schema above 5,000 serialized bytes and drops
descriptions and nested structure first, so update_analysis_settings
reached the model as a list of empty objects with no setting IDs. Lower the
advertised input budget from 13 KiB to 5,000 bytes, bound $ref expansion
separately so projection and depth pruning are judged on their result,
and advertise update_analysis_settings changes as one object whose setting
enum lists every ID; the canonical parser still enforces each setting's
bounds.
Refs #15339
* fix(mcp): address review findings across the served-schema stack
Keep the recorded description, or its absence, when the deferred runtime
materializes, so discovery and the loaded listing agree. Measure example
guidance in UTF-8 bytes once, resolve defaults through each property's own
reference scope, keep root names and types when scalar rules alone would
overflow the reduced form, and decline joining negated classes that a
literal hyphen could turn into a range.
Served parity now counts guidance only when one sentence labels the field
and states its rule, and counts uniqueItems guidance. That stricter match
exposed seven gaps the loose match hid; they join their root causes, and
the fixed arrayRules gap is removed. The first-contact sweep keys findings
by check, checks a structured next step against the served catalog, and
uses the catalog's own MCP settings.
* chore(mcp): refresh advertised catalog summaries
* fix(paths): keep the NUL path refusal's format reason
Moving the NUL check out of the advertised pattern turned its issue into a
custom refinement, so tool refusals reported reason invalid_value instead
of invalid_format with expected regex. The check now raises the same
format issue, and still stops before the absolute-path rule.
* fix(mcp): state the optional Frida device choice and match bounds by rule
The Frida device rule now says both fields may be omitted for the local
device. Served parity matches a numeric bound by its direction, unit and
complete value, so another bound on the same field cannot cover it.
* test(mcp): stop pinning served-schema omissions in workflow tests
Workflow tests asserted that the served schema accepts values runtime
refuses, so serving a rule would fail them. They keep the valid-input and
runtime-refusal checks; the catalog-wide parity sweep tracks what is
served.
* test(mcp): count a required field only when guidance requires it
A sentence that only mentions a field, or a same-named key under another
parent, no longer covers a missing required rule. Guidance must state the
requirement about the field's full path, or state a shape listing every
required key of the field's parent.
* test(mcp): credit a served rejection only to the rule that failed
The parity sweep counted any served rejection as coverage, so a probe that
also broke another rule (a too-long locale that breaks its pattern) hid a
missing bound. Served validation now reports every failing keyword, and a
rejection covers a rule only when that rule's served keyword fails.
* test(mcp): assert exact refusal, identity and Evidence linkage facts
Replace isError-only, expect.any and oracle-mirror checks in MCP and CLI workflow tests with the exact code, reason, subject identity and Evidence links the producers report. The capability-unavailable unknowns test now opens its target, so it exercises the path it names instead of NoBinaryOpenError.
* test: fail loudly on setup refusals, unrecorded paths and zombie liveness
Three shared helpers remove weakness classes from the suite:
- callOk (tests/support/mcp/toolResult.ts) fails at the setup step when a
tool used as fixture setup refuses. It replaces the build-computer copy
and the unchecked open_binary calls. serverUnknownsMcp's
capability-unavailable test passed only because open_binary failed: its
fixture refused health, and NoBinaryOpenError has the same "unavailable"
category. The fixture now answers health, and the test asserts
capability_unavailable for procedure_pseudo_code.
- expectRemoved (tests/support/expectRemoved.ts) throws when no path was
recorded; access(list[0] ?? "") passed because "" is also ENOENT.
- expectProcessRunning checks ps state instead of signal 0, which still
reaches a zombie that REA wrongly signalled.
Also asserts the open target before and after an ordinary close, the
written overwrite snapshot, and the comparison's links, status and
supporting unknown.
* test(mcp): compare delivered recovery with its owning projection
* fix(evidence): resolve web script and WASM comparison sources through the shared Evidence input owner
export_web_scripts accepts its capture as declared Evidence input: a
complete record, a retained reference, or a retained inspect_analysis_view
summary, which reads its retained parent. compare_wasm_interfaces admits
both sides through resolveEvidenceRequest, so a malformed side is a
bounded evidence_integrity_mismatch and a summary reads its parent. The
summary-to-parent rule lives in the shared resolver as completeProducers.
A catalog test checks that every declared Evidence input resolves a
retained reference through the shared resolver.
Refs #15341
* fix(evidence): retain an inline web script capture before publishing and commit the schema summary
* test(clients): check configured MCP catalogs in native harnesses
* test(opencode): resolve the native CLI in the isolated home
* ci(clients): identify native catalog discovery in the job log
* test(ci): isolate native clients and preserve registration failures
Stryker divides concurrency between TypeScript checkers and test runners,
so the configurations' concurrency of 2 ran one checker and one test
runner. The reverse-tools sweep reached 884 of 1034 mutants before its
90-minute budget and has not completed since 2026-11-14. On four pinned
cores, a reverse-tools subset (167 mutants) took 1642 s at 2 and 801 s at
4, with identical outcomes. The workflow now passes --concurrency 4; the
configurations keep 2 for shared local machines.
Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Knip ran only in the full-tier deep static job, so pull requests merged
with unused exports and the next scheduled run failed; 3 of the last 12
scheduled CI runs on main failed only on Knip. It needs the built workers
that package imports name, so it now runs in the build job after
test:prepare, where it adds the Knip run itself (about 20 s cold) to a
job every code change already runs. Its cache steps move with it and the
deep job no longer repeats it.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(mutation): include every mutated file in the mutation project
Stryker's typescript-checker watches the files the mutation project
includes. A mutated file the project leaves out has no watcher, and the
sweep aborts with "no watcher is registered for it" before it reports a
score. The semantics suite mutates src/rizin/RizinDebugFrames.ts and
src/rizin/RizinDebugEvidence.ts, and the reverse-tools suite mutates
src/domain/analysisResourceLimits.ts; none of the three was in
tsconfig.reverse-tools-mutation.json, so the daily mutation sweep failed
before it produced a report.
Add the three files to the project. Add scripts/verify/mutation-target-tsconfig.mjs,
which reads the resolved mutation targets from both configurations and
fails when the project does not cover them or lists a file the repository
no longer has. The guard runs in the deep static lane and before the
sweep, so the drift is reported by name instead of as a checker
abort.
* fix(mutation): give the reverse-tools sweep the time it needs
The reverse-tools suite reached 805 of 1008 mutants after 57 minutes of
mutation testing on the 2026-11-26 scheduled run and was killed by the
60-minute job budget before it could report a score. The suite needs
about 70 minutes of mutation testing plus the setup it runs before it.
Raise the job budget to 90 minutes so the sweep reports instead of
being cancelled. The budget is the only change; the suite and its
mutant set are untouched.
* fix(ci): select mutation quality for debugger limit changes
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(browser): name the rule when refusing a request header
A request step that set a browser-controlled header was refused with
"A page's fetch cannot set this header", which named neither the header
nor the rule. The advertised compact schema cannot carry this nested rule,
so the refusal is where an agent learns it. Name the header and say
whether it is browser-controlled or uses the reserved Proxy-/Sec- prefix.
* fix: name the violated rule in browser URL, CDP endpoint and Mach-O selection refusals
Invalid browser URL, Invalid CDP endpoint URL and Invalid Mach-O
container identity named no rule. The compact advertisement drops these
nested constraints, so the refusal is where an agent learns them. Name
the accepted form, without echoing values that may carry secrets, and
record the practice in the tool-design guide.
The reads counted before a read-budget refusal are a lower bound: later reads
depend on structures not yet decoded, so retrying at that value can refuse
again. Keep the bound in reported_limits.required_read_bytes and report no
required_value, which promises the smallest admitting value.
* feat(limits)!: report the value a per-call limit needs and derive its recovery
A per-call parameter limit (`control_kind: "parameter"`) now carries an
optional `required_value`, and its refusal projects the typed
`adjustable_budget` under `details.refusal` with `control`, `default_value`
and `required_value`. The refusal owns the recovery: "Pass a larger
<parameter> on the next <operation> call (at least N; range a..b), then
retry", or a narrower request when the control is at or below the need's
maximum. The CLI renders the step with the command's flag and command.
ELF notes and debug-link, pcap producer limits, PE/native read budgets and
WASM artifact paths drop their duplicate authored recovery and report the
measured need where they compute it.
BREAKING CHANGE: per-call parameter refusals gain `details.refusal`, and
their `remediation.action` wording changes to the generated form.
* feat(limits): offer the session setting beside a setting-backed per-call limit
The adjustable_budget recovery is now rendered from its details.refusal
facts alone (which gain `source` for settings), so the CLI parses those facts
and re-renders the recovery with its flag and command instead of matching
display text; authored recovery is never rewritten. A per-call control backed
by a registered setting names both routes: the next call, then the setting
through update_analysis_settings, or its launch environment variable for a
one-invocation caller. Per-call-only controls keep one route.
inspect_wasm_artifact reports the larger of its oversized selection counts
as required_value, so one retry admits both fields.
* refactor(limits): render refusal recovery once in the delivering adapter's spelling
Refusal recovery is rendered at projection in the spelling of the adapter
that delivers it: MCP names the contract field and tool; a CLI command binds
its own spelling (flag or JSON-option path, rea <command>, launch
environment route) around its run. Authored recovery never reaches the
renderer, so nothing distinguishes it by text. The CLI no longer re-parses
details.refusal or rewrites the generated sentence; the prefix-matching
rewrite and its fact schema are removed.
* test: expect the typed refusal for Flutter APK and NTFS per-call limits
Per-call parameter limits now carry details.refusal; these tests landed on
main asserting its absence.
* docs: tighten contributor guidance and prune duplicated skill and verification text
Link AGENTS.md to the CONTRIBUTING.md owners for scope, issues and pull
requests, remove change narratives from the development guides, add a
verification-record retention rule, and route format-specific skill
entries to tool descriptions and guides instead of restating them.
* chore(skill): regenerate the Cursor plugin skill copy
The skill source was trimmed in this PR; regenerate the tracked Cursor
plugin copy with scripts/generate-cursor-plugin-skill.mjs so the
documentation check's freshness test passes.
* docs(development): route first contact by parsed facts and split admission limits from delivery budgets
Add first-contact routing rules, provider-neutral selector semantics,
address-space naming, once-per-session caveats, sibling-reader parser
sharing and target-versus-request error categorization to the tool
design guide. Replace the unpaged-by-default rule with bounded summaries
backed by retained Evidence, and distinguish refusing admission limits
from non-refusing delivery budgets. Add public-corpus checks to the
testing guide and tighten the audit and workflow sections.
* docs(development): bind mutable-state cursors to a revision and limit retryable to idempotent retries
* docs(development): share parsing, not admission policy, across sibling readers
Sibling readers of one format need different amounts of the same header,
so they share the parser and structural checks while each operation keeps
its own required fields and admission policy. Align the AGENTS.md limits
rule with the admission-limit and delivery-budget split.
* perf(mcp): serve compact output schemas from the build-recorded catalog
The compact output profile forced the eager runtime: full server composition plus runtime schema compaction measured at ~700 ms init + ~421 ms first tools/list, vs ~125 ms deferred for the default profile. The catalog recorder now also records bounded compact output advertisements per tool at build time; the deferred server serves them verbatim (new recorded presentation kind, canonical validation unchanged on calls), main admits the compact profile to the deferred path, and catalogs recorded before this field fall back to eager. Measured after: compact init 118 ms + list 7 ms at the same ~672 KB payload.
Refs #13275. Verified: DeferredEvidenceMcpServer tests (17), check:fast, build:cached, and a stdio probe comparing default/compact/hot-cold initialize and tools/list timings and bytes.
* fix(mcp): align compact deferred listings with the recorded catalog
Deferred compact startup used the off-profile catalog digests, so the first
tool call rejected the runtime. Select the digest for the configured output
profile.
Recorded output presentation skipped compaction for every listed schema.
Track which tools have a build-recorded advertisement and compact live
registrations, including discover_tools.
The recorder stored a contract projection. Legacy clients receive that
projection after the SDK stamps or wraps a non-object root and REA compacts
the listing. Record that listed schema.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* docs(mcp): describe recorded compact startup
Compact stdio startup serves the recorded catalog, including compact output
when that catalog has compact schemas. A compact profile whose catalog has
none falls back to eager composition. Initial-target, HTTP, family-scoped
hot/cold, and source runs without recorded artifacts stay eager.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* docs: codify pagination, schema-flatness, DDIA, and flat-ownership guidance in tool-design docs and skills
Closes#13864
* docs: name the current provider operation runner
* perf(mcp): trim deferrable result schema storage
* test(mcp): guard the deferred catalog output projection
* test(mcp): validate hardening against the canonical output schema
* ci(release): require full qualification before tagging
* ci(release): preserve unpublished versions and verify npm before tagging
* test(release): exercise publication gates on both release routes
* fix(release): fetch the live main checkpoint before verifying it
* fix(release): constrain GitHub requests and workflow output
* fix(release): honor GitHub label and recovery API contracts
Name the verifier command owner, run helpers, and cleanup order so new
verifier scripts do not start compilers, readers, or the REA CLI with bare
execFile.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
List the six feature records missing from the spec index, drop the open
ReFS owner-review task now that admission is on main, and state when a
record is required.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>