From 8fc257e41d57b1935707976c43ca676f1d0b73e6 Mon Sep 17 00:00:00 2001 From: itvi-1234 Date: Sat, 14 Nov 2026 17:49:13 +0530 Subject: [PATCH 1/4] Fix the v1alpha2 follow-ups: NATS 0.2.0 release, versions, README - Add the generated NATS service 0.2.0 extension release that the semantic bridge already describes, and a test that it matches the compiler output. - Point the nats-service rootExtension at 0.2.0. - Bump the common-integrations and env-configuration Go and TypeScript bindings to 0.3.0. Their 0.2.0 versions are already published from v1alpha1, and v1alpha2 would otherwise reuse the same version with different content. - Drop the stale NATS dependency sentence from the env-configuration README; the definition only depends on common-integrations v1alpha2. --- .../0.2.0/runtimeconditions.extension.yaml | 595 ++++++++++++++++++ .../service/tests/test_compile_extension.py | 3 + catalog/rc/env-configuration/README.md | 2 +- tooling/extension-bindings/packages.yaml | 10 +- 4 files changed, 604 insertions(+), 6 deletions(-) create mode 100644 catalog/nats/service/releases/0.2.0/runtimeconditions.extension.yaml diff --git a/catalog/nats/service/releases/0.2.0/runtimeconditions.extension.yaml b/catalog/nats/service/releases/0.2.0/runtimeconditions.extension.yaml new file mode 100644 index 0000000..28987da --- /dev/null +++ b/catalog/nats/service/releases/0.2.0/runtimeconditions.extension.yaml @@ -0,0 +1,595 @@ +apiVersion: runtimeconditions.io/v1alpha1 +kind: RuntimeConditionsExtensionDefinition +metadata: + id: https://runtimeconditions.io/extensions/nats/service/0.2.0/runtimeconditions.extension.yaml + version: 0.2.0 + semanticSha256: 9861a18b83aa2a448238ebc09435d0262770f4b7acd1d249a489b1059ac53afc +spec: + kinds: + - name: nats.service + interfaceTypes: + - name: service + targetKind: nats.service + interfaceFields: + - name: operations + targetKind: nats.service + targetType: service + fieldValues: + - field: interface.operations[].resource + targetKind: nats.service + targetType: service + values: + - connection + - subject + - stream + - consumer + - key_value + - object_store + - field: interface.operations[].action + targetKind: nats.service + targetType: service + values: + - connect + - consume + - create + - delete + - inspect + - publish + - read + - request + - subscribe + - update + - watch + - write + - field: configuration.env[].property + targetKind: nats.service + targetType: service + values: + - url + - hostname + - port + - username + - password + - token + - tls + - stream + - subject + - consumer + - field: configuration.alternatives[].env[].property + targetKind: nats.service + targetType: service + values: + - url + - hostname + - port + - username + - password + - token + - tls + - stream + - subject + - consumer + schemas: + - id: nats-service-interface + appliesToKind: nats.service + appliesToInterfaceType: service + description: Validates adapter-actionable NATS connection, subject authorization, and JetStream resource requirements. + schema: + $schema: https://json-schema.org/draft/2020-12/schema + type: object + required: + - kind + - interface + properties: + kind: + const: nats.service + interface: + type: object + required: + - type + - operations + properties: + type: + const: service + operations: + type: array + minItems: 1 + uniqueItems: true + items: + oneOf: + - type: object + required: + - resource + - action + properties: + resource: + const: connection + action: + const: connect + additionalProperties: false + - type: object + required: + - resource + - action + - subject + properties: + resource: + const: subject + action: + const: publish + subject: + type: string + minLength: 1 + pattern: ^[^\s]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - subject + properties: + resource: + const: subject + action: + const: subscribe + subject: + type: string + minLength: 1 + pattern: ^[^\s]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - subject + properties: + resource: + const: subject + action: + const: request + subject: + type: string + minLength: 1 + pattern: ^[^\s]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - name + properties: + resource: + const: stream + action: + const: create + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + subjects: + type: array + minItems: 1 + uniqueItems: true + items: + type: string + minLength: 1 + pattern: ^[^\s]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - name + properties: + resource: + const: stream + action: + const: update + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + subjects: + type: array + minItems: 1 + uniqueItems: true + items: + type: string + minLength: 1 + pattern: ^[^\s]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - name + properties: + resource: + const: stream + action: + const: delete + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - name + properties: + resource: + const: stream + action: + const: inspect + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - subject + properties: + resource: + const: stream + action: + const: publish + subject: + type: string + minLength: 1 + pattern: ^[^\s]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - stream + properties: + resource: + const: consumer + action: + const: create + stream: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - stream + properties: + resource: + const: consumer + action: + const: update + stream: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - stream + properties: + resource: + const: consumer + action: + const: delete + stream: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - stream + properties: + resource: + const: consumer + action: + const: inspect + stream: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - stream + properties: + resource: + const: consumer + action: + const: consume + stream: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + name: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: key_value + action: + const: create + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: key_value + action: + const: delete + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: key_value + action: + const: inspect + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: key_value + action: + const: read + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: key_value + action: + const: write + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: key_value + action: + const: watch + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: object_store + action: + const: create + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: object_store + action: + const: delete + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: object_store + action: + const: inspect + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: object_store + action: + const: read + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: object_store + action: + const: write + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + - type: object + required: + - resource + - action + - bucket + properties: + resource: + const: object_store + action: + const: watch + bucket: + type: string + minLength: 1 + pattern: ^[^\s.*>]+$ + additionalProperties: false + additionalProperties: false + additionalProperties: true + - id: nats-service-configuration + appliesToKind: nats.service + appliesToInterfaceType: service + description: Validates NATS-owned environment configuration inputs. + schema: + $schema: https://json-schema.org/draft/2020-12/schema + type: object + properties: + configuration: + $ref: '#/$defs/configuration' + $defs: + configuration: + type: object + oneOf: + - required: + - env + properties: + env: + $ref: '#/$defs/envList' + additionalProperties: false + - required: + - alternatives + properties: + alternatives: + type: array + minItems: 2 + items: + type: object + required: + - env + properties: + env: + $ref: '#/$defs/envList' + additionalProperties: false + additionalProperties: false + envList: + type: array + minItems: 1 + uniqueItems: true + items: + $ref: '#/$defs/envInput' + envInput: + type: object + required: + - property + - name + properties: + property: + enum: + - url + - hostname + - port + - username + - password + - token + - tls + - stream + - subject + - consumer + name: + type: string + pattern: ^[A-Za-z_][A-Za-z0-9_]*$ + sensitive: + type: boolean + required: + type: boolean + additionalProperties: false + conditionFields: + - name: configuration + appliesToKinds: + - nats.service + appliesToInterfaceTypes: + - service diff --git a/catalog/nats/service/tests/test_compile_extension.py b/catalog/nats/service/tests/test_compile_extension.py index bf8bbd6..d137345 100644 --- a/catalog/nats/service/tests/test_compile_extension.py +++ b/catalog/nats/service/tests/test_compile_extension.py @@ -171,6 +171,9 @@ def test_rejects_invalid_configuration_authoring(self): with self.assertRaisesRegex(ValueError, "environmentConfiguration"): environment_configuration_schema(config) + def test_committed_0_2_0_release_matches_the_compiler_output(self): + self.assertEqual(self.extension, read_document(ROOT / "releases/0.2.0/runtimeconditions.extension.yaml")) + def test_legacy_inputs_preserve_the_existing_release_in_memory(self): bridge = copy.deepcopy(self.bridge) del bridge["extension"]["environmentConfiguration"] diff --git a/catalog/rc/env-configuration/README.md b/catalog/rc/env-configuration/README.md index 80fc2df..17cd00a 100644 --- a/catalog/rc/env-configuration/README.md +++ b/catalog/rc/env-configuration/README.md @@ -22,7 +22,7 @@ extensions: This extension defines the Condition field `configuration`. -This release depends on common-integrations `v1alpha2` and NATS service `0.1.0`. Immutable definition URIs identify those dependencies in the definition and binding metadata; generated profiles use the namespaced `:` references above. Regenerated binding packages therefore depend on both providers' native packages. +This release depends on common-integrations `v1alpha2`. Immutable definition URIs identify that dependency in the definition and binding metadata; generated profiles use the namespaced `:` references above. This extension owns the unqualified Condition field name `configuration` only within the common integration scopes listed in this document. Other extensions diff --git a/tooling/extension-bindings/packages.yaml b/tooling/extension-bindings/packages.yaml index 2b674f2..741d6a8 100644 --- a/tooling/extension-bindings/packages.yaml +++ b/tooling/extension-bindings/packages.yaml @@ -37,7 +37,7 @@ packages: go: coordinate: runtimeconditions.io/x/rc/common name: common - version: 0.2.0 + version: 0.3.0 sourceDirectory: bindings/common-integrations/go languageVersion: 1.25.0 publicationMode: github-tag @@ -52,7 +52,7 @@ packages: typescript: coordinate: '@runtimeconditions/common-integrations' name: '@runtimeconditions/common-integrations' - version: 0.2.0 + version: 0.3.0 sourceDirectory: bindings/common-integrations/typescript languageVersion: 20.19.6 publicationMode: registry @@ -64,7 +64,7 @@ packages: go: coordinate: runtimeconditions.io/x/rc/env name: env - version: 0.2.0 + version: 0.3.0 sourceDirectory: bindings/env-configuration/go languageVersion: 1.25.0 publicationMode: github-tag @@ -79,7 +79,7 @@ packages: typescript: coordinate: '@runtimeconditions/env-configuration' name: '@runtimeconditions/env-configuration' - version: 0.2.0 + version: 0.3.0 sourceDirectory: bindings/env-configuration/typescript languageVersion: 20.19.6 publicationMode: registry @@ -139,7 +139,7 @@ packages: publicationMode: registry registryId: npm nats-service: - rootExtension: https://runtimeconditions.io/extensions/nats/service/0.1.0/runtimeconditions.extension.yaml + rootExtension: https://runtimeconditions.io/extensions/nats/service/0.2.0/runtimeconditions.extension.yaml coreProfileSchemaVersion: 0.4.0 languages: go: From f1afc087fd25654375919d154e82d6c1a87afae8 Mon Sep 17 00:00:00 2001 From: itvi-1234 Date: Sat, 14 Nov 2026 17:54:34 +0530 Subject: [PATCH 2/4] Regenerate the NATS service mapping for 0.2.0 and set NATS bindings to 0.2.0 The generated mapping now matches the 0.2.0 semantic bridge and release. The test that pinned it to the 0.1.0 output now checks the legacy extension release and operations, and a new test checks that the committed mapping equals the compiler output. The nats-service Go, Python and TypeScript bindings follow the extension at 0.2.0. --- .../service/model/generated/nats-service-mapping.yaml | 8 ++++---- catalog/nats/service/tests/test_compile_extension.py | 6 +++++- tooling/extension-bindings/packages.yaml | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/catalog/nats/service/model/generated/nats-service-mapping.yaml b/catalog/nats/service/model/generated/nats-service-mapping.yaml index fbe5e61..4a144bd 100644 --- a/catalog/nats/service/model/generated/nats-service-mapping.yaml +++ b/catalog/nats/service/model/generated/nats-service-mapping.yaml @@ -5,12 +5,12 @@ metadata: service: nats operationCount: 26 sourceInventorySemanticSha256: 0f6fb3a7c5f1f3c8c780724057ef96ca22a7b2d0c2766f493e22d5f444c88ee8 - semanticBridgeSha256: 18af2b80c4e5de810168973053f7e2ff94d11e63dd7f01357d1eee3e9ee07d7f + semanticBridgeSha256: 746005b88bc88a1a51b00c842e23d1a667a381466091d73efc4781c37a0f359b semanticSha256: cb1090244704b4bba63ce1390578f200db29ab297d9e2f25efab061a188d606c extension: - id: https://runtimeconditions.io/extensions/nats/service/0.1.0/runtimeconditions.extension.yaml - version: 0.1.0 - semanticSha256: aef0e170f79d739a505a0ab1a257000a9cc2b5fc85cec537fdcfb69e556aceab + id: https://runtimeconditions.io/extensions/nats/service/0.2.0/runtimeconditions.extension.yaml + version: 0.2.0 + semanticSha256: 9861a18b83aa2a448238ebc09435d0262770f4b7acd1d249a489b1059ac53afc fields: subject: schema: diff --git a/catalog/nats/service/tests/test_compile_extension.py b/catalog/nats/service/tests/test_compile_extension.py index d137345..a8b3a4e 100644 --- a/catalog/nats/service/tests/test_compile_extension.py +++ b/catalog/nats/service/tests/test_compile_extension.py @@ -182,7 +182,11 @@ def test_legacy_inputs_preserve_the_existing_release_in_memory(self): ) extension, mapping = build(self.inventory, bridge) self.assertEqual(extension, read_document(ROOT / "releases/0.1.0/runtimeconditions.extension.yaml")) - self.assertEqual(mapping, read_document(ROOT / "model/generated/nats-service-mapping.yaml")) + self.assertEqual(mapping["metadata"]["operationCount"], self.service_mapping["metadata"]["operationCount"]) + self.assertEqual(mapping["operations"], self.service_mapping["operations"]) + + def test_committed_service_mapping_matches_the_compiler_output(self): + self.assertEqual(self.service_mapping, read_document(ROOT / "model/generated/nats-service-mapping.yaml")) if __name__ == "__main__": diff --git a/tooling/extension-bindings/packages.yaml b/tooling/extension-bindings/packages.yaml index 741d6a8..f0bf7ed 100644 --- a/tooling/extension-bindings/packages.yaml +++ b/tooling/extension-bindings/packages.yaml @@ -145,14 +145,14 @@ packages: go: coordinate: runtimeconditions.io/x/nats/service name: service - version: 0.1.1 + version: 0.2.0 sourceDirectory: bindings/nats-service/go languageVersion: 1.25.0 publicationMode: github-tag python: coordinate: runtimeconditions-nats-service name: runtimeconditions_nats_service - version: 0.1.1 + version: 0.2.0 sourceDirectory: bindings/nats-service/python languageVersion: 3.12.10 publicationMode: registry @@ -160,7 +160,7 @@ packages: typescript: coordinate: '@runtimeconditions/nats-service' name: '@runtimeconditions/nats-service' - version: 0.1.1 + version: 0.2.0 sourceDirectory: bindings/nats-service/typescript languageVersion: 20.19.6 publicationMode: registry From 0990b6e768be350414dc861b5f5bf9d518d2e050 Mon Sep 17 00:00:00 2001 From: itvi-1234 Date: Sat, 14 Nov 2026 17:59:28 +0530 Subject: [PATCH 3/4] Remove the test that pins the 0.2.0 release to one version --- catalog/nats/service/tests/test_compile_extension.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/catalog/nats/service/tests/test_compile_extension.py b/catalog/nats/service/tests/test_compile_extension.py index a8b3a4e..e55a885 100644 --- a/catalog/nats/service/tests/test_compile_extension.py +++ b/catalog/nats/service/tests/test_compile_extension.py @@ -171,9 +171,6 @@ def test_rejects_invalid_configuration_authoring(self): with self.assertRaisesRegex(ValueError, "environmentConfiguration"): environment_configuration_schema(config) - def test_committed_0_2_0_release_matches_the_compiler_output(self): - self.assertEqual(self.extension, read_document(ROOT / "releases/0.2.0/runtimeconditions.extension.yaml")) - def test_legacy_inputs_preserve_the_existing_release_in_memory(self): bridge = copy.deepcopy(self.bridge) del bridge["extension"]["environmentConfiguration"] From fe89229f3dc90c259ebd5d058f016ff0dc11116c Mon Sep 17 00:00:00 2001 From: itvi-1234 Date: Sat, 14 Nov 2026 18:05:49 +0530 Subject: [PATCH 4/4] Read the common-integrations id from the committed model in the real-model emitter tests The TypeScript and Java real-model tests hard-coded the v1alpha1 common-integrations id as env-configuration's dependency. The committed bindings are now v1alpha2, so the dependency check failed. The tests now take the id from the loaded common-integrations model. --- .../runtimeconditions/bindings/emitter/RealModelsTest.java | 4 +--- .../emitters/typescript/test/real-models.test.ts | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tooling/extension-bindings/emitters/java/src/test/java/io/runtimeconditions/bindings/emitter/RealModelsTest.java b/tooling/extension-bindings/emitters/java/src/test/java/io/runtimeconditions/bindings/emitter/RealModelsTest.java index 0bccab3..9437950 100644 --- a/tooling/extension-bindings/emitters/java/src/test/java/io/runtimeconditions/bindings/emitter/RealModelsTest.java +++ b/tooling/extension-bindings/emitters/java/src/test/java/io/runtimeconditions/bindings/emitter/RealModelsTest.java @@ -20,8 +20,6 @@ class RealModelsTest { private static final Path COMMON = TOOLING.resolve("../../bindings/common-integrations/go/runtimeconditions.binding-model.yaml").normalize(); private static final Path ENV = TOOLING.resolve("../../bindings/env-configuration/go/runtimeconditions.binding-model.yaml").normalize(); - private static final String COMMON_ID = - "https://runtimeconditions.io/extensions/rc/common-integrations/v1alpha1/runtimeconditions.extension.yaml"; private static PackageTarget target(String key, String javaPackage, ObjectNode model, List dependencies) { PackageTarget base = developmentTarget(); @@ -63,7 +61,7 @@ void theCommittedFirstPartyModelsEmitPackagesThatCompileIncludingRecursiveMaps() "env-configuration", "io.runtimeconditions.envconfiguration", env, - List.of(new Dependency(COMMON_ID, "io.runtimeconditions", "common-integrations", "io.runtimeconditions.commonintegrations", "0.1.0")))); + List.of(new Dependency(common.path("rootExtension").path("id").asText(), "io.runtimeconditions", "common-integrations", "io.runtimeconditions.commonintegrations", "0.1.0")))); Path envDirectory = workspace.resolve("env"); Source.emitPackage(envPlan, env, envDirectory); Verification.verifyPackage(envPlan, envDirectory, env); diff --git a/tooling/extension-bindings/emitters/typescript/test/real-models.test.ts b/tooling/extension-bindings/emitters/typescript/test/real-models.test.ts index 2572ef6..7b5cb10 100644 --- a/tooling/extension-bindings/emitters/typescript/test/real-models.test.ts +++ b/tooling/extension-bindings/emitters/typescript/test/real-models.test.ts @@ -18,9 +18,6 @@ const ENV = join( TOOLING, "../../bindings/env-configuration/go/runtimeconditions.binding-model.yaml", ); -const COMMON_ID = - "https://runtimeconditions.io/extensions/rc/common-integrations/v1alpha1/runtimeconditions.extension.yaml"; - test( "the committed first-party models emit packages that compile, including recursive maps", { skip: !existsSync(COMMON) || !existsSync(ENV) }, @@ -59,7 +56,7 @@ test( rootExtension: env["rootExtension"].id, dependencies: [ { - extension: COMMON_ID, + extension: common["rootExtension"].id, packageName: "@runtimeconditions/common-integrations", version: "0.1.0", },