Skip to content

fix: salvage nested strict-mode (#441) and Anthropic transport hardening (#443) onto 0.9.0 - #481

Merged
Seth Juarez (sethjuarez) merged 3 commits into
mainfrom
sejuare-microsoft/potential-waddle
Aug 18, 2026
Merged

Seth Juarez (sethjuarez) merged 3 commits into
mainfrom
sejuare-microsoft/potential-waddle

Conversation

@sethjuarez

Copy link
Copy Markdown
Member

What

Salvages the two genuinely-still-missing fixes from the 11 conflicting in-flight PRs (#433, #436-#444, #447), re-authored against current main (emitter 0.9.0 + reorganized schema layout) and verified.

The other 9 PRs are effectively stale: they share a pre-reorg merge-base (~36 commits behind) and predate the @typra/emitter 0.4.x -> 0.9.0 jump and the schema/model/ reorg (contracts/, conformance/, operations/, wire/) with generated-model relocation across 7 runtimes. Rather than fabricate an unbuildable ~90k-line merge, this branch carries only the two fixes whose value is not already present on main.

Commits

  • fix(openai): require nested strict schema fields #441 - Nested strict-mode schema: optionals become nullable, all object props required. New structured_output_nested_optional conformance vector authored in wire.tsp source and regenerated to vectors.json (vectors stay TSP-owned). Verified: cargo test -p prompty-openai (80 lib + 27 wire_vectors incl. the new vector).
  • fix(rust): harden Anthropic transport failures #443 - Anthropic transport hardening: new endpoint.rs::build_api_url with ANTHROPIC_BASE_URL env fallback + idempotent /v1; executor/models delegate to it. Verified: cargo test -p prompty-anthropic (55 tests); full rust workspace builds clean.

Recommendation for remaining PRs

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…itter 0.9.0)

Salvages the still-valid correctness fix from PR #441, re-authored for main's
current state (schema reorg + @typra/emitter 0.9.0):

- prompty-openai wire.rs: in OpenAI strict mode, every object property must
  appear in 
equired (optional fields are represented as nullable).
- Vector structured_output_nested_optional authored at its NEW source of
  truth schema/model/conformance/vectors/wire.tsp; �ectors.json and the
  generated python conformance test are regenerated via
pm run generate
  (not hand-edited). PR #441's edit to the legacy spec/vectors/wire/
  wire_vectors.json is dropped since main removed that catalog.
- spec.md / wire-format.mdx: document the recursive strict-mode rule.

Verified: cargo test -p prompty-openai (lib + wire_vectors) 107 passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Salvages PR #443, re-merged onto main's evolved prompty-anthropic crate:

- Add endpoint.rs with shared build_api_url(): adds ANTHROPIC_BASE_URL env
  fallback and idempotent /v1 handling that main's inline build_url lacked.
- executor.rs and models.rs now delegate URL construction to the shared
  helper; classify transport/SSE failures as the PR intended.
- Conflict resolution: kept main's Agent type name (PR predated the
  Prompty->Agent rename) while adopting the PR's ANTHROPIC_BASE_URL test
  env guards.

Verified: cargo test -p prompty-anthropic — 55 lib + wire/discovery/vectors
tests pass; live integration tests remain env-gated (ignored).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The #441 salvage added the structured_output_nested_optional vector to
wire.tsp and regenerated vectors.json + the Python conformance test, but
the generated TypeScript vector-conformance.test.ts was inadvertently
reverted along with unrelated prettier formatting churn. Regenerated with
the TS workspace installed (prettier present) so only the genuine vector
addition remains. Fixes the 'regeneration produces no diff' CI gate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@sethjuarez
Seth Juarez (sethjuarez) merged commit 345f767 into main Aug 18, 2026
31 checks passed
@sethjuarez
Seth Juarez (sethjuarez) deleted the sejuare-microsoft/potential-waddle branch August 19, 2026 03:21
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