mirror of
https://github.com/morluto/rea.git
synced 2026-11-30 18:39:24 +00:00
* perf(contracts): prune only over-depth schema branches instead of reducing whole schemas A schema whose inlined form exceeded the depth-10 advertised limit fell back to reduceToShallowProperties for the entire tool, erasing enums and nested validation on all root properties. pruneSchemaBeyondDepth now replaces only sub-schemas past the prune depth with type-preserving placeholders (every replacement widens acceptance, so canonical server-side validation is unchanged), and both input and output compaction keep the pruned form as inline when it fits bytes, depth and dialect checks. Two compactInputSchema tests that pinned depth-forces-reduction now pin the pruned-inline contract with the same Ajv/dialect safety assertions. Refs #13302. Verified: compactInputSchema, compactOutputSchema, toolSchemaMetadata, advertisedInputExamples (59 tests), check:fast, docs:check. * docs(contracts): refresh advertised schema summary for pruned-inline compaction Pruned-inline schemas retain patterns (digest, Evidence id and text patterns) that whole-schema reduction dropped on 13 tools; regenerate the committed catalog summary with npm run verify:advertised-schemas -- --update-summary and re-verify clean. * fix(contracts): make deep-schema pruning widening-safe Walk schema positions instead of raw JSON, preserve declared integer types, keep branches that fit, return no pruned schema under not/oneOf where widening can reject valid values, and recheck output byte budgets. Add regression coverage for closed objects, unsafe combinators, fitting enums, and nullable integers; refresh advertised summaries. * fix(contracts): keep untyped deep schemas unconstrained when pruned Inferring object from properties or array from items narrows an untyped schema, which accepts every JSON value; the placeholder is now always unconstrained when no type is declared. Add an Ajv regression accepting null and nested values through a pruned untyped branch. * test(contracts): assert pruned untyped schemas at depth 8 The regression accepted values that never reached the replaced node, so it stayed green for an object placeholder and did not distinguish branch pruning from whole-schema reduction. Assert the empty schema at depth 8 and accept null there. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
8 lines
123 B
JSON
8 lines
123 B
JSON
{
|
|
"schemas": {
|
|
"input compact": "4754798b6a1df756",
|
|
"output compact": "4bda7c3651bfc579"
|
|
},
|
|
"patterns": {}
|
|
}
|