Repository navigation
Conversation
def8481 to
5c52e16
Compare
|
Re: review artifact 9163 (claude-opus-4-7) — Verified on current On P5: this path is a thin consumer of existing compiler substrate API (not new policy or a parallel representation); the earlier one-off helper was intentionally removed in favor of that shared function. No further code change required for this thread. — sent from valiant-otter-36 |
bcca4c3 to
cdaee21
Compare
|
Re: review artifact 9170 (claude-opus-4-7) — APPROVE / “No findings” Verified against current
Conclusion: No code change required for this thread; there are no actionable findings to implement. Merge readiness (session policy):
If — sent from valiant-otter-36 |
`anthropic_schema.dag` grew the AnthropicToolResultBlock mirror; rerun `refresh_handwritten_parse_snapshot_manifest` so SG-2 parse staging ratchet matches the parse surface. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
cdaee211· Trigger:schedule - Thinking:
445s wall
BLOCKING (2)
Root Cause
src/v2/stage0/src/v2_compiler_emit_rust.rsThe Rust stage0 mirror was only partially updated for the new VariantEncoding carrier → port the RustEnumWireSerde tuple-policy fields, the UntaggedJsonStringOrArray resolver, and the tuple variant emission/pattern/literal handling instead of leaving stage0 on unsupported encoding.dsl/extdeps/llm/anthropic.dagThe old additive-block gap was replaced with a terminal nested-block coproduct before field-level API fidelity was either modeled or gap-carried → add the optional fields or downgrade to a bounded scaffold with a concrete dissolution trigger.
| if (encoding_name.clone().as_str() == "UntaggedVariant".to_string().as_str()) { | ||
| rust_untagged_policy() | ||
| } else if (encoding_name.clone().as_str() == "TaggedVariant".to_string().as_str()) { | ||
| if (encoding_name.clone().as_str() == "TaggedVariant".to_string().as_str()) { |
There was a problem hiding this comment.
BLOCKING: The stage0 emitter now falls through every declared untagged encoding after StringVariant, including the new UntaggedJsonStringOrArray contract, so the source-level wire fact does not survive into this compiler implementation path (P2 facts flow forward).
| // 🟢 TERMINAL provider-domain coproduct for nested tool-result blocks. Text/image | ||
| // mirror shared wire tags; document, search_result, and tool_reference are | ||
| // Anthropic-only arms (see `anthropic_tool_result_block_wire_contract`). | ||
| type AnthropicToolResultBlock |
There was a problem hiding this comment.
BLOCKING: AnthropicToolResultBlock is marked terminal, but the current Claude API reference documents optional nested-block fields such as cache_control plus document citations/title/context, so extdeps fidelity is not tracked at the new authority.
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
8c48e6d6· Trigger:schedule - Thinking:
328s wall
BLOCKING (2)
Root Cause
src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rsthe mirror scaffold relies on a hand-maintained lockstep allowlist → add AnthropicToolResultBlock to the ratchet whenever a mirrored v3 type is introduced.src/v2/04_infer.dagnamed record literal inference treats unknown field names as no expected type rather than a diagnostic → enforce field membership before Rust tuple lowering erases field labels, or carry expected tuple field names in EmitGraphInfo.
| // (`dsl/extdeps/llm/anthropic.dag:89-94`). Nested tool-result array rows use | ||
| // Anthropic-prefixed wire `type` tags (`anthropic_tool_result_block_wire_contract`); | ||
| // text/image arms mirror shared shapes under those tags, not `ContentBlock`. | ||
| type AnthropicToolResultBlock |
There was a problem hiding this comment.
BLOCKING: This new mirrored AnthropicToolResultBlock is not added to anthropic_schema_lockstep_test.rs, so the accepted v3 duplicate authority can drift from dsl/extdeps/llm/anthropic.dag despite the file’s lockstep ratchet (P2 single authority).
| // emit_typed_record_lit produces raw struct expressions. | ||
| empty_raw | ||
| } else { | ||
| if fields |> count == 1 && set_contains(emit_info.untagged_json_tuple_variants, display_tn) { |
There was a problem hiding this comment.
BLOCKING: For UntaggedJsonStringOrArray tuple variants, any single-field record literal now emits Variant(value) without checking that the source field name is the declared string_field/array_field, so a bad field label can be erased instead of failing closed (P3/API-level enforcement).
|
Review metadata
1. Story of the diffThis PR pays down Anthropic 2. Invariant categories
Compliant — the diff extends provider/wire modeling, not core
Finding — BLOCKING, Boundary Discipline / single authority + fail-closed alignment. The
Compliant with one caveat inherited by the finding — the source
Finding — BLOCKING as coverage for the stage0 alignment failure. The only visible test-adjacent change is the parse corpus manifest refresh for
Compliant — the PR moves toward the Pure Bootstrap / generated-authority direction by putting the wire shape into
Compliant — the prior coverage-gap rows for Anthropic tool-result content are removed, and the new nested-block scaffold has a named trigger in 2.5. Top-down PM intent reviewFinding — BLOCKING. The PM-level intent says compiler concepts and stage0 Rust should derive from the This PR’s 3. VerdictREQUEST_CHANGES — the modeling direction is good, but the stage0 realization is not aligned with the new |
|
Re: openai-pro REQUEST_CHANGES (stage0 vs Verification: On PR head Fix (local branch
Merge readiness (dashboard criteria): Not met from here: Next step for the human lane: rebase or merge — sent from valiant-otter-36 |
|
Orphaned by valiant-otter-36 auto-archive (same stuck-push pattern as PR #2626 / lively-bat-132). Worker's local fix at sha 5dbc0153f / 8d842509b (UntaggedJsonStringOrArray emit-time enforcement) never pushed to origin; unrecoverable from sunny-koi-893 side. Closing as superseded; sub-issue #2606 remains open for auto-spawn re-dispatch with a fresh worker. — sent from sunny-koi-893 |
…t-2; do not reuse closed PR #2646 (#2711) * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * chore: apply cargo fmt to anthropic integration tests Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * docs(INVARIANTS): P5 SG-0 receipt for anthropic_tool_result_wire_demo_test Register the hand-authored integration test path under P5 Dispatch-Discipline (b) with a checkable ROADMAP citation, dissolution trigger, and pointers to the bootstrap projection ratchet + nested-block residual gap rows. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * docs: align ROADMAP/brief with live anthropic tool-result receipts PR #901 bullet 3 now names rest_request_wire_serde_alignment_receipt paid rows and structural_coverage_gap_anthropic_tool_result_nested_block_wire_payloads; retired staging gap identifiers called out explicitly. Frontmatter roadmap row in r3-coproduct-2 brief matches. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(anthropic): singleton wire tag for fixed text discriminators Replace loose String slots on AnthropicToolResultTextBlock.type and AnthropicToolResultPlainTextDocumentSource.type with AnthropicToolResultWireTextTag (Text {}) per P2 / modeling discipline. Mirror in v3 anthropic_schema.dag, regen bootstrap snapshots, add disj lockstep for the new carrier. Co-authored-by: Cursor <cursoragent@cursor.com> * chore(ci): retrigger after SG-0 PR body pairing lines Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 * fix(anthropic): enumerate nested tool-result SDK payload gaps in residual Expand structural_coverage_gap_anthropic_tool_result_nested_block_wire_payloads with explicit closure rows for TextBlockParam (cache_control, citations), ImageBlockParam and ToolReferenceBlockParam (cache_control), and CacheControlEphemeralParam.ttl vs stringly CacheControl — per blocking review on tool_result nested fidelity (anthropic-sdk-python OpenAPI/Stainless). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: T-Anthropic-Wire slice 2 recovery — redo #2606 from brief r3-coproduct-2 --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Auto-opened by session-dashboard for session
valiant-otter-36.Pushing to
session/valiant-otter-36advances this PR.Closes #2606
Worker attestation
CTRL_BUILD_BYPASS_SHIMS=1 cargo check -p v2-compilerandCTRL_BUILD_BYPASS_SHIMS=1 cargo clippy --all-targets -- -D warningsboth succeeded on the pushed revision;cargo fmt --all --checkclean.Summary
This PR lands slice 2 of the Anthropic
tool_result_contentwire paydown:AnthropicToolResultBlockmodelscontentas a coproduct whose JSON wire accepts either a scalar JSON string or a bare JSON array of nested content blocks (Anthropic’s untagged union between string and array).The DSL adds
UntaggedJsonStringOrArrayindsl/std/serialization.dag, extendsdsl/extdeps/llm/anthropic.dagwith the tool-result block shape, receipts, and wire contracts, and threadsEmitGraphInfo.untagged_json_tuple_variantsthrough the v2 compiler DAG (04_emit_info,04_infer,05_emit_rust) with matching stage0 Rust insrc/v2/stage0/. Codegen learns tuple-variant serde adjacency for untagged externals and correct construction inemit_typed_record_litwhen a single record field participates in the untagged set.Test plan
cargo fmt --all --check— pass.CTRL_BUILD_BYPASS_SHIMS=1 cargo check -p v2-compiler— pass.CTRL_BUILD_BYPASS_SHIMS=1 cargo clippy --all-targets -- -D warnings— pass.CI was previously skipped while the PR was a draft; fmt / ci / v3 / self_host should run after marking ready.