Repository navigation
Conversation
|
hi,Preserving structured output contracts in CCA tool declarations is a valuable fix. Sharing two observations regarding traversal overhead and node/byte accounting in 1. Repeated subtree serialization in
|
|
已推送修复提交 |
tt-a1i
left a comment
There was a problem hiding this comment.
Reviewed at exact head 9322d4f.
Standards
[P1] The 256 KiB bound is checked only after the full expanded graph has been materialized and JSON-stringified. Many references to one large subtree can amplify a small input dramatically before rejection, allowing excessive allocation or OOM during request preparation. Account for emitted expansion bytes before cloning/materialization.
[P2] The resolver applies depth 16 / node 512 limits to every schema, including schemas with no $ref, while the canonical structured-output boundary accepts depth 24 / 10,000 nodes. This regresses previously valid Antigravity tools. Fast-path no-ref schemas or align the limits with the authoritative boundary.
Spec
[P1] $ref siblings shallow-overwrite referenced keywords. A target containing properties / required combined with sibling constraints loses the referenced constraints instead of preserving conjunction.
[P1] A valid boolean-schema target false is object-spread into {}, reversing “reject everything” into unconstrained acceptance.
[P2] JSON Pointer traversal uses inherited property lookup, so #/$defs/toString can resolve Object.prototype.toString instead of failing closed. Use own-property traversal only.
Please add regressions for sibling collisions, boolean targets, inherited/unresolved pointers, and ordinary no-ref compatibility before merge.
9322d4f to
682a780
Compare
|
已更新并重放到当前 main(682a780)。评审项均已处理:无 schema 走原样快速路径;含引用的展开使用 depth 24/node 10000 边界,并在构造引用子树前预算最终 emitted JSON bytes; siblings 通过 allOf 保留合取语义,boolean target 不再被 object spread 改写,JSON Pointer 仅接受自有属性。新增 sibling collision、boolean schema、inherited pointer 和大型无引用 schema 回归。验证:antigravity 44/44 通过。当前没有未解决问题。 |
tt-a1i
left a comment
There was a problem hiding this comment.
审查提交:682a7801bd2d2948a758886ed87e04a6509a6ec1。
合并前需修复已复现的检查失败。
验证范围
Full resolver and regression diff reviewed: byte measurement precedes clone; no-ref fast path, conjunction-preserving allOf, false target, and own-property lookup address previous five findings. 44 Antigravity tests pass at 682a780. Biome formatting fails in both changed TS files.
限制与后续
Provider acceptance of expanded allOf/boolean declarations remains unverified; no live provider call. No new confirmed runtime defect from this pass.
已核对的 CI 失败
Run 35176490697:三个 Node job 被 google-conversion.ts / antigravity.test.ts 格式检查阻断。Web E2E 在 unknown prompt admission 夹具 route.fetch 的 response.json 处报 Response has been disposed;本轮未独立重跑确认原因。
Problem
Fixes #465. Antigravity dropped local schema-reference definitions and then stripped references, leaving result-contract properties empty. The original resolver also interpreted literal
$refkeys insidedefault,examples,constandenumdata as schema references and rejected otherwise legal requests before dispatch.Value
Direct Subagent and Workflow result-contract constraints remain visible in Antigravity declarations. Literal instance data remains compatible with existing conversion, and unsafe schema expansion fails before a request is sent.
Approach
Expand own-property same-document JSON Pointers before the existing CCA sanitizer. Detection, measurement and expansion share schema/map/data position rules: annotation payloads are opaque to reference interpretation but are still charged to output budgets when expansion occurs. Measure depth, nodes and serialized bytes before cloning referenced subtrees; preserve the no-reference fast path, sibling conjunctions and boolean targets. Local Pi validation remains authoritative.
Validation
682a7801with fixed mainf98d6a47, retaining history.bun install --frozen-lockfile: passed, pinned Pi SDK 1.2.0.buildRequestBodyregressions failed before the literal-data repair, then passed.node --test --experimental-strip-types tests/extensions/ai-providers/antigravity.test.ts: 83 passed, including schema/data positions, escaped own pointers, depth/node/byte limits, sparse slots, generated conjunction output shape and no-reference compatibility. Two synthetic-output budget regressions failed before repair; both independent output probes now reject expansion before cloning.parameters; ablation reproduces an empty referenced property and amplification is rejected before materialization.bun run check: passed (format, lint, types).bun run test: passed; Node 2473 passed / 9 skipped / 0 failed, UI 1338 passed across 88 files.allOfand boolean schemas remains unverified. No authorized no-cost live route was established; no provider calls, tool execution or user credential inspection/modification was used. Local request construction is not provider acceptance.Two independent final source reviews passed on
b11ec04f7cf9ab41b220799483afc9a8c655db23. Fresh final-head CI and independent last-push review remain merge gates. Both reviews retain the precise remote CCA acceptance gap above.Final-head remote CI passed all 18 checks: 38700817196. Independent GitHub approval still gates merge.
Impact