Conformance waiver removal: Go providers (#490) + normalize-script cleanup (#485) - #498
Merged
Seth Juarez (sethjuarez) merged 3 commits intoAug 23, 2026
Merged
Conversation
typra#262 shipped in @typra/emitter@1.0.1: the Go test emitter now preserves the `prompty/model` import in generated `package prompty_test` files natively. Verified empirically — a raw `tsp compile` (no normalize) produces zero Go drift and zero `_test.go` files missing the import, and `go build`/`go vet`/`go test ./model/...` all pass after removing the workaround. Delete the obsolete `restoreGoModelImport` call and function. The `restoreSwiftPackageResources` workaround is intentionally left in place: it remains load-bearing (see follow-up on #485). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 911c4d26-ea96-42cf-a022-47e29fc9df73
The old comment claimed this workaround could be removed "once #260 ships and the emitter preserves the stanza natively." #260 shipped in @typra/emitter@1.0.1 as the `test-resources` option, but that option only attaches resources to the Swift *test* target. The main PromptyModel target's `Bundle.module` is required by the public `Discovery` API in production source (Sources/PromptyModel/Discovery.swift), and SwiftPM only synthesizes `Bundle.module` for a target that owns resources. Verified empirically: mirroring `test-resources` (resources on the test target only) makes `swift test` fail to compile the main target with "type 'Bundle' has no member 'module'". The emitter exposes no main-target resources option, so this re-injection stays load-bearing. Rewrite the comment to record this constraint and point fully removing it at the Swift split-package work (#487). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 911c4d26-ea96-42cf-a022-47e29fc9df73
Go previously shipped only the jinjasubset/model/vectoradapters packages —
no provider/executor layer and no real API client. Add a hand-written
`providers` package that plugs into the model's conformance-tested wire
pipeline, matching the C# provider set.
Design: executors stay thin. Each Execute builds the canonical wire-input
map via providers.BuildInput(agent, messages, wireFamily), delegates body
construction to model.BuildWireRequest, resolves the connection, and POSTs
via providers.PostJSON. Processors delegate to model.ProcessResponse. The
HTTP transport is intentionally outside the conformance surface (vectors
exercise BuildWireRequest/ProcessResponse directly), so parity here means:
implement the Executor/Processor interfaces, map Agent -> wire input,
resolve connections, register by provider key, and format tool-call turns.
Packages:
- providers registry (Register/Get Executor+Processor, RWMutex),
BuildInput, messagesToWire (media Source->value),
ResolveConnection, PostJSON, FormatChatToolMessages.
- providers/openai key "openai"; Bearer auth; OPENAI_API_KEY fallback;
chat/embeddings/images/responses path dispatch.
- providers/anthropic key "anthropic"; x-api-key + anthropic-version;
ANTHROPIC_API_KEY fallback; rejects reference conns;
Anthropic tool-turn shape (assistant content blocks +
batched user tool_result).
- providers/foundry key "foundry"; Azure deployment URL + api-version +
api-key header; keyless path uses
AZURE_OPENAI_ACCESS_TOKEN bearer against /openai/v1;
AZURE_OPENAI_ENDPOINT/API_KEY fallbacks.
Media parts map their Source field to the "value" wire key the builders
consume (not .Save()'s "source"), matching model/wire.go's contract.
Tests use httptest to assert URL/path, auth headers, and request body per
provider, plus registry wiring, connection resolution, tool-message
formatting, and streaming-unsupported errors. No real API calls.
go build/vet/test ./... all green.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 911c4d26-ea96-42cf-a022-47e29fc9df73
Seth Juarez (sethjuarez)
deleted the
sethjuarez/conformance-waiver-removal
branch
August 23, 2026 22:16
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
Part of the conformance-waiver-removal effort. This branch lands two completed, verified issues and documents findings on the rest. No issues are auto-closed (
Refs, notCloses) — closing is left to review.Committed & verified
fix(#485): delete the deadrestoreGoModelImportcall + function — Go test imports are preserved natively by the emitter (typra#262).docs(#485): correct therestoreSwiftPackageResourcesrationale.go build,go vet,go testall green.Investigated → documented (no code in this PR)
harness-test-dirrelocation is mechanically proven, but a clean 0-waiver relocation is blocked onrun/runTurnobservability (vectors assert a rich projection produced only by the model-levelAgentLoopEngine; the SDK productionturn()exposes only the final result). Needs a maintainer design decision — see issue comment for full evidence.sync:adapters wrap genuinely-sync reference engines (honest, not stand-ins); entangled with test(swift): reach provider-stage @vector coverage once typra#261 supports split-package harness #487 and blocked on the same decision. Python/TS already satisfy it.Deferred (environment/scope)
Test plan
schema: regen (npm run generate) produces zero drift with therestoreGoModelImportworkaround removed.runtime/go:go build ./... && go vet ./... && go test ./...green.