Skip to content

chore(schema): bump @typra/emitter to 0.4.20 and regenerate - #448

Closed
Seth Juarez (sethjuarez) wants to merge 2 commits into
mainfrom
sethjuarez/bump-typra-0.4.20
Closed

chore(schema): bump @typra/emitter to 0.4.20 and regenerate#448
Seth Juarez (sethjuarez) wants to merge 2 commits into
mainfrom
sethjuarez/bump-typra-0.4.20

Conversation

@sethjuarez

Copy link
Copy Markdown
Member

Bumps schema/package.json from @typra/emitter@0.4.2 to 0.4.20 and regenerates the runtime model code.

Two commits, kept separate: the pin edit, then the pure regeneration. No handwritten edits.

Why the jump from 0.4.2

typra's 0.4.3 through 0.4.18 were published from an unmerged branch, so its main declared 0.4.2 while npm latest was 0.4.18. That branch has since been merged, and 0.4.20 is the first release cut from main since 0.4.2.

Measured effect on this repository

Baseline is this branch's merge-base (c4e7bd49) with its committed generated output.

Suite before after
go test ./... 44 failed 2 failed
TypeScript (4 workspaces) 63 failed 10 failed

Zero generated-test failures remain in either backend.

Every remaining failure, attributed

All 12 are in handwritten tests. TestReferenceTurnRunnerMatchesSharedGoldenReplayVectors was re-run against c4e7bd49 and fails there too - it is pre-existing, not a regression from this bump.

Go (2) - TestReferenceTurnRunnerMatchesSharedGoldenReplayVectors and its permission_denied subtest, package prompty/model.

TypeScript (10)

File n Tests
tests/harness/turn-runner.test.ts 1 golden replay journal vectors
tests/loader.test.ts 5 allowedFileRoots; 4 structured-output tests
tests/models.test.ts 2 Azure modalities, OpenAI unknown-model enrichment
tests/spec-vectors.test.ts 2 empty_frontmatter_body_only, tools_mcp_load

Emitter fixes included

typra issue Fix
#37 Non-abstract polymorphic bases absorb unclaimed discriminator values
#38 Open discriminators are no longer pre-validated ahead of dispatch
#39 Go numeric coercions bridge encoding/json float64 and yaml.v3 int
#46 Named-collection round-trips, including duplicate and unnamed entries
#47 Diagnostic paths carry array element indices, e.g. messages[3].role
#53 Generated tests synthesize required complex fields from nested samples
#54 Go abstract-open discriminators absorb unknown kinds into the base
#56 TypeScript dictionary-load tests use the built example payload
#64 TypeScript never emits a generated test file with no test cases

#53 is the one that moved the numbers: buildExamples() omitted required complex properties that carried no @sample, so a generated test could not pass its own generated validation.

Reproducibility

Regenerated twice - once from a local npm pack tarball, once from the published 0.4.20 on the registry. Both produced an identical 1168-file diff, so the published package reproduces the build.

Not verified

  • This repository's Rust and C# suites were not run for this bump.
  • Python does not build (uv pip install -e ".[dev,all]" fails with ModuleNotFoundError: No module named 'prompty' inside its own build isolation) - tracked as typra#43.
  • The 10 TypeScript failures were not individually bisected against c4e7bd49; only the Go golden-vector test was confirmed pre-existing by direct re-run.

0.4.20 is the first release cut from typra's `main` since 0.4.2. Versions
0.4.3 through 0.4.18 were published from an unmerged branch, so this pin moves
from 0.4.2 straight to the current `latest`.

Regeneration follows in the next commit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pure regeneration - `npm run generate` in `schema/`, no handwritten edits.

This pulls in every emitter fix that accumulated behind typra's unmerged PR
stack, plus the defects found and fixed while landing it.

Measured effect on this repository's suites:

  go test ./...                58 failed -> 2 failed
  TypeScript (4 workspaces)    63 failed -> 10 failed

Zero generated-test failures remain in either backend. All 12 remaining
failures are in handwritten tests and are unrelated to code generation:

  Go (2)
    TestReferenceTurnRunnerMatchesSharedGoldenReplayVectors and its
    permission_denied subtest, package prompty/model.

  TypeScript (10)
    tests/harness/turn-runner.test.ts  (1) golden replay journal vectors
    tests/loader.test.ts               (5) allowedFileRoots, structured output
    tests/models.test.ts               (2) Azure modalities, OpenAI enrichment
    tests/spec-vectors.test.ts         (2) empty_frontmatter_body_only,
                                           tools_mcp_load

Emitter fixes included, by typra issue:

  #37  non-abstract polymorphic bases absorb unclaimed discriminator values
  #38  open discriminators are no longer pre-validated ahead of dispatch
  #39  Go numeric coercions bridge encoding/json float64 and yaml.v3 int
  #46  named-collection round-trips, including duplicate and unnamed entries
  #47  diagnostic paths carry array element indices, e.g. messages[3].role
  #53  generated tests synthesize required complex fields from nested samples
  #54  Go abstract-open discriminators absorb unknown kinds into the base
  #56  TypeScript dictionary-load tests use the built example payload
  #64  TypeScript never emits a generated test file with no test cases

Not verified: this repository's Rust, C# and Python suites were not run for
this bump. Python does not build (typra#43).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 5, 2026 19:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@@ -23,6 +23,9 @@ type AiResourceInfo struct {

// LoadAiResourceInfo creates a AiResourceInfo from a map[string]interface{}
func LoadAiResourceInfo(data interface{}, ctx *LoadContext) (AiResourceInfo, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -20,6 +20,9 @@ type AnthropicImageSource struct {

// LoadAnthropicImageSource creates a AnthropicImageSource from a map[string]interface{}
func LoadAnthropicImageSource(data interface{}, ctx *LoadContext) (AnthropicImageSource, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -19,6 +19,9 @@ type AnthropicTextBlock struct {

// LoadAnthropicTextBlock creates a AnthropicTextBlock from a map[string]interface{}
func LoadAnthropicTextBlock(data interface{}, ctx *LoadContext) (AnthropicTextBlock, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -22,6 +22,9 @@ type AnthropicToolDefinition struct {

// LoadAnthropicToolDefinition creates a AnthropicToolDefinition from a map[string]interface{}
func LoadAnthropicToolDefinition(data interface{}, ctx *LoadContext) (AnthropicToolDefinition, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -20,6 +20,9 @@ type AnthropicToolResultBlock struct {

// LoadAnthropicToolResultBlock creates a AnthropicToolResultBlock from a map[string]interface{}
func LoadAnthropicToolResultBlock(data interface{}, ctx *LoadContext) (AnthropicToolResultBlock, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -21,6 +21,9 @@ type AnthropicWireMessage struct {

// LoadAnthropicWireMessage creates a AnthropicWireMessage from a map[string]interface{}
func LoadAnthropicWireMessage(data interface{}, ctx *LoadContext) (AnthropicWireMessage, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -22,6 +22,9 @@ type AnthropicToolUseBlock struct {

// LoadAnthropicToolUseBlock creates a AnthropicToolUseBlock from a map[string]interface{}
func LoadAnthropicToolUseBlock(data interface{}, ctx *LoadContext) (AnthropicToolUseBlock, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -19,6 +19,9 @@ type AnthropicUsage struct {

// LoadAnthropicUsage creates a AnthropicUsage from a map[string]interface{}
func LoadAnthropicUsage(data interface{}, ctx *LoadContext) (AnthropicUsage, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -19,6 +19,9 @@ type AuthorizationCodeFlow struct {

// LoadAuthorizationCodeFlow creates a AuthorizationCodeFlow from a map[string]interface{}
func LoadAuthorizationCodeFlow(data interface{}, ctx *LoadContext) (AuthorizationCodeFlow, error) {
if ctx == nil {
ctx = NewLoadContext()
@@ -20,6 +20,9 @@ type CompactionCompletePayload struct {

// LoadCompactionCompletePayload creates a CompactionCompletePayload from a map[string]interface{}
func LoadCompactionCompletePayload(data interface{}, ctx *LoadContext) (CompactionCompletePayload, error) {
if ctx == nil {
ctx = NewLoadContext()
@sethjuarez

Copy link
Copy Markdown
Member Author

Superseded by #453, which pins 0.4.21 instead. 0.4.21 ships the #59 fix (typra sethjuarez/typra#67) on top of everything in 0.4.20, so there is no reason to land the 0.4.20 pin first.

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.

2 participants