diff --git a/Cargo.lock b/Cargo.lock index b3b64a3e6..ba05fe24b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2912,7 +2912,7 @@ dependencies = [ [[package]] name = "mdbase-interop" version = "0.1.0-rc.2" -source = "git+https://github.com/mdbase-dev/mdbase-spec.git?rev=5aa34fd14de2e0ae9e565425b724b306046b64ca#5aa34fd14de2e0ae9e565425b724b306046b64ca" +source = "git+https://github.com/mdbase-dev/mdbase-spec.git?rev=f4202a5d76f189684bfb2dc34334b8e3a8017ccc#f4202a5d76f189684bfb2dc34334b8e3a8017ccc" dependencies = [ "hex", "jsonschema", diff --git a/Cargo.toml b/Cargo.toml index 73d55a7ca..94916ec45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ futures-util = "0.3" hkdf = "0.12" hmac = "0.12" mdbase = { path = "../mdbase-rs", default-features = false } -mdbase-interop = { version = "0.1.0-rc.2", git = "https://github.com/mdbase-dev/mdbase-spec.git", rev = "5aa34fd14de2e0ae9e565425b724b306046b64ca" } +mdbase-interop = { version = "0.1.0-rc.2", git = "https://github.com/mdbase-dev/mdbase-spec.git", rev = "f4202a5d76f189684bfb2dc34334b8e3a8017ccc" } mdbase-runtime = { path = "../mdbase-rs/crates/mdbase-runtime" } notify = "8" reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls-webpki-roots-no-provider"] } diff --git a/deploy/docker/Cargo.lock.hosted-provider b/deploy/docker/Cargo.lock.hosted-provider index b3b64a3e6..ba05fe24b 100644 --- a/deploy/docker/Cargo.lock.hosted-provider +++ b/deploy/docker/Cargo.lock.hosted-provider @@ -2912,7 +2912,7 @@ dependencies = [ [[package]] name = "mdbase-interop" version = "0.1.0-rc.2" -source = "git+https://github.com/mdbase-dev/mdbase-spec.git?rev=5aa34fd14de2e0ae9e565425b724b306046b64ca#5aa34fd14de2e0ae9e565425b724b306046b64ca" +source = "git+https://github.com/mdbase-dev/mdbase-spec.git?rev=f4202a5d76f189684bfb2dc34334b8e3a8017ccc#f4202a5d76f189684bfb2dc34334b8e3a8017ccc" dependencies = [ "hex", "jsonschema", diff --git a/deploy/docker/mdbase-rs-revision b/deploy/docker/mdbase-rs-revision index 888a27a2f..dc2e827da 100644 --- a/deploy/docker/mdbase-rs-revision +++ b/deploy/docker/mdbase-rs-revision @@ -1 +1 @@ -76ceed008b63fd06c91dbc6ccd0cfcea043ac042 +fc1dc077a1d76677a43c047d8ad419772fc5037f diff --git a/scripts/lib/retained-v2-upgrade.test.mjs b/scripts/lib/retained-v2-upgrade.test.mjs index 83cf8ae25..41399e71d 100644 --- a/scripts/lib/retained-v2-upgrade.test.mjs +++ b/scripts/lib/retained-v2-upgrade.test.mjs @@ -43,6 +43,18 @@ test('retained-v2 is registered in the existing harness and cannot remove legacy } }); +test('retained-v2 freezes wire schemas, not the candidate engine revision', async () => { + const script = await readFile(new URL('../../test/upgrade/retained-v2.sh', import.meta.url), 'utf8'); + assert.doesNotMatch(script, /mdbase-rs-revision/); + const contracts = script.match(/for contract in ([\s\S]*?); do/); + assert.ok(contracts); + for (const schema of ['application-capability-catalog.v1.json', 'application-capability-catalog.v2.json', 'operation-catalog.v1.json']) { + assert.ok(contracts[1].includes(`packages/protocol/schemas/${schema}`)); + } + assert.match(script, /cmp <\(git .*PREVIOUS_RELEASE_COMMIT:\$contract/); + assert.match(script, /diff --exit-code .* -- crates\/connect-hosted-provider\/migrations/); +}); + test('retained-v2 rejects a mutable beta94 tag before starting resources', async () => { const root = new URL('../../', import.meta.url).pathname; // An image tag is rejected before even consulting Git or Docker. diff --git a/test/upgrade/retained-v2.sh b/test/upgrade/retained-v2.sh index 91c87082f..6dbdd1df3 100644 --- a/test/upgrade/retained-v2.sh +++ b/test/upgrade/retained-v2.sh @@ -21,10 +21,10 @@ retained_v2_inputs() { jq -e '.phase == "compatibility-prelude" and .fresh_semantic_versions == [1]' >/dev/null jq -e '.phase == "v2-enablement" and .fresh_semantic_versions == [1,2]' \ "$repo_root/config/application-issuance-policy.json" >/dev/null - # Retained reader/engine and schema bytes are immutable across this pair. + # Keep wire schemas immutable; engine revisions may advance. The scenario + # below tests compatibility by running the candidate and exact predecessor. local contract - for contract in deploy/docker/mdbase-rs-revision \ - packages/protocol/schemas/application-capability-catalog.v1.json \ + for contract in packages/protocol/schemas/application-capability-catalog.v1.json \ packages/protocol/schemas/application-capability-catalog.v2.json \ packages/protocol/schemas/operation-catalog.v1.json; do cmp <(git -C "$repo_root" show "$MDBASE_CONNECT_PREVIOUS_RELEASE_COMMIT:$contract") "$repo_root/$contract"