Skip to content

feat: Prompty v2 rebuild + Typra 2.0.2 model regen (7 runtimes green) - #512

Merged
Seth Juarez (sethjuarez) merged 2 commits into
mainfrom
sethjuarez/typra-model-regen
Aug 28, 2026
Merged

feat: Prompty v2 rebuild + Typra 2.0.2 model regen (7 runtimes green)#512
Seth Juarez (sethjuarez) merged 2 commits into
mainfrom
sethjuarez/typra-model-regen

Conversation

@sethjuarez

Copy link
Copy Markdown
Member

Summary

Regenerates all seven Prompty v2 runtimes (Python, TypeScript, C#, Go, Rust, Java, Swift) against the Typra emitter 2.0.2 model layer, establishing TypeSpec as the single source of truth for the generated model / seam / dispatch / vector surface.

This is the landing PR for the 2.0.0 → 2.0.1 → 2.0.2 emitter-hardening arc.

What's in here

Scope

544 paths — runtime (478), web docs (32), schema/tsp (20), vscode (14).

Verification — 7/7 green on Typra 2.0.2

Runtime Result
Rust 720 / 0
Python 1754 passed
C# 1519 + 212 + 13 / 0 failed
Java BUILD SUCCESSFUL
Swift exit 0
TypeScript green
Go all packages ok

Notes for reviewers

Regenerate all seven Prompty v2 runtimes (Python, TypeScript, C#, Go, Rust,
Java, Swift) against the Typra emitter 2.0.2 model layer, with TypeSpec as the
single source of truth for the generated model/seam/dispatch/vector surface.

Highlights of the 2.0.0 -> 2.0.1 -> 2.0.2 arc landed here:
- Value-backed coerce-union lowering fixed (BUG1/BUG2/BUG3): value-backed
  optional fields read discriminators directly (e.g. agent.model.get("provider"))
  instead of unwrapping a dropped Option; Go reads via the Save() type-assert.
- Systemic load-path coerce expansion: bare-string shorthands expand on load
  (model: "gpt-4" -> {"id":"gpt-4"}, format/parser "jinja2"/"prompty" -> {kind}).
- Hand-authored surface limited to seam/vector conformance provider doubles and
  the jinja-subset engine; routing goes through the emitted adapter-discovery
  resolvers.

Verification: 7/7 runtimes green on Typra 2.0.2 (Rust 720/0, Python 1754,
C# 1519+212+13/0, Java BUILD SUCCESSFUL, Swift exit 0, TypeScript green,
Go all packages ok).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 19d2f1a9-b9b4-457d-8235-251c374c31f2
The committed generated tree was produced by a local/linked @typra/emitter
build; CI installs the npm-published 2.0.2, which surfaced two emitter
regressions plus an authored-format miss.

- Go dead `fmt` import: published 2.0.2 emits an unused `"fmt"` import in
  the value-backed coerce-union loaders (model/format_config/parser_config).
  goimports (dev-only) strips it, but the schema-repro-check CI job has only
  gofmt, which keeps it, breaking `go build` and the regen gate. Strip it
  deterministically in normalize-typra-output.mjs so output is reproducible
  without goimports (validated with goimports removed from PATH).
- Swift processor `provider()` collision: the processor conformance tests
  read the discriminator into `let provider` which shadows the registry
  accessor `provider()`; rename the local to `providerKind` in normalize.
- Python: ruff format on authored core/pipeline.py (not covered by the
  emitter's format pass on prompty/model).

Both emitter workarounds are commented as temporary, pending a typra 2.0.3.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 19d2f1a9-b9b4-457d-8235-251c374c31f2
@sethjuarez
Seth Juarez (sethjuarez) merged commit 5360d90 into main Aug 28, 2026
39 checks passed
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