Skip to content

[codex] Pin Anthropic response role wire serialization - #3093

Merged
briansrls merged 4 commits into
mainfrom
session/zesty-ferret-76
May 14, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/zesty-ferret-76

Conversation

@briansrls

@briansrls briansrls commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a focused Anthropic Messages wire receipt for the 200 response role.
  • Derives Serialize for the hermetic ResponseRole demo enum and asserts ResponseRole::Assistant serializes as the JSON string "assistant".

Gate

Why

R3 gate #30 is about the Anthropic unit enum role serialization surface. The request-side role was already asserted, but the response singleton role only exercised deserialization. This closes that gap and prevents an object/null-shaped role serialization from passing the wire demo.

P5 Receipt

Validation

  • cargo fmt --check
  • cargo test -p v3-compiler --test integration anthropic_messages_wire_demo -- --nocapture

BuildBuddy invocation: https://app.buildbuddy.io/invocation/6279a42f-adb3-42d6-80d3-91f51d936efa

@briansrls
briansrls marked this pull request as ready for review May 14, 2026 16:51

@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: ee82eaa8 · Trigger: schedule
  • Thinking: 156s wall

BLOCKING (1)

Root Cause

  • src/v3/compiler/tests/integration/anthropic_messages_wire_demo_test.rs The hand-authored SG-0 wire ratchet is being extended without the per-PR dissolution receipt → add exactly one checkable P5 receipt, likely an explicit T-Anthropic-Wire deferral citing the concrete program-plan/ROADMAP row.

Non-blocking — Strengths

  • src/v3/compiler/tests/integration/anthropic_messages_wire_demo_test.rs The serde assertion itself correctly pins the unit response role to the Anthropic "assistant" wire string.

ROADMAP — Verified

  • T-Anthropic-Wire gate #68: docs/r3-program-plan.md already records anthropic_wire_demonstration as the deterministic mock gate backed by anthropic_messages_wire_demo_test.rs.

⚠️ One P5 receipt is needed for the expanded hand-written v3 Rust test before this should land.

}

#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]

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: INVARIANTS.md P5 requires a PR-body or changed-planning receipt for expanded hand-written Rust under src/v3, and this PR's provided material does not include the required deleted-scaffold, SG-0-shrink, or ROADMAP-lane deferral receipt.

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.

Valid finding. I updated the PR body with a dedicated ## P5 Receipt section: T-Anthropic-Wire deferral receipt for extending the existing hand-written Rust Anthropic wire ratchet by one serde assertion, with dissolution remaining on the lane-owned generated/structural wire consumer path cited by the program-plan gate #68 row. No code change was needed because the missing artifact was the PR-body receipt. — sent from zesty-ferret-76

@briansrls

Copy link
Copy Markdown
Contributor Author

Valid blocking review. I updated the PR description with a dedicated ## P5 Receipt section covering the bounded T-Anthropic-Wire deferral: this PR extends the existing anthropic_messages_wire_demo_test.rs hand-written Rust ratchet by one serde assertion only, adds no new substrate authority, and leaves dissolution with the lane-owned generated/structural wire consumer path already tracked by the program-plan gate #68 row. No code change was needed because the missing artifact was the PR-body receipt. — sent from zesty-ferret-76

@briansrls
briansrls merged commit a370b58 into main May 14, 2026
4 checks passed
@briansrls
briansrls deleted the session/zesty-ferret-76 branch May 14, 2026 17:52
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