Repository navigation
Project deployment rules and error codes from Go - #512
Merged
Merged
Conversation
The TypeScript client now reads the deployment bounds and Runtime release patterns from a projection that specification-contract generates from sandbox/deployment_contract.go, so Web accepts only Core's oac-runtime microsandbox reference. The Harness catalog generator projects the model-provider protocol names from internal/modelprovider, so every client copy includes chat_completions. A shared catalog fixture lists every error code a /core/v1 or console caller can receive outside the wire vocabulary of wire-semantics.md. A Go test requires a producer for each listed code, an exact match with core-errors.md, and a catalog entry for every other code Core's error writers produce unless it never reaches an administration caller. Web tests require both locales to localize exactly those codes. The ten administration codes that were missing are now catalogued, documented and localized; the unproduced sandbox_admin_not_configured message is deleted, and the client-only sandbox_configuration_unconfirmed code is a named client constant.
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
AGENTS.md says each rule has one authored definition, and other languages either generate it or check it against shared fixtures. The repository already does this in two ways:
cmd/specification-contract, which projects Go to Python, and the node-diagnostics fixture. This change extends those two mechanisms to rules that TypeScript copied by hand. Two of those copies had drifted. This is T2a in the architecture audit.specification-contract -writenow also generatespackages/agents-client/src/deployment-contract.ts: the resource bounds, the Runtime release patterns and the minimum disk size. The existing freshness test covers both outputs.runtime-release.ts, the inline bounds and patterns, and the numbers in the wizard help text).oac-runtime@sha256:<64 hex>formicrosandbox_ref, as Core does. It used to accept any image name.services/core/internal/api/testdata/core-errors.json(43 codes).TestCoreErrorCatalogchecks both directions. Every listed code must have a Go producer. Every literal code passed to the/core/v1error writers must be listed, documented inwire-semantics.md, or excluded with a reason.core-errors.mdtables (en and zh) and both Web locale message sets must equal the list exactly.sandbox_admin_not_configured, which had no producer, is deleted.modelprovider.Protocols()is the source, and the Harness catalog generator projects it intoharness-catalog.ts.core-error.tswas missingchat_completions.Behaviour
oac-runtimemicrosandbox_ref.allowed_protocolsdetail that includeschat_completionsnow gets the localized message.Checks
specification-contract -writeandmake check-harness-catalog(no diff).go build ./...andgo vet ./....tscfor agents-client and Web, plus vitest (739 client tests, 384 Web tests).check-names.py.Net: code +54 lines (the generator wiring and 20 new locale messages); tests and fixture +192.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.