From 11a5dba7246fc66f926a613fd05b6328ba1f1d5a Mon Sep 17 00:00:00 2001 From: Fuad Daoud Date: Tue, 8 Sep 2026 01:19:45 +0300 Subject: [PATCH 1/2] feat(ir)!: bump IRVersion to 0.4.0 for this branch's shape changes Six commits on this branch change the JSON shape of a Document and none bumped the constant, each correctly deferring per ir-design 2.1: a line of work bumps it ONCE, where it lands on main. This is that bump. The GoDoc on IRVersion names exactly the failure a missing bump causes -- "a shape change that reaches main without a bump leaves a consumer pinned to the old version accepting a document it cannot read, which is the one thing this constant exists to prevent" -- and nothing in the gate can see it, because TestVerify_CurrentIRVersionIsClean, TestVerify_IncompatibleIRVersionIsAViolation and openapi_test.go all compare against the same constant and stay green whatever it says. Found by review, not by CI. The log paragraph records all six, each framed as what a 0.3.0 consumer gets wrong rather than as a feature: ErrorCase loses Type and gains Name/Payload/ Headers; Payload gains Required; Parameter gains Provenance; Deprecation gains RemovalDate and x-sunset routes there; Encoding gains Schema; and Constraints.ExclusiveMin/Max change from bool to a decimal string, which is the one that fails a consumer's decode rather than degrading it. TestCompatibleVersion's neighbour rows were spelled against 0.3.0, so the bump made "a later generation" 0.4.0 assert that the build rejects its own documents. Re-anchored, with a comment saying they move with the constant. 79 goldens regenerated; the only key that moved is irVersion. BREAKING CHANGE: IR documents now stamp 0.4.0 and CompatibleVersion refuses 0.3.0. Consumers must recompile rather than migrate stored documents. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SYeBgDsskwnyitLgPGCPn1 --- ir/document.go | 29 ++++++++++++++----- ir/document_test.go | 11 +++++-- .../openapi/allof-boolean-branch.golden.json | 2 +- .../allof-conflicting-type.golden.json | 2 +- .../openapi/allof-inheritance.golden.json | 2 +- .../openapi/allof-inline-merge.golden.json | 2 +- .../openapi/allof-inline-residue.golden.json | 2 +- .../openapi/allof-mixins.golden.json | 2 +- .../allof-oneof-cooccurrence.golden.json | 2 +- .../allof-ref-branch-siblings.golden.json | 2 +- .../openapi/allof-required-only.golden.json | 2 +- .../openapi/anyof-untagged.golden.json | 2 +- .../conformance/openapi/callbacks.golden.json | 2 +- .../openapi/codeclared-keywords.golden.json | 2 +- .../codeclared-schema-content.golden.json | 2 +- .../openapi/component-reuse.golden.json | 2 +- .../openapi/constraints.golden.json | 2 +- .../openapi/content-vocabulary.golden.json | 2 +- .../conformance/openapi/defaults.golden.json | 2 +- .../openapi/dependent-required.golden.json | 2 +- .../openapi/deprecation.golden.json | 2 +- .../openapi/dialect-keywords.golden.json | 2 +- .../discriminator-default-mapping.golden.json | 2 +- .../discriminator-inheritance.golden.json | 2 +- .../discriminator-transitive.golden.json | 2 +- .../openapi/docs-summary-desc.golden.json | 2 +- .../openapi/dynamic-ref.golden.json | 2 +- .../openapi/empty-enum.golden.json | 2 +- .../openapi/empty-names.golden.json | 2 +- .../openapi/encoding-byte.golden.json | 2 +- .../openapi/enum-numeric.golden.json | 2 +- .../openapi/enum-string.golden.json | 2 +- .../conformance/openapi/examples.golden.json | 2 +- .../openapi/extension-promotion.golden.json | 2 +- .../openapi/extensions-x.golden.json | 2 +- .../conformance/openapi/file-body.golden.json | 2 +- .../openapi/header-content-schema.golden.json | 2 +- .../openapi/http-binding.golden.json | 2 +- .../openapi/inline-annotations.golden.json | 2 +- .../inline-hoist-positions.golden.json | 2 +- .../openapi/inline-residue.golden.json | 2 +- .../openapi/inline-types.golden.json | 2 +- .../openapi/literal-const.golden.json | 2 +- testdata/conformance/openapi/maps.golden.json | 2 +- .../openapi/multi-content.golden.json | 2 +- .../openapi/multipart-encoding.golden.json | 2 +- .../openapi/named-types.golden.json | 2 +- .../openapi/negation-not.golden.json | 2 +- .../openapi/neutral-naming.golden.json | 2 +- .../nullability-conjunction.golden.json | 2 +- .../nullability-four-states.golden.json | 2 +- .../openapi/nullable-30.golden.json | 2 +- .../openapi/nullable-31-ref.golden.json | 2 +- .../openapi/nullable-enum-31.golden.json | 2 +- .../openapi/numeric-precision.golden.json | 2 +- .../openapi/oneof-discriminated.golden.json | 2 +- .../openapi/param-querystring.golden.json | 2 +- .../openapi/param-ref-inheritance.golden.json | 2 +- .../openapi/param-style-matrix.golden.json | 2 +- .../openapi/param-styles.golden.json | 2 +- .../openapi/param-xml-residue.golden.json | 2 +- .../openapi/path-item-docs.golden.json | 2 +- .../openapi/path-item-operations.golden.json | 2 +- .../openapi/per-status-errors.golden.json | 2 +- .../openapi/readonly-writeonly.golden.json | 2 +- .../conformance/openapi/recursive.golden.json | 2 +- .../openapi/response-links.golden.json | 2 +- .../openapi/scalar-format.golden.json | 2 +- .../openapi/security-or-and.golden.json | 2 +- .../openapi/security-schemes.golden.json | 2 +- .../openapi/sequential-media.golden.json | 2 +- .../openapi/servers-variables.golden.json | 2 +- .../shared-response-across-status.golden.json | 2 +- .../openapi/streaming-media-30.golden.json | 2 +- .../openapi/streaming-media-31.golden.json | 2 +- .../openapi/tags-grouping.golden.json | 2 +- .../openapi/tuples-prefixitems.golden.json | 2 +- .../openapi/unhomed-keywords.golden.json | 2 +- .../conformance/openapi/webhooks.golden.json | 2 +- .../conformance/openapi/xml-hints.golden.json | 2 +- .../yaml-timestamp-scalars.golden.json | 2 +- testdata/golden/openapi/petstore.golden.json | 2 +- 82 files changed, 110 insertions(+), 90 deletions(-) diff --git a/ir/document.go b/ir/document.go index 2f3d361f..4cb15313 100644 --- a/ir/document.go +++ b/ir/document.go @@ -20,13 +20,28 @@ package ir // "preserved" is now "unmodeled". A consumer pinned to 0.2.0 finds no key it // recognizes and drops every unmodeled construct in silence. // -// In flight: the stack/* branches (dexpace/morphic #436–#442) change the shape -// under this version — Payload gains "required", Parameter a non-omitempty -// "provenance", and more above them — and the bump to 0.4.0 lands with the -// top of that stack (#442). The stack squash-merges bottom-up, so a main -// between the first of those and the last carries a 0.4.0 shape stamped -// 0.3.0; this paragraph goes with the bump. -const IRVersion = "0.3.0" +// 0.4.0 covers six shape changes made together, all of them closing a gap a +// consumer had to read around rather than adding a capability: +// +// - ErrorCase becomes Response's sibling: Type is REMOVED, and Name, Payload +// and Headers take its place. A consumer pinned to 0.3.0 finds no "type" on +// an error case and cannot reach its models at all; one that reads the new +// fields gets the status spelling, the headers and every media type, which +// 0.3.0 dumped into Unmodeled whatever their arity. +// - Payload gains Required. Body optionality stopped being an inverted +// Unmodeled sentinel read by absence, so a consumer that still reads +// "openapi:required" now finds nothing and reads every body as required. +// - Parameter gains Provenance, non-omitempty, and with it x-sunset promotion +// at the parameter position. +// - Deprecation gains RemovalDate. x-sunset promotes into it rather than into +// RemovalVersion, so a consumer reading a removal date off the version field +// now finds it empty. +// - Encoding gains Schema, giving contentSchema a home at scalar positions. +// - Constraints.ExclusiveMin and ExclusiveMax change from bool to a decimal +// string carrying the bound itself, so the two dialects' exclusive bounds no +// longer lose one keyword to the other. The JSON type of both keys changed; +// a consumer decoding them as booleans fails rather than degrades. +const IRVersion = "0.4.0" // CompatibleVersion reports whether a document stamped version can be read by // this build. It is the predicate behind the compatibility policy in diff --git a/ir/document_test.go b/ir/document_test.go index a4ba07c8..69f33b05 100644 --- a/ir/document_test.go +++ b/ir/document_test.go @@ -81,9 +81,14 @@ func TestCompatibleVersion(t *testing.T) { }{ {"this build's version", ir.IRVersion, true}, {"absent", "", false}, - {"an earlier generation", "0.1.0", false}, - {"a later generation", "0.4.0", false}, - {"a differing patch", "0.3.1", false}, + // These three are spelled relative to IRVersion and MOVE WITH IT. The + // neighbour rows are the point of the test, so a bump that leaves them + // behind stops testing what they name — at 0.4.0 the old "later + // generation" literal WAS the current version, and the row asserted the + // build rejects its own documents. + {"the generation before this one", "0.3.0", false}, + {"a later generation", "0.5.0", false}, + {"a differing patch", "0.4.1", false}, {"a prerelease of this version", ir.IRVersion + "-rc.1", false}, {"padded with whitespace", " " + ir.IRVersion + " ", false}, {"not a version at all", "99.99.99-bogus", false}, diff --git a/testdata/conformance/openapi/allof-boolean-branch.golden.json b/testdata/conformance/openapi/allof-boolean-branch.golden.json index a89a7550..d28ed7d4 100644 --- a/testdata/conformance/openapi/allof-boolean-branch.golden.json +++ b/testdata/conformance/openapi/allof-boolean-branch.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfBooleanBranch", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-conflicting-type.golden.json b/testdata/conformance/openapi/allof-conflicting-type.golden.json index 6ce9cfed..651ee8f7 100644 --- a/testdata/conformance/openapi/allof-conflicting-type.golden.json +++ b/testdata/conformance/openapi/allof-conflicting-type.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfConflictingType", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-inheritance.golden.json b/testdata/conformance/openapi/allof-inheritance.golden.json index 3c203a34..93836c42 100644 --- a/testdata/conformance/openapi/allof-inheritance.golden.json +++ b/testdata/conformance/openapi/allof-inheritance.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfInheritance", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-inline-merge.golden.json b/testdata/conformance/openapi/allof-inline-merge.golden.json index 690ae16f..b3c2dd52 100644 --- a/testdata/conformance/openapi/allof-inline-merge.golden.json +++ b/testdata/conformance/openapi/allof-inline-merge.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfInlineMerge", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-inline-residue.golden.json b/testdata/conformance/openapi/allof-inline-residue.golden.json index ecd05813..6a652ec2 100644 --- a/testdata/conformance/openapi/allof-inline-residue.golden.json +++ b/testdata/conformance/openapi/allof-inline-residue.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfInlineResidue", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-mixins.golden.json b/testdata/conformance/openapi/allof-mixins.golden.json index 6fcf58b1..d50c698f 100644 --- a/testdata/conformance/openapi/allof-mixins.golden.json +++ b/testdata/conformance/openapi/allof-mixins.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfMixins", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-oneof-cooccurrence.golden.json b/testdata/conformance/openapi/allof-oneof-cooccurrence.golden.json index 75e7b04b..d6998506 100644 --- a/testdata/conformance/openapi/allof-oneof-cooccurrence.golden.json +++ b/testdata/conformance/openapi/allof-oneof-cooccurrence.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfOneOfCooccurrence", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-ref-branch-siblings.golden.json b/testdata/conformance/openapi/allof-ref-branch-siblings.golden.json index 6b66caa3..956d6f20 100644 --- a/testdata/conformance/openapi/allof-ref-branch-siblings.golden.json +++ b/testdata/conformance/openapi/allof-ref-branch-siblings.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfRefBranchSiblings", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/allof-required-only.golden.json b/testdata/conformance/openapi/allof-required-only.golden.json index e4c56262..cf0c62c1 100644 --- a/testdata/conformance/openapi/allof-required-only.golden.json +++ b/testdata/conformance/openapi/allof-required-only.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AllOfRequiredOnly", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/anyof-untagged.golden.json b/testdata/conformance/openapi/anyof-untagged.golden.json index 54f450c8..8292b3fb 100644 --- a/testdata/conformance/openapi/anyof-untagged.golden.json +++ b/testdata/conformance/openapi/anyof-untagged.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "AnyOfUntagged", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/callbacks.golden.json b/testdata/conformance/openapi/callbacks.golden.json index c6805e16..bbfb2a52 100644 --- a/testdata/conformance/openapi/callbacks.golden.json +++ b/testdata/conformance/openapi/callbacks.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Callbacks", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/codeclared-keywords.golden.json b/testdata/conformance/openapi/codeclared-keywords.golden.json index 3987666d..5684ff4f 100644 --- a/testdata/conformance/openapi/codeclared-keywords.golden.json +++ b/testdata/conformance/openapi/codeclared-keywords.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "CoDeclaredKeywords", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/codeclared-schema-content.golden.json b/testdata/conformance/openapi/codeclared-schema-content.golden.json index abb44b28..576ebe9f 100644 --- a/testdata/conformance/openapi/codeclared-schema-content.golden.json +++ b/testdata/conformance/openapi/codeclared-schema-content.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "CoDeclaredSchemaContent", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/component-reuse.golden.json b/testdata/conformance/openapi/component-reuse.golden.json index 051fa368..adb42d53 100644 --- a/testdata/conformance/openapi/component-reuse.golden.json +++ b/testdata/conformance/openapi/component-reuse.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Component Reuse", "version": "1", "docs": {}, diff --git a/testdata/conformance/openapi/constraints.golden.json b/testdata/conformance/openapi/constraints.golden.json index a4dfba39..72bdb7da 100644 --- a/testdata/conformance/openapi/constraints.golden.json +++ b/testdata/conformance/openapi/constraints.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Constraints", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/content-vocabulary.golden.json b/testdata/conformance/openapi/content-vocabulary.golden.json index c8179d6b..e2ed544a 100644 --- a/testdata/conformance/openapi/content-vocabulary.golden.json +++ b/testdata/conformance/openapi/content-vocabulary.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ContentVocabulary", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/defaults.golden.json b/testdata/conformance/openapi/defaults.golden.json index 21afdf2d..d43a88dd 100644 --- a/testdata/conformance/openapi/defaults.golden.json +++ b/testdata/conformance/openapi/defaults.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Defaults", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/dependent-required.golden.json b/testdata/conformance/openapi/dependent-required.golden.json index b3bc85af..67461d5f 100644 --- a/testdata/conformance/openapi/dependent-required.golden.json +++ b/testdata/conformance/openapi/dependent-required.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "DependentRequired", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/deprecation.golden.json b/testdata/conformance/openapi/deprecation.golden.json index fe0e51e7..a391e92f 100644 --- a/testdata/conformance/openapi/deprecation.golden.json +++ b/testdata/conformance/openapi/deprecation.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Deprecation", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/dialect-keywords.golden.json b/testdata/conformance/openapi/dialect-keywords.golden.json index 188cdf10..ec80c1ec 100644 --- a/testdata/conformance/openapi/dialect-keywords.golden.json +++ b/testdata/conformance/openapi/dialect-keywords.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "DialectKeywords", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/discriminator-default-mapping.golden.json b/testdata/conformance/openapi/discriminator-default-mapping.golden.json index c23ba2a8..1f92bd32 100644 --- a/testdata/conformance/openapi/discriminator-default-mapping.golden.json +++ b/testdata/conformance/openapi/discriminator-default-mapping.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "DiscriminatorDefaultMapping", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/discriminator-inheritance.golden.json b/testdata/conformance/openapi/discriminator-inheritance.golden.json index 25b7a29e..51be5c98 100644 --- a/testdata/conformance/openapi/discriminator-inheritance.golden.json +++ b/testdata/conformance/openapi/discriminator-inheritance.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "DiscriminatorInheritance", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/discriminator-transitive.golden.json b/testdata/conformance/openapi/discriminator-transitive.golden.json index 9dc8b491..41ec0101 100644 --- a/testdata/conformance/openapi/discriminator-transitive.golden.json +++ b/testdata/conformance/openapi/discriminator-transitive.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "DiscriminatorTransitive", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/docs-summary-desc.golden.json b/testdata/conformance/openapi/docs-summary-desc.golden.json index 13f00eb9..3c74ae82 100644 --- a/testdata/conformance/openapi/docs-summary-desc.golden.json +++ b/testdata/conformance/openapi/docs-summary-desc.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "DocsSummaryDesc", "version": "1.0.0", "docs": { diff --git a/testdata/conformance/openapi/dynamic-ref.golden.json b/testdata/conformance/openapi/dynamic-ref.golden.json index b3a48790..76629038 100644 --- a/testdata/conformance/openapi/dynamic-ref.golden.json +++ b/testdata/conformance/openapi/dynamic-ref.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "DynamicRef", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/empty-enum.golden.json b/testdata/conformance/openapi/empty-enum.golden.json index db586997..a086c539 100644 --- a/testdata/conformance/openapi/empty-enum.golden.json +++ b/testdata/conformance/openapi/empty-enum.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "EmptyEnum", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/empty-names.golden.json b/testdata/conformance/openapi/empty-names.golden.json index 7687808f..81bf0d1e 100644 --- a/testdata/conformance/openapi/empty-names.golden.json +++ b/testdata/conformance/openapi/empty-names.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Empty Names", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/encoding-byte.golden.json b/testdata/conformance/openapi/encoding-byte.golden.json index c06231ca..32c40e81 100644 --- a/testdata/conformance/openapi/encoding-byte.golden.json +++ b/testdata/conformance/openapi/encoding-byte.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "EncodingByte", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/enum-numeric.golden.json b/testdata/conformance/openapi/enum-numeric.golden.json index 63f63719..c7a4f36b 100644 --- a/testdata/conformance/openapi/enum-numeric.golden.json +++ b/testdata/conformance/openapi/enum-numeric.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "EnumNumeric", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/enum-string.golden.json b/testdata/conformance/openapi/enum-string.golden.json index a32a5d76..be79a795 100644 --- a/testdata/conformance/openapi/enum-string.golden.json +++ b/testdata/conformance/openapi/enum-string.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "EnumString", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/examples.golden.json b/testdata/conformance/openapi/examples.golden.json index 041b4fe6..e27de8b0 100644 --- a/testdata/conformance/openapi/examples.golden.json +++ b/testdata/conformance/openapi/examples.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Examples", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/extension-promotion.golden.json b/testdata/conformance/openapi/extension-promotion.golden.json index d4d0c4ee..bce6ca4d 100644 --- a/testdata/conformance/openapi/extension-promotion.golden.json +++ b/testdata/conformance/openapi/extension-promotion.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ExtensionPromotion", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/extensions-x.golden.json b/testdata/conformance/openapi/extensions-x.golden.json index 14e03bee..9fa8c9db 100644 --- a/testdata/conformance/openapi/extensions-x.golden.json +++ b/testdata/conformance/openapi/extensions-x.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ExtensionsX", "version": "1.0.0", "docs": { diff --git a/testdata/conformance/openapi/file-body.golden.json b/testdata/conformance/openapi/file-body.golden.json index 61c17561..a6c05e96 100644 --- a/testdata/conformance/openapi/file-body.golden.json +++ b/testdata/conformance/openapi/file-body.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "FileBody", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/header-content-schema.golden.json b/testdata/conformance/openapi/header-content-schema.golden.json index 98b99569..17f188ec 100644 --- a/testdata/conformance/openapi/header-content-schema.golden.json +++ b/testdata/conformance/openapi/header-content-schema.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "HeaderContentSchema", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/http-binding.golden.json b/testdata/conformance/openapi/http-binding.golden.json index d8d1d27b..bf05b03e 100644 --- a/testdata/conformance/openapi/http-binding.golden.json +++ b/testdata/conformance/openapi/http-binding.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "HTTPBinding", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/inline-annotations.golden.json b/testdata/conformance/openapi/inline-annotations.golden.json index b2baf68b..8cced158 100644 --- a/testdata/conformance/openapi/inline-annotations.golden.json +++ b/testdata/conformance/openapi/inline-annotations.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "InlineAnnotations", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/inline-hoist-positions.golden.json b/testdata/conformance/openapi/inline-hoist-positions.golden.json index 4eb9d3a6..daf8c126 100644 --- a/testdata/conformance/openapi/inline-hoist-positions.golden.json +++ b/testdata/conformance/openapi/inline-hoist-positions.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "InlineHoistPositions", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/inline-residue.golden.json b/testdata/conformance/openapi/inline-residue.golden.json index 1234994e..18d33627 100644 --- a/testdata/conformance/openapi/inline-residue.golden.json +++ b/testdata/conformance/openapi/inline-residue.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "InlineResidue", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/inline-types.golden.json b/testdata/conformance/openapi/inline-types.golden.json index 83a952ba..85284ddf 100644 --- a/testdata/conformance/openapi/inline-types.golden.json +++ b/testdata/conformance/openapi/inline-types.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "InlineTypes", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/literal-const.golden.json b/testdata/conformance/openapi/literal-const.golden.json index 7280b9ff..326b7fab 100644 --- a/testdata/conformance/openapi/literal-const.golden.json +++ b/testdata/conformance/openapi/literal-const.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "LiteralConst", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/maps.golden.json b/testdata/conformance/openapi/maps.golden.json index cd629ff0..b48216f5 100644 --- a/testdata/conformance/openapi/maps.golden.json +++ b/testdata/conformance/openapi/maps.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Maps", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/multi-content.golden.json b/testdata/conformance/openapi/multi-content.golden.json index 9d381bd0..e8c34703 100644 --- a/testdata/conformance/openapi/multi-content.golden.json +++ b/testdata/conformance/openapi/multi-content.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "MultiContent", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/multipart-encoding.golden.json b/testdata/conformance/openapi/multipart-encoding.golden.json index 3dae8aa3..8a8b3a7b 100644 --- a/testdata/conformance/openapi/multipart-encoding.golden.json +++ b/testdata/conformance/openapi/multipart-encoding.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "MultipartEncoding", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/named-types.golden.json b/testdata/conformance/openapi/named-types.golden.json index 7123f7ce..d5a74962 100644 --- a/testdata/conformance/openapi/named-types.golden.json +++ b/testdata/conformance/openapi/named-types.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "NamedTypes", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/negation-not.golden.json b/testdata/conformance/openapi/negation-not.golden.json index 8ed7e749..f9a83cf2 100644 --- a/testdata/conformance/openapi/negation-not.golden.json +++ b/testdata/conformance/openapi/negation-not.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "NegationNot", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/neutral-naming.golden.json b/testdata/conformance/openapi/neutral-naming.golden.json index a071dd27..9048f238 100644 --- a/testdata/conformance/openapi/neutral-naming.golden.json +++ b/testdata/conformance/openapi/neutral-naming.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Neutral.Naming API", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/nullability-conjunction.golden.json b/testdata/conformance/openapi/nullability-conjunction.golden.json index 1e5b80cb..b037630a 100644 --- a/testdata/conformance/openapi/nullability-conjunction.golden.json +++ b/testdata/conformance/openapi/nullability-conjunction.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "NullabilityConjunction", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/nullability-four-states.golden.json b/testdata/conformance/openapi/nullability-four-states.golden.json index 2e5c8e0e..e7afd83b 100644 --- a/testdata/conformance/openapi/nullability-four-states.golden.json +++ b/testdata/conformance/openapi/nullability-four-states.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "NullabilityFourStates", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/nullable-30.golden.json b/testdata/conformance/openapi/nullable-30.golden.json index 9a9ff955..fa2d5aa6 100644 --- a/testdata/conformance/openapi/nullable-30.golden.json +++ b/testdata/conformance/openapi/nullable-30.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Nullable30", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/nullable-31-ref.golden.json b/testdata/conformance/openapi/nullable-31-ref.golden.json index 52d16ecc..f5d09659 100644 --- a/testdata/conformance/openapi/nullable-31-ref.golden.json +++ b/testdata/conformance/openapi/nullable-31-ref.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Nullable31Ref", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/nullable-enum-31.golden.json b/testdata/conformance/openapi/nullable-enum-31.golden.json index ec8ce1a3..ae844257 100644 --- a/testdata/conformance/openapi/nullable-enum-31.golden.json +++ b/testdata/conformance/openapi/nullable-enum-31.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "NullableEnum31", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/numeric-precision.golden.json b/testdata/conformance/openapi/numeric-precision.golden.json index 44769852..7bcfa82c 100644 --- a/testdata/conformance/openapi/numeric-precision.golden.json +++ b/testdata/conformance/openapi/numeric-precision.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "NumericPrecision", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/oneof-discriminated.golden.json b/testdata/conformance/openapi/oneof-discriminated.golden.json index 71452e1f..d920c667 100644 --- a/testdata/conformance/openapi/oneof-discriminated.golden.json +++ b/testdata/conformance/openapi/oneof-discriminated.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "OneOfDiscriminated", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/param-querystring.golden.json b/testdata/conformance/openapi/param-querystring.golden.json index 84e1774f..75c7acd0 100644 --- a/testdata/conformance/openapi/param-querystring.golden.json +++ b/testdata/conformance/openapi/param-querystring.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ParamQuerystring", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/param-ref-inheritance.golden.json b/testdata/conformance/openapi/param-ref-inheritance.golden.json index 86e43bf1..18a92c97 100644 --- a/testdata/conformance/openapi/param-ref-inheritance.golden.json +++ b/testdata/conformance/openapi/param-ref-inheritance.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ParamRefInheritance", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/param-style-matrix.golden.json b/testdata/conformance/openapi/param-style-matrix.golden.json index de4ecae0..d0447371 100644 --- a/testdata/conformance/openapi/param-style-matrix.golden.json +++ b/testdata/conformance/openapi/param-style-matrix.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ParamStyleMatrix", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/param-styles.golden.json b/testdata/conformance/openapi/param-styles.golden.json index b7edbc64..988eb8c4 100644 --- a/testdata/conformance/openapi/param-styles.golden.json +++ b/testdata/conformance/openapi/param-styles.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ParamStyles", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/param-xml-residue.golden.json b/testdata/conformance/openapi/param-xml-residue.golden.json index d7c5c761..7165cc68 100644 --- a/testdata/conformance/openapi/param-xml-residue.golden.json +++ b/testdata/conformance/openapi/param-xml-residue.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ParamXMLResidue", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/path-item-docs.golden.json b/testdata/conformance/openapi/path-item-docs.golden.json index a991f588..6e716dce 100644 --- a/testdata/conformance/openapi/path-item-docs.golden.json +++ b/testdata/conformance/openapi/path-item-docs.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "PathItemDocs", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/path-item-operations.golden.json b/testdata/conformance/openapi/path-item-operations.golden.json index 225c171e..afab297a 100644 --- a/testdata/conformance/openapi/path-item-operations.golden.json +++ b/testdata/conformance/openapi/path-item-operations.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "PathItemOperations", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/per-status-errors.golden.json b/testdata/conformance/openapi/per-status-errors.golden.json index efa04676..837a6bf5 100644 --- a/testdata/conformance/openapi/per-status-errors.golden.json +++ b/testdata/conformance/openapi/per-status-errors.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "PerStatusErrors", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/readonly-writeonly.golden.json b/testdata/conformance/openapi/readonly-writeonly.golden.json index 7e634806..a7b8b4b1 100644 --- a/testdata/conformance/openapi/readonly-writeonly.golden.json +++ b/testdata/conformance/openapi/readonly-writeonly.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ReadOnlyWriteOnly", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/recursive.golden.json b/testdata/conformance/openapi/recursive.golden.json index 3606bef5..68e30e3b 100644 --- a/testdata/conformance/openapi/recursive.golden.json +++ b/testdata/conformance/openapi/recursive.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Recursive", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/response-links.golden.json b/testdata/conformance/openapi/response-links.golden.json index ce5b8816..cfd16069 100644 --- a/testdata/conformance/openapi/response-links.golden.json +++ b/testdata/conformance/openapi/response-links.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ResponseLinks", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/scalar-format.golden.json b/testdata/conformance/openapi/scalar-format.golden.json index 1141c1ae..2296f455 100644 --- a/testdata/conformance/openapi/scalar-format.golden.json +++ b/testdata/conformance/openapi/scalar-format.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ScalarFormat", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/security-or-and.golden.json b/testdata/conformance/openapi/security-or-and.golden.json index b706a2ba..32f0cdf8 100644 --- a/testdata/conformance/openapi/security-or-and.golden.json +++ b/testdata/conformance/openapi/security-or-and.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "SecurityOrAnd", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/security-schemes.golden.json b/testdata/conformance/openapi/security-schemes.golden.json index 54f7fec2..478b68e5 100644 --- a/testdata/conformance/openapi/security-schemes.golden.json +++ b/testdata/conformance/openapi/security-schemes.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "SecuritySchemes", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/sequential-media.golden.json b/testdata/conformance/openapi/sequential-media.golden.json index 6870e6c8..56f146b5 100644 --- a/testdata/conformance/openapi/sequential-media.golden.json +++ b/testdata/conformance/openapi/sequential-media.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "SequentialMedia", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/servers-variables.golden.json b/testdata/conformance/openapi/servers-variables.golden.json index bef48a37..b697383b 100644 --- a/testdata/conformance/openapi/servers-variables.golden.json +++ b/testdata/conformance/openapi/servers-variables.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "ServersVariables", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/shared-response-across-status.golden.json b/testdata/conformance/openapi/shared-response-across-status.golden.json index 2f283767..d485e4a1 100644 --- a/testdata/conformance/openapi/shared-response-across-status.golden.json +++ b/testdata/conformance/openapi/shared-response-across-status.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "SharedResponseAcrossStatus", "version": "1", "docs": {}, diff --git a/testdata/conformance/openapi/streaming-media-30.golden.json b/testdata/conformance/openapi/streaming-media-30.golden.json index 7217798f..8de5b786 100644 --- a/testdata/conformance/openapi/streaming-media-30.golden.json +++ b/testdata/conformance/openapi/streaming-media-30.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "StreamingMedia30", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/streaming-media-31.golden.json b/testdata/conformance/openapi/streaming-media-31.golden.json index 3e71332a..8899db35 100644 --- a/testdata/conformance/openapi/streaming-media-31.golden.json +++ b/testdata/conformance/openapi/streaming-media-31.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "StreamingMedia31", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/tags-grouping.golden.json b/testdata/conformance/openapi/tags-grouping.golden.json index b227b55b..d558fa85 100644 --- a/testdata/conformance/openapi/tags-grouping.golden.json +++ b/testdata/conformance/openapi/tags-grouping.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "TagsGrouping", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/tuples-prefixitems.golden.json b/testdata/conformance/openapi/tuples-prefixitems.golden.json index 2978752d..ee8d6657 100644 --- a/testdata/conformance/openapi/tuples-prefixitems.golden.json +++ b/testdata/conformance/openapi/tuples-prefixitems.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "TuplesPrefixItems", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/unhomed-keywords.golden.json b/testdata/conformance/openapi/unhomed-keywords.golden.json index 47aa1661..802cc835 100644 --- a/testdata/conformance/openapi/unhomed-keywords.golden.json +++ b/testdata/conformance/openapi/unhomed-keywords.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "UnhomedKeywords", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/webhooks.golden.json b/testdata/conformance/openapi/webhooks.golden.json index 30a109d7..2e2c9fbe 100644 --- a/testdata/conformance/openapi/webhooks.golden.json +++ b/testdata/conformance/openapi/webhooks.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Webhooks", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/xml-hints.golden.json b/testdata/conformance/openapi/xml-hints.golden.json index f4695e53..e674c8e0 100644 --- a/testdata/conformance/openapi/xml-hints.golden.json +++ b/testdata/conformance/openapi/xml-hints.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "XMLHints", "version": "1.0.0", "docs": {}, diff --git a/testdata/conformance/openapi/yaml-timestamp-scalars.golden.json b/testdata/conformance/openapi/yaml-timestamp-scalars.golden.json index 6d02d49e..9875b55b 100644 --- a/testdata/conformance/openapi/yaml-timestamp-scalars.golden.json +++ b/testdata/conformance/openapi/yaml-timestamp-scalars.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "YamlTimestampScalars", "version": "1.0.0", "docs": {}, diff --git a/testdata/golden/openapi/petstore.golden.json b/testdata/golden/openapi/petstore.golden.json index 7a1b9f33..65affeb4 100644 --- a/testdata/golden/openapi/petstore.golden.json +++ b/testdata/golden/openapi/petstore.golden.json @@ -1,5 +1,5 @@ { - "irVersion": "0.3.0", + "irVersion": "0.4.0", "name": "Petstore", "version": "1.0.0", "docs": {}, From 4401ab5c33cf145c5ee5ad2d993d71676c509fa4 Mon Sep 17 00:00:00 2001 From: Fuad Daoud Date: Sat, 12 Sep 2026 13:57:49 +0300 Subject: [PATCH 2/2] test(ir): spell the padded-version rows relative to IRVersion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bump left irverify's whitespace row at a literal " 0.3.0 ", which at 0.4.0 is rejected for being a prior generation whether or not the padding matters: a whitespace-tolerant CompatibleVersion failed only the ir test. The row now moves with the constant, and the comment on document_test's three literal rows says what they are — spelled against the current value and re-anchored by hand at every bump — rather than claiming they move. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_011T5no6iADeMGgYjsYcV5in --- ir/document_test.go | 10 ++++++---- ir/irverify/version_test.go | 6 +++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ir/document_test.go b/ir/document_test.go index 69f33b05..1709324c 100644 --- a/ir/document_test.go +++ b/ir/document_test.go @@ -81,11 +81,13 @@ func TestCompatibleVersion(t *testing.T) { }{ {"this build's version", ir.IRVersion, true}, {"absent", "", false}, - // These three are spelled relative to IRVersion and MOVE WITH IT. The - // neighbour rows are the point of the test, so a bump that leaves them - // behind stops testing what they name — at 0.4.0 the old "later + // These three are literals spelled against the CURRENT IRVersion, and + // nothing makes them follow it: every bump must re-anchor them by hand. + // The neighbour rows are the point of the test, so a bump that leaves + // them behind stops testing what they name — at 0.4.0 the old "later // generation" literal WAS the current version, and the row asserted the - // build rejects its own documents. + // build rejects its own documents. The rows below spell IRVersion + // directly and need no such maintenance. {"the generation before this one", "0.3.0", false}, {"a later generation", "0.5.0", false}, {"a differing patch", "0.4.1", false}, diff --git a/ir/irverify/version_test.go b/ir/irverify/version_test.go index d08b128d..04d362e3 100644 --- a/ir/irverify/version_test.go +++ b/ir/irverify/version_test.go @@ -39,7 +39,11 @@ func TestVerify_IncompatibleIRVersionIsAViolation(t *testing.T) { {"older generation", "0.1.0"}, {"newer generation", "99.0.0"}, {"not a version", "99.99.99-bogus"}, - {"whitespace around the current version", " 0.3.0 "}, + // Spelled relative to IRVersion so it MOVES WITH IT. A literal stops + // testing the padding the moment the constant is bumped past it: the + // bare version is then rejected for being a prior generation, and the + // row passes whether or not whitespace is tolerated. + {"whitespace around the current version", " " + ir.IRVersion + " "}, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) {