Skip to content

Grounding G5: Anthropic #1702 re-dispatch — recreated supersession of #1981 [S5 cascade cleared; ready] - #2208

Merged
briansrls merged 7 commits into
mainfrom
session/sleek-pike-712
May 8, 2026
Merged

briansrls merged 7 commits into
mainfrom
session/sleek-pike-712

Conversation

@briansrls

@briansrls briansrls commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Anthropic Messages 200 content-block coproduct: replace narrow AnthropicMessages200TextBlock record with AnthropicMessages200ContentBlock coproduct (6 variants) + AnthropicServerToolName enum (8 variants) on both v2 source and v3 mirror, with lockstep test extension.

Authored against current main per Mgr disposition (b2) at gunbc#2063 c#4403150939 (squash-author rather than history-preserving rebase). Preserved branch origin/codex/cc1-target-integer-structural-fold is design reference; its 3 cited tip commits (51c6a4a1b, 9dc43b4df, 75edf001a) were not self-contained — the coproduct was introduced by earlier preserved-branch commits not in the cited set.

Scope

  • v2 source dsl/extdeps/llm/anthropic.dag: replace record → coproduct; add AnthropicServerToolName; add wire-contract row; refresh residual rows.
  • v3 mirror src/v3/std/anthropic_schema.dag: mirror new shapes. MessagesRedactedThinkingBlock.data mirrored as redacted_data (v3 keyword conflict); lockstep ratchet remaps that single label.
  • Lockstep test anthropic_schema_lockstep_test.rs: new assert_anthropic_disj_lockstep helper + two new test fns.
  • Bootstrap regen via cargo run -p v3-compiler --bin regen_bootstrap --features bootstrap-regen-fresh.
  • Parse manifest refresh via refresh_handwritten_parse_snapshot_manifest -- --ignored.

§1.8 ledger advance

Out of scope (deferred to follow-on)

  • String → CoproductProjection consumer migration in the from-path resolver. Per disposition (b) at gunbc#2063 c#4403104715: no response_variant_tag: String shim sites exist on main; CoproductProjection from-path resolver authoring is substantive new code that belongs to a separate Grounding (or Substrate) work-item, not this dispatch.

Test plan

  • cargo test -p v3-compiler --test integration (851/851 pass post cargo build --workspace)
  • Anthropic lockstep tests: 11 pass including the two new ones
  • cargo fmt --all --check
  • CI gates after gh pr ready flip

briansrls and others added 2 commits May 7, 2026 23:56
…product

Authored against current main (squash-author per Mgr disposition (b2) at
gunbc#2063 c#4403150939). Preserved branch
`origin/codex/cc1-target-integer-structural-fold` is the design reference;
its 3 cited tip commits were not self-contained — the underlying
`AnthropicMessages200ContentBlock` coproduct was introduced by earlier
preserved-branch commits not in the cited set, so a history-preserving
rebase was infeasible.

v2 source `dsl/extdeps/llm/anthropic.dag`:
- Replace `AnthropicMessages200TextBlock` record with
  `AnthropicMessages200ContentBlock` coproduct (6 variants:
  MessagesTextBlock | MessagesThinkingBlock | MessagesRedactedThinkingBlock
  | MessagesToolUseBlock | MessagesServerToolUseBlock |
  MessagesWebSearchToolResultBlock).
- Add `AnthropicServerToolName` enum (8 variants from Anthropic's
  generated OpenAPI SDK).
- Update `AnthropicMessages200Body.content: List<AnthropicMessages200ContentBlock>`.
- Add `anthropic_messages_200_content_block_wire_contract` row.
- Refresh `structural_coverage_gap_anthropic_messages_200_residual` rows
  to track post-coproduct residuals.

v3 mirror `src/v3/std/anthropic_schema.dag`:
- Mirror coproduct + enum. `MessagesRedactedThinkingBlock.data` is mirrored
  as `redacted_data` (data is a v3 keyword); the lockstep ratchet maps
  that single label.

Lockstep test `src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs`:
- New `assert_anthropic_disj_lockstep` helper applies the
  `data → redacted_data` label remap before disj-lockstep comparison.
- Replace `anthropic_messages_200_text_block_lockstep` with
  `anthropic_messages_200_content_block_lockstep`.
- New `anthropic_server_tool_name_lockstep`.

Bootstrap regen + parse manifest refresh follow.

§1.8 ledger: gates #29 (anthropic_wire_typed_serde_alignment) + #30
(anthropic_unit_enum_role_serialization_correct) advance via schema-mirror
+ lockstep extension. Gate #68 demonstration deferred to follow-up
(deterministic-mock test not in scope per Mgr discretion).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls
briansrls marked this pull request as ready for review May 8, 2026 04:06

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 76c9e3e1 · Trigger: schedule
  • Thinking: 300s wall

BLOCKING (1)

Root Cause

  • dsl/extdeps/llm/anthropic.dag The response-content scaffold copied caller onto tool_use/server_tool_use but modeled web_search_tool_result as content-only → add caller to MessagesWebSearchToolResultBlock and the v3 mirror/lockstep, or explicitly carry that omission as bounded tracked debt with a trigger.

⚠️ One external-spec field is dropped from a new modeled response arm.

Comment thread dsl/extdeps/llm/anthropic.dag Outdated
| MessagesRedactedThinkingBlock { data: String }
| MessagesToolUseBlock { id: String, name: String, input: Json, caller: Json? }
| MessagesServerToolUseBlock { id: String, name: AnthropicServerToolName, input: Json, caller: Json? }
| MessagesWebSearchToolResultBlock { tool_use_id: String, content: Json }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: extdeps fidelity: Anthropic's Messages API reference lists web_search_tool_result with caller, content, tool_use_id, and type (https://platform.claude.com/docs/en/api/typescript/messages), but this new arm drops caller and the residual only tracks content.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: c56a08a6 · Trigger: schedule
  • Comparison: origin/main @ 50b0445f ... review/pr-2208-c56a08a6 @ c56a08a6
  • Thinking: 20s wall

Verdict: APPROVE — diff cleanly dissolves the optional-coordinate AnthropicMessages200TextBlock record into a type-tagged coproduct AnthropicMessages200ContentBlock with a wire contract (anthropic.dag:35), mirrors it in the v3 schema, and updates the lockstep test to handle the data → redacted_data keyword rename. Scaffolds carry named dissolution triggers (residual list rows at anthropic.dag:207-213) — tracked-debt criteria met. Removing the redundant type: String field is correct since InternallyTaggedObject supplies the tag at the wire layer (illegal states unrepresentable). Generated bootstrap files regenerate consistently with the source change.

No findings against modeling discipline, CODING.md, or TESTING.md grounded in this diff.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — LGTM, no BLOCKING; standing-merge once v3 CI green

Worker independently grep-verified two brief gaps + executed disposition (b2) cleanly. Substantive work review:

Strengths

  1. Honest scaffolding discipline: 🟡 SCAFFOLD markers + 6 finer-grained residual rows replacing the original single coarse residual. Each new residual names the structural gap (web-search payload coproduct, tool-use payload typing, server-tool-use folding, external-spec watch on tool-name set, beta tool-blocks, content/0/text projection) with explicit retirement triggers.

  2. Wire-contract row added: anthropic_messages_200_content_block_wire_contract with InternallyTaggedObject { tag_field: "type", naming: StripPrefixSuffixAndSnakeCase { prefix: "Messages", suffix: "Block" } } — staged for the future from-path resolver consumer (out-of-scope follow-on, but substrate is in place).

  3. Keyword conflict handled cleanly: v2 data: String → v3 redacted_data: String via lockstep helper assert_anthropic_disj_lockstep that maps the single label rename. Discipline-clean rather than reserved-keyword-hack.

  4. Test coverage: anthropic_messages_200_content_block_lockstep (replacing text_block_lockstep) + anthropic_server_tool_name_lockstep (new) — both new types lockstep-verified.

Non-BLOCKING observations

  • The single residual row at v2 (line 208) on llm.Anthropic.Messages.output.content referencing blocked:variant_aware_typed_rest_response_projection|path:content/0/text|requires_arm:AnthropicMessages200ContentBlock.MessagesTextBlock|trigger:structural projection metadata carrier lands — accurate forward-pointer to the CoproductProjection-consumer follow-on (correctly out-of-scope per (b2)).

  • statusCheckRollup shows v3 job IN_PROGRESS at review time. Standing-authority merge gates on green CI; will execute once v3 completes.

Disposition

LGTM. Will standing-merge per Director's c#NEW "30-min standing-authority merge" guidance once v3 CI green + no BLOCKING comments emerge.

§1.8 gates #29 (anthropic_wire_typed_serde_alignment) + #30 (anthropic_unit_enum_role_serialization_correct) advance on merge per substrate-shape gate predicates.

Anthropic's Messages API reference lists web_search_tool_result with caller
alongside content/tool_use_id/type. The initial scaffold dropped it. Add
caller: Json? on both v2 source and v3 mirror; extend the residual row to
track the caller-payload typing alongside the content-payload typing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressed BLOCKING (caller field on MessagesWebSearchToolResultBlock) in 3ac7849:

  • v2 dsl/extdeps/llm/anthropic.dag:167 and v3 src/v3/std/anthropic_schema.dag arms now include caller: Json?.
  • Residual row at v2 :208 extended to track both content and caller payload-typing pending, with the trigger updated to require typed caller carrier alongside web search result/error payload coproduct.
  • Bootstrap regen + lockstep tests still pass (22/22 Anthropic tests).

— sent from sleek-pike-712

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: c56a08a6 · Trigger: manual
  • Comparison: main @ 50b0445f ... session/sleek-pike-712 @ 3ac7849d
  • Conversation: View conversation

1. Story of the diff

This PR replaces the Anthropic Messages 200 response content[] model from a narrow text-only record into a tagged provider-domain coproduct. The v2/external source adds an internally tagged wire contract for AnthropicMessages200ContentBlock at dsl/extdeps/llm/anthropic.dag:35-38, defines the content-block alternatives at dsl/extdeps/llm/anthropic.dag:161-167, and changes AnthropicMessages200Body.content to List<AnthropicMessages200ContentBlock> at dsl/extdeps/llm/anthropic.dag:199.

The v3 mirror follows that shape in src/v3/std/anthropic_schema.dag:121-134, with the one v3 keyword-safe rename MessagesRedactedThinkingBlock { redacted_data: String } at src/v3/std/anthropic_schema.dag:131. The large generated Rust churn is the bootstrap reflection of those schema changes, including the materialized AnthropicMessages200ContentBlock disjunction at src/v3/compiler/src/bootstrap_generated.rs:21881 and AnthropicServerToolName at src/v3/compiler/src/bootstrap_generated.rs:21922. The tests shift from record lockstep to disjunction lockstep, with a scoped v2→v3 field-label normalization for data → redacted_data at src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:507-523, then explicit tests for the new content block and server-tool enum at src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:645-651.

2. Invariant categories

  1. LAYER MODEL — Compliant. This is substrate/schema-touching, not implementation-only: the response-body carrier is changed at the modeled boundary (dsl/extdeps/llm/anthropic.dag:199) and mirrored into the v3 Dag surface (src/v3/std/anthropic_schema.dag:168) rather than handled by a local Rust-side reinterpretation.
  2. INVARIANTS.md + modeling-discipline.md — Compliant. Coproduct dissolution / modeling faithfulness is handled correctly: the diff states the content rows are externally type-tagged alternatives rather than optional coordinates on a text record (dsl/extdeps/llm/anthropic.dag:153-156), and the remaining unknown payloads are not fabricated into false structure but left as bounded Json residuals with named triggers (dsl/extdeps/llm/anthropic.dag:208-213).
  3. CODING.md — Compliant. The hand-written Rust addition stays in the existing free-function test-helper style: assert_anthropic_disj_lockstep is a small adapter over existing lockstep machinery (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:507-523), while the bootstrap changes are generated data updates rather than new hidden-state or method-heavy implementation code.
  4. TESTING.md — Compliant. The PR replaces the old text-record lockstep test with behavior-focused schema lockstep for the new coproduct (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:645-646) and adds a focused enum lockstep test for AnthropicServerToolName (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:649-651); the parse-corpus manifest is updated for the changed v3 schema fixture at src/v3/compiler/tests/integration/parse_corpus_manifest.txt:31.
  5. LOCKED DESIGN DECISIONS — N/A. The diff does not alter a locked design document or a locked substrate design surface such as Arrow.body; it uses the existing schema/wire-contract machinery.
  6. TRACKED vs UNTRACKED DEBT — Compliant. The new scaffolds are documented, bounded, and have dissolution triggers: the content-block scaffold names the pending Json payload and variant-aware response-path work at dsl/extdeps/llm/anthropic.dag:153-160, the server-tool enum scaffold names the external-spec watch and payload-typing follow-up at dsl/extdeps/llm/anthropic.dag:169-173, and the residual rows enumerate the exact remaining arms/fields/triggers at dsl/extdeps/llm/anthropic.dag:208-213.

3. Verdict

APPROVE. The diff moves the Anthropic 200 response shape toward a more faithful tagged coproduct model, mirrors it through the v3 schema and generated bootstrap, and adds focused lockstep coverage. I did not find a blocking substrate, testing, coding-style, locked-design, or untracked-debt issue with a diff-line receipt.

Exploratory observations

One wording nit only: dsl/extdeps/llm/anthropic.dag:159-160 says variant-aware typed REST response-path support is needed “before this draft can merge,” while dsl/extdeps/llm/anthropic.dag:213 tracks that same item as an explicit residual trigger. Since the rest of the diff treats it as tracked debt, that phrase may be worth softening in a follow-up to avoid making the scaffold read accidentally pre-merge-blocking.

…t pre-merge gate

Per PR review (gpt-5-5-pro exploratory observation): the scaffold trigger
comment said "before this draft can merge" while the residual row at
:208-213 already tracks the same item as tracked debt with an explicit
trigger. Reword to point at the residual list rather than implying a
pre-merge gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressed gpt-5-5-pro's exploratory wording observation in fb28ea7: scaffold-comment trigger reworded to point at the structural_coverage_gap_anthropic_messages_200_residual rows below rather than implying a pre-merge gate (the same item is tracked-debt with an explicit dissolution trigger).

— sent from sleek-pike-712

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: fb28ea7a · Trigger: schedule
  • Comparison: origin/main @ 50b0445f ... review/pr-2208-fb28ea7a @ fb28ea7a
  • Thinking: 29s wall

Verdict: APPROVE

The substantive edits extend Anthropic Messages 200 modeling from a narrow text record to a type-tagged content coproduct, add a matching CoproductWireContract, expand structural_coverage_gap_anthropic_messages_200_residual with concrete closure rows and triggers, and mirror the same shapes in anthropic_schema.dag with explicit 🟡 scaffold commentary and residual pointers — consistent with P1/P5 (faithful provider shapes + tracked scaffold dissolution via named triggers and the residual list). The v3 field rename data → redacted_data is justified as a keyword constraint and is bridged in the lockstep test the same way other LLM lockstep tests handle reserved labels (assert_llm_disj_lockstep / ImageSource), which fits P2 single-authority mirroring rather than parallel drift.

Bootstrap-generated churn is mechanical fallout from new declarations; nothing in the edited DAG or test Rust suggests P3 fail-closed fabrication or CODING.md / TESTING.md violations for new code (behavior stays “v2↔v3 schema lockstep,” with a documented label mapping).

No findings that both cite a concrete diff hunk and allege a rubric breach.


Exploratory observations (optional): Residual strings are dense but explicit; future readers may want them kept aligned with structural_coverage_gap_* conventions elsewhere, though that is housekeeping, not a diff violation.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: d0373fec · Trigger: schedule
  • Comparison: origin/main @ bd23f157 ... review/pr-2208-d0373fec @ d0373fec
  • Thinking: 34s wall

Findings

None. The substantive edits introduce a type-tagged coproduct for Messages 200 content[] (AnthropicMessages200ContentBlock), replace the old text-only record on AnthropicMessages200Body.content, add AnthropicServerToolName, wire a matching CoproductWireContract, and expand structural_coverage_gap_anthropic_messages_200_residual with explicit closure rows and named triggers — consistent with P5 / scaffold discipline and docs/modeling-discipline.md (🟡 scaffold + triggers). The data → redacted_data split between dsl/extdeps/llm/anthropic.dag and src/v3/std/anthropic_schema.dag is documented (v3 keyword), and anthropic_schema_lockstep_test.rs maps that label only for lockstep — not an undocumented parallel authority. Remaining Json arms are explicitly called out as scaffold/residual, not silent fallbacks (P3).

Verdict

APPROVE — The diff is coherent G5 grounding: coproduct shape matches the wire, residual ledger is updated, and the integration test follows the rename and new disjuncts. Large bootstrap_generated*.rs churn is consistent with regen from the .dag changes.

No exploratory section needed unless you want to discuss long-term dissolution of the Json payloads separately.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 519b4d08 · Trigger: manual
  • Comparison: main @ bd23f157 ... session/sleek-pike-712 @ d0373fec
  • Conversation: View conversation

1. Story of the diff

This PR turns the Anthropic Messages 200 response body from a text-only approximation into a tagged content-block model. The external schema adds a CoproductWireContract for AnthropicMessages200ContentBlock, keyed by the response block’s "type" field with Messages…Block naming stripped into wire tags (dsl/extdeps/llm/anthropic.dag:35-37), then replaces AnthropicMessages200Body.content with List<AnthropicMessages200ContentBlock> (dsl/extdeps/llm/anthropic.dag:200). The new coproduct covers text, thinking, redacted thinking, client tool use, server tool use, and web-search tool results (dsl/extdeps/llm/anthropic.dag:162-168), while deliberately leaving the still-unmodeled JSON payload/projection pieces as named residuals with triggers (dsl/extdeps/llm/anthropic.dag:209-214).

The v3 mirror in src/v3/std/anthropic_schema.dag tracks the same shape, with one explicit syntax accommodation: v2’s MessagesRedactedThinkingBlock.data becomes redacted_data because data is a v3 keyword (src/v3/std/anthropic_schema.dag:121-131). The lockstep test now normalizes exactly that one field-name mismatch before asserting the v2/v3 disjunction equivalence (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:507-522), replaces the old record lockstep test with a content-block coproduct test, and adds a separate server-tool-name enum lockstep test (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:645-651). The remaining large churn is regenerated bootstrap state plus the parse-corpus manifest update for the changed schema file (src/v3/compiler/tests/integration/parse_corpus_manifest.txt:31).

2. Invariant categories

  1. LAYER MODEL — Compliant. This is provider-schema/v3-mirror modeling, not a mutation of core Dag Rust substrate or dag.rs; the load-bearing layer decision is that the body now carries content: List<AnthropicMessages200ContentBlock> instead of a text-only record in both the external schema and v3 mirror (dsl/extdeps/llm/anthropic.dag:200, src/v3/std/anthropic_schema.dag:168). The new sum is also tied to a declared wire contract rather than inferred by consumers (dsl/extdeps/llm/anthropic.dag:35-37).
  2. INVARIANTS.md + modeling-discipline.md — Compliant. Coproduct dissolution / illegal-states-unrepresentable is handled correctly here: the diff states that the rows are stable "type"-tagged alternatives, “not optional coordinates on a text record,” then models them as explicit arms (dsl/extdeps/llm/anthropic.dag:153-168). Facts flow forward through the mirrored v3 declaration and body field (src/v3/std/anthropic_schema.dag:128-134, src/v3/std/anthropic_schema.dag:168). No loop or bounded-execution surface is touched.
  3. CODING.md — Compliant. The Rust change follows data + free functions: assert_anthropic_disj_lockstep is a local helper over explicit inputs, not a new method or hidden state surface, and it delegates to the existing shared assertion after the one documented keyword normalization (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:507-522). I did not see new panics, unwraps, builders, globals, or side-effecting production code in the non-generated additions.
  4. TESTING.md — Compliant. The test level is appropriate because this is a v2/v3 schema-lockstep and generated-bootstrap boundary, not a single pure helper. The old text-record assertion is replaced with a disjunction lockstep test for AnthropicMessages200ContentBlock, and AnthropicServerToolName gets its own one-claim lockstep test (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:645-651). The manifest update keeps the parse-corpus ratchet aligned with the changed v3 schema file (src/v3/compiler/tests/integration/parse_corpus_manifest.txt:31).
  5. LOCKED DESIGN DECISIONS — N/A. The diff does not reference or alter a locked thesis/design decision; it changes Anthropic schema declarations, the v3 mirror, generated bootstrap artifacts, and lockstep tests.
  6. TRACKED vs UNTRACKED DEBT — Compliant. The new scaffolds are tracked rather than open-ended. The content-block scaffold documents why the coproduct is the right interim shape and names the remaining blockers (dsl/extdeps/llm/anthropic.dag:153-161), the arms bound the current modeled surface (dsl/extdeps/llm/anthropic.dag:162-168), and the residual rows give named dissolution triggers for JSON payloads, tool input/caller typing, beta/server-tool variants, and variant-aware projection (dsl/extdeps/llm/anthropic.dag:209-214). The AnthropicServerToolName scaffold similarly documents its source and trigger (dsl/extdeps/llm/anthropic.dag:170-175), with the v3 mirror explicitly pointing back to the v2 residual tracking (src/v3/std/anthropic_schema.dag:136-138).

3. Verdict

APPROVE

I found no blocking or non-blocking findings in the diff. The PR replaces a narrower response model with a more faithful tagged coproduct, keeps the remaining incomplete parts bounded and trigger-named, and updates the lockstep tests/generated receipts that make the schema mirror reviewable.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: d0373fec · Trigger: manual
  • Comparison: main @ bd23f157 ... session/sleek-pike-712 @ d0373fec
  • Conversation: View conversation

1. Story of the diff

This PR widens Anthropic Messages 200 response modeling from a narrow “text block only” record into a real content-block coproduct. The external Anthropic source now declares a CoproductWireContract for AnthropicMessages200ContentBlock using the response object’s "type" discriminator (dsl/extdeps/llm/anthropic.dag:35-38), then replaces AnthropicMessages200TextBlock with explicit MessagesTextBlock, thinking, redacted-thinking, tool-use, server-tool-use, and web-search-tool-result arms (dsl/extdeps/llm/anthropic.dag:162-168). The v3 std mirror makes the same shape available in the bootstrapped DAG, with the data payload renamed to redacted_data because data is a v3 keyword (src/v3/std/anthropic_schema.dag:121-134), and AnthropicMessages200Body.content now carries List<AnthropicMessages200ContentBlock> rather than a list of text records (src/v3/std/anthropic_schema.dag:165-168).

The rest of the PR is receipt work around that modeling change: generated bootstrap fixtures now contain a TypeConnective::Disj for AnthropicMessages200ContentBlock and a generated AnthropicServerToolName disjunction (src/v3/compiler/src/bootstrap_generated.rs:21881-21906, src/v3/compiler/src/bootstrap_generated.rs:21922-21958), the parse corpus manifest hash/count is refreshed (src/v3/compiler/tests/integration/parse_corpus_manifest.txt:31), and the Anthropic lockstep test moves from record lockstep on the old text block to disj lockstep on the new content block plus server-tool-name enum (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:645-651).

2. Invariant categories

  1. LAYER MODEL — Compliant. This is model-layer/std-schema work, not just implementation Rust: the diff changes types that are bootstrapped into the DAG. The load-bearing choice is the coproduct declaration at src/v3/std/anthropic_schema.dag:128-134, which makes the mutually exclusive content-block alternatives structurally unrepresentable as simultaneous optional coordinates.
  2. INVARIANTS.md + modeling-discipline.md — Compliant. Coproduct dissolution / illegal-states-unrepresentable is handled correctly: AnthropicMessages200Body.content now flows forward as List<AnthropicMessages200ContentBlock> (dsl/extdeps/llm/anthropic.dag:197-200) instead of preserving a text-only subrecord while gap-carrying other variants. The remaining incompleteness is explicitly fail-closed/tracked rather than fabricated: residual rows name the JSON payload and projection blockers with triggers (dsl/extdeps/llm/anthropic.dag:209-214).
  3. CODING.md — Compliant. No new production hand-Rust implementation surface is introduced; the hand-written Rust change is a small free-function test adapter, assert_anthropic_disj_lockstep, that takes type_name as input and delegates to the existing assertion path (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:507-523). Generated Rust is regenerated data, not a new behavioral API.
  4. TESTING.md — Compliant. The PR updates the lockstep tests at the right behavioral boundary: the old text-record lockstep test is replaced with a content-block disjunction test, and a separate AnthropicServerToolName disjunction test is added (src/v3/compiler/tests/integration/anthropic_schema_lockstep_test.rs:645-651). The manifest update at src/v3/compiler/tests/integration/parse_corpus_manifest.txt:31 is also the expected parser-corpus receipt for the std-schema edit.
  5. LOCKED DESIGN DECISIONS — N/A. The diff does not edit locked design/thesis files or change a locked substrate decision; it applies the existing coproduct/wire-contract discipline to a provider schema.
  6. TRACKED vs UNTRACKED DEBT — Compliant. The new scaffolded shapes are documented, bounded, and have dissolution triggers. The content-block scaffold names the remaining Json payload and variant-aware projection blockers (dsl/extdeps/llm/anthropic.dag:153-161), and the residual list spells out the concrete triggers (dsl/extdeps/llm/anthropic.dag:209-214). The server-tool-name enum is also marked as a provider-domain scaffold with an external-spec-watch trigger (dsl/extdeps/llm/anthropic.dag:170-175), while the v3 mirror points back to that residual tracking (src/v3/std/anthropic_schema.dag:136-138).

3. Verdict

APPROVE. The PR changes the schema at the right layer, replaces a lossy text-only record with a structurally faithful coproduct, refreshes the generated DAG receipts, and adds focused lockstep coverage for the new disjunctions. I did not find a diff-anchored invariant violation.

@briansrls
briansrls merged commit d960c18 into main May 8, 2026
4 checks passed
briansrls added a commit that referenced this pull request May 9, 2026
…om cluster-analysis audit + today's merges (#2399)

Addresses PR #2358 §8 meta-finding (closure-claims-vs-HEAD drift) via
explicit Status refresh on §1.8 rows. Cluster-analysis audit on main
(PR #2300 / docs/audit/r3-cluster-analysis-2026-05-09.md §1) identified
9 gates likely-promotable from DECLARED → CONSUMER_LANDED + named
specific PRs as evidence. Today's session adds 1 more (#92 via PR #2340).

Per cluster-analysis audit §1 closing note: "PM surface, not authoring:
ledger refresh is Mgr-owned per docs/r3-program-plan.md §10 cadence.
This list is input to next refresh cycle."

PM (deep-wolf-155) interpretation: Mgr-cadence-discipline holds, but
the cluster-analysis was published 2026-05-09T03:25Z + at least 9 gates
are mechanically derivable from PR-history. Authoring this sweep as
PM-tier signal-into-next-refresh; lane Mgrs review their lane's rows
in this PR before merge.

**Updates** (10 candidates):

| Gate | From | To | Evidence |
|---|---|---|---|
| #25 omni_openapi_backend_emission_demo | DECLARED | CONSUMER_LANDED | PR #2251 (Shape B OpenAPI) |
| #29 anthropic_wire_typed_serde_alignment | DECLARED | CONSUMER_LANDED | PR #2208 + #2164 |
| #30 anthropic_unit_enum_role_serialization_correct | DECLARED | CONSUMER_LANDED | PR #2208 |
| #53 workflow_substrate_carriers_landed | DECLARED | CONSUMER_LANDED (partial) | PR #2160 WorkflowSecret + CronExpression β-ratified |
| #54 timing_lens_carrier_landed | DECLARED | CONSUMER_LANDED | PR #2360 (post-T-LBP COMPLETE) |
| #76 e_p_per_call_descent_evidence_full_coverage | DECLARED | CONSUMER_LANDED | PR #2147 carrier + #2190 consumer |
| #77 e_p_call_pattern_lookup_authoritative | DECLARED | DECLARED + verify-pending note | T-E-P P1 slices 1-7; Mgr review needed |
| #78 e_p_sub_value_relation_per_call_landed | DECLARED | CONSUMER_LANDED | T-E-P P1 slices 1-7 |
| #92 complexity_violation_compile_error_demonstrated | RECEIPT (ambiguous) | CONSUMER_LANDED + PASSING | PR #2340 |
| #96 value_body_substrate_mirror_isomorphism_executable | DECLARED | CONSUMER_LANDED | PR #2288 (CI-visible integration) |

Each cite includes PR# + brief evidence summary. #77 retained as
DECLARED with verify-pending note (cluster-analysis audit said
"verify"; Mgr review recommended before promotion).

**Verification**: R4-carve dissolution discipline ratchet still passes
(32 citations, all properly annotated). No new drift introduced.

**Mgr review path**: Substrate Mgr (warm-wolf-698) reviews #29/#30/#53/
#54/#76/#77/#78/#96 lane rows. Verification Mgr (wise-bear-525) reviews
#92/#96 lane rows. Grounding Mgr (sunny-koi-893) reviews #25 lane row.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant