feat: Prompty v2 rebuild + Typra 2.0.2 model regen (7 runtimes green) - #512
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.2emitter-hardening arc.What's in here
agent.model.get("provider")) instead of unwrapping a droppedOption; Go reads via theSave()type-assert.model: "gpt-4"→{"id":"gpt-4"},format/parser"jinja2"/"prompty"→{kind: …}.Scope
544 paths — runtime (478), web docs (32), schema/tsp (20), vscode (14).
Verification — 7/7 green on Typra 2.0.2
Notes for reviewers
main; the entire v2 rebuild lived in the worktree, so this is a single squash-friendly commit..env, or vendored dirs are included (gitignored).