From d242f1cd9b3c63cfd51bc53567fcd4c77f4bfc3c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 16:55:39 +0000 Subject: [PATCH 1/2] chore(release): every PrismPM version site follows the workspace version The image-label fixtures in the SDK check tests read the workspace version instead of 0.4.0. The SDK inventory rows, the Dockerfile SDK_VERSION default and the oracles/runtime package versions are 0.5.0 and are now release-please extra-files, so the next bump writes them. xtask's reproducibility assembly names its archive, SBOM and manifest by the workspace version. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013Asa3PocMnfsTUbhe5XHQx --- release-please-config.json | 6 +++++- scripts/library-sdk-check-shell.test.mjs | 4 +++- scripts/library-sdk-check.test.mjs | 4 +++- scripts/sdk-construction-handoff.test.mjs | 4 +++- scripts/sdk-construction-record.test.mjs | 4 +++- scripts/unpublished-sdk-registry.test.mjs | 4 +++- sdk/Dockerfile | 4 +++- sdk/generate-inventory.mjs | 10 +++++----- sdk/oracles/package.json | 2 +- sdk/runtime/package.json | 2 +- xtask/src/main.rs | 14 +++++++++----- 11 files changed, 39 insertions(+), 19 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index 14dc74a1a..f85146e66 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -28,7 +28,11 @@ { "type": "toml", "path": "Cargo.toml", "jsonpath": "$.workspace.package.version" }, { "type": "toml", "path": "Cargo.toml", "jsonpath": "$.workspace.dependencies.repo-model.version" }, { "type": "toml", "path": "Cargo.toml", "jsonpath": "$.workspace.dependencies.repo-conformance.version" }, - { "type": "toml", "path": "Cargo.toml", "jsonpath": "$.workspace.dependencies.prismpm.version" } + { "type": "toml", "path": "Cargo.toml", "jsonpath": "$.workspace.dependencies.prismpm.version" }, + { "type": "generic", "path": "sdk/generate-inventory.mjs" }, + { "type": "generic", "path": "sdk/Dockerfile" }, + { "type": "json", "path": "sdk/oracles/package.json", "jsonpath": "$.version" }, + { "type": "json", "path": "sdk/runtime/package.json", "jsonpath": "$.version" } ] }, "sdk/npm/prism-code": { "release-type": "node", "component": "prism-code", "extra-files": [{ "type": "generic", "path": "src/version.mjs" }] }, diff --git a/scripts/library-sdk-check-shell.test.mjs b/scripts/library-sdk-check-shell.test.mjs index c9ae1d8cc..9e890bf97 100644 --- a/scripts/library-sdk-check-shell.test.mjs +++ b/scripts/library-sdk-check-shell.test.mjs @@ -10,6 +10,8 @@ import {test} from 'node:test'; import {capture} from './library-sdk-check.mjs'; import {lockFixture,resultFixture,qualificationFixture} from './library-sdk-fixture.mjs'; import {historicalLock,migrationChecks,expectedMigrationProcesses} from '../sdk/migration-qualification.mjs'; +// The workspace version the image label carries (scripts/workspace-version.mjs). +const workspaceVersion=()=>/^version = "([^"]+)"$/m.exec(readFileSync(new URL('../Cargo.toml',import.meta.url),'utf8').split('[workspace.package]')[1])[1]; const source=resolve(dirname(fileURLToPath(import.meta.url)),'..'); const sourceAuthority={archive_sha256:createHash('sha256').update(readFileSync(join(source,'vendor/lean4-prod/lean.tar'))).digest('hex'),toolchain:readFileSync(join(source,'lean-toolchain'),'utf8').trim()}; @@ -22,7 +24,7 @@ const earlier=fs.existsSync(log)?fs.readFileSync(log,'utf8').trim().split('\\n') fs.appendFileSync(log,JSON.stringify(args)+'\\n'); const id='c'.repeat(64); if(args[0]==='pull')process.exit(0); -if(args[0]==='image'&&args[1]==='inspect'){console.log(JSON.stringify([{Os:'linux',Architecture:process.arch==='x64'?'amd64':'arm64',RepoDigests:[process.env.RECORDED_IMAGE],Config:{Entrypoint:['/usr/local/bin/prismpm-devcontainer-init'],Volumes:null,Labels:{'org.opencontainers.image.revision':process.env.RECORDED_REVISION,'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':'0.4.0'}}}]));process.exit(0);} +if(args[0]==='image'&&args[1]==='inspect'){console.log(JSON.stringify([{Os:'linux',Architecture:process.arch==='x64'?'amd64':'arm64',RepoDigests:[process.env.RECORDED_IMAGE],Config:{Entrypoint:['/usr/local/bin/prismpm-devcontainer-init'],Volumes:null,Labels:{'org.opencontainers.image.revision':process.env.RECORDED_REVISION,'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':'${workspaceVersion()}'}}}]));process.exit(0);} if(args[0]==='container'&&args[1]==='create'){console.log(id);process.exit(0);} if(args[0]==='container'&&args[1]==='cp'){ const from=args[2].split(':').slice(1).join(':'),prefix='/opt/prismpm/share/conformance-root/'; diff --git a/scripts/library-sdk-check.test.mjs b/scripts/library-sdk-check.test.mjs index 413b74481..93bbabeb8 100644 --- a/scripts/library-sdk-check.test.mjs +++ b/scripts/library-sdk-check.test.mjs @@ -8,6 +8,8 @@ import {dirname,join,resolve} from 'node:path'; import {test} from 'node:test'; import {capture,verifySource,sourceRoots,sourceAliases,cli,readHistoricalLibraryEvidence,checkAccepted as checkAcceptedWithAuthority,mutateModule,tree,verifyImage,verifyResult,testOutput,validateCapturedLock} from './library-sdk-check.mjs'; import {lockFixture,resultFixture,sourceAuthorityFixture} from './library-sdk-fixture.mjs'; +// The workspace version the image label carries (scripts/workspace-version.mjs). +const workspaceVersion=()=>/^version = "([^"]+)"$/m.exec(readFileSync(new URL('../Cargo.toml',import.meta.url),'utf8').split('[workspace.package]')[1])[1]; const checkAccepted=(project,receipt)=>readHistoricalLibraryEvidence(project,receipt,'3'.repeat(64)); const revision='a'.repeat(40),image='ghcr.io/uor-foundation/prismpm-sdk@sha256:'+'b'.repeat(64); @@ -51,7 +53,7 @@ test('only the exact reviewed source aliases and their canonical target bytes ar }); test('the immutable installed image must identify the exact current native source',()=>{ - const base=[{Os:'linux',Architecture:'amd64',RepoDigests:[image],Config:{Entrypoint:['/usr/local/bin/prismpm-devcontainer-init'],Volumes:null,Labels:{'org.opencontainers.image.revision':revision,'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':'0.4.0'}}}]; + const base=[{Os:'linux',Architecture:'amd64',RepoDigests:[image],Config:{Entrypoint:['/usr/local/bin/prismpm-devcontainer-init'],Volumes:null,Labels:{'org.opencontainers.image.revision':revision,'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':workspaceVersion()}}}]; verifyImage(base,image,'amd64',revision); for(const change of [v=>v[0].Architecture='arm64',v=>v[0].Config.Labels['org.opencontainers.image.revision']='c'.repeat(40),v=>v[0].RepoDigests=[],v=>v[0].Config.Volumes={'/opt/prismpm':{}}]){const bad=structuredClone(base);change(bad);assert.throws(()=>verifyImage(bad,image,'amd64',revision));} assert.throws(()=>verifyImage(base,'ghcr.io/uor-foundation/prismpm-sdk:latest','amd64',revision)); diff --git a/scripts/sdk-construction-handoff.test.mjs b/scripts/sdk-construction-handoff.test.mjs index 14156ced2..ec80a653a 100644 --- a/scripts/sdk-construction-handoff.test.mjs +++ b/scripts/sdk-construction-handoff.test.mjs @@ -4,6 +4,8 @@ import {createHash} from 'node:crypto'; import test from 'node:test'; import {readFileSync} from 'node:fs'; import {validateConstructionAuthority,validateConstructionMetadata,composeConstructionIndex} from './sdk-construction-handoff.mjs'; +// The workspace version the image label carries (scripts/workspace-version.mjs). +const workspaceVersion=()=>/^version = "([^"]+)"$/m.exec(readFileSync(new URL('../Cargo.toml',import.meta.url),'utf8').split('[workspace.package]')[1])[1]; const sha=b=>'sha256:'+createHash('sha256').update(b).digest('hex'); const bytes=v=>Buffer.from(JSON.stringify(v)); const now=Date.parse('2026-10-08T00:00:00Z'); @@ -38,7 +40,7 @@ function fixture(runId=123,attempt=1){ const standards=bytes({schema:'prismpm/standards-lock/1',authorities:[],oracles:[]}); function lane(arch){ const config=bytes({os:'linux',architecture:arch,config:{Labels:{'org.opencontainers.image.revision':source, - 'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':'0.4.0', + 'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':workspaceVersion(), 'org.opencontainers.image.created':'1970-01-01T00:00:00Z'}}}); const manifest=bytes({schemaVersion:2,mediaType:'application/vnd.oci.image.manifest.v1+json', config:{mediaType:'application/vnd.oci.image.config.v1+json',digest:sha(config),size:config.length},layers:[{ diff --git a/scripts/sdk-construction-record.test.mjs b/scripts/sdk-construction-record.test.mjs index 4d92fc46e..e2ba29a66 100644 --- a/scripts/sdk-construction-record.test.mjs +++ b/scripts/sdk-construction-record.test.mjs @@ -11,6 +11,8 @@ import {tmpdir} from 'node:os'; import {pathToFileURL} from 'node:url'; import test from 'node:test'; import {constructionRecord} from './sdk-construction-record.mjs'; +// The workspace version the image label carries (scripts/workspace-version.mjs). +const workspaceVersion=()=>/^version = "([^"]+)"$/m.exec(readFileSync(new URL('../Cargo.toml',import.meta.url),'utf8').split('[workspace.package]')[1])[1]; const sha=b=>'sha256:'+createHash('sha256').update(b).digest('hex'); function fixture(t){ @@ -24,7 +26,7 @@ function fixture(t){ const layer=execFileSync('/usr/bin/tar',['--format=ustar','-cf','-','-C',layerRoot,'unit-only'],{timeout:5000,maxBuffer:1048576}); const config=Buffer.from(JSON.stringify({os:'linux',architecture:arch,rootfs:{type:'layers',diff_ids:[sha(layer)]},config:{Labels:{ 'org.opencontainers.image.revision':source,'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM', - 'org.opencontainers.image.version':'0.4.0','org.opencontainers.image.created':'1970-01-01T00:00:00Z'}}})); + 'org.opencontainers.image.version':workspaceVersion(),'org.opencontainers.image.created':'1970-01-01T00:00:00Z'}}})); const manifest=Buffer.from(JSON.stringify({schemaVersion:2,mediaType:'application/vnd.oci.image.manifest.v1+json', config:{...put(config),mediaType:'application/vnd.oci.image.config.v1+json'}, layers:[{...put(layer),mediaType:'application/vnd.oci.image.layer.v1.tar'}]})); diff --git a/scripts/unpublished-sdk-registry.test.mjs b/scripts/unpublished-sdk-registry.test.mjs index 5905b3c58..c94566a78 100644 --- a/scripts/unpublished-sdk-registry.test.mjs +++ b/scripts/unpublished-sdk-registry.test.mjs @@ -13,6 +13,8 @@ import {tarEntry,storedZip} from './sdk-construction-archive-fixture.mjs'; import {stageConstructionArchiveStream,consumeConstructionOciStage} from './sdk-construction-archive.mjs'; import {retireConstructionStage} from './sdk-construction-stage.mjs'; import {createUnpublishedRegistry,importUnpublishedStage,publishUnpublishedIndex,closeUnpublishedRegistry} from './unpublished-sdk-registry.mjs'; +// The workspace version the image label carries (scripts/workspace-version.mjs). +const workspaceVersion=()=>/^version = "([^"]+)"$/m.exec(readFileSync(new URL('../Cargo.toml',import.meta.url),'utf8').split('[workspace.package]')[1])[1]; const sha=b=>'sha256:'+createHash('sha256').update(b).digest('hex'); const json=v=>Buffer.from(JSON.stringify(v)); const revision='1'.repeat(40),imageType='application/vnd.oci.image.manifest.v1+json'; @@ -23,7 +25,7 @@ function fixture(arch='amd64',wrongDiff=false,codec='gzip',damage){ if(damage==='truncated')layer=layer.subarray(0,Math.floor(layer.length/2)); else if(damage==='corrupt'){layer=Buffer.from(layer);layer[0]^=0xff;} else assert.equal(damage,undefined); - const config=json({architecture:arch,os:'linux',config:{Labels:{'org.opencontainers.image.revision':revision,'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':'0.4.0','org.opencontainers.image.created':'1970-01-01T00:00:00Z'}},rootfs:{type:'layers',diff_ids:[wrongDiff?'sha256:'+'0'.repeat(64):sha(expanded)]}}); + const config=json({architecture:arch,os:'linux',config:{Labels:{'org.opencontainers.image.revision':revision,'org.opencontainers.image.source':'https://github.com/UOR-Foundation/PrismPM','org.opencontainers.image.version':workspaceVersion(),'org.opencontainers.image.created':'1970-01-01T00:00:00Z'}},rootfs:{type:'layers',diff_ids:[wrongDiff?'sha256:'+'0'.repeat(64):sha(expanded)]}}); const manifest=json({schemaVersion:2,mediaType:imageType,config:{mediaType:'application/vnd.oci.image.config.v1+json',digest:sha(config),size:config.length},layers:[{mediaType:'application/vnd.oci.image.layer.v1.tar'+(codec==='tar'?'':'+'+codec),digest:sha(layer),size:layer.length}]}); const child={mediaType:imageType,digest:sha(manifest),size:manifest.length,platform:{os:'linux',architecture:arch}}; const blobs=[layer,config,manifest]; diff --git a/sdk/Dockerfile b/sdk/Dockerfile index b9cbde404..5117dbc50 100644 --- a/sdk/Dockerfile +++ b/sdk/Dockerfile @@ -315,7 +315,9 @@ RUN /usr/bin/python3 -I -B scripts/normalize-cargo-git.py /usr/local/cargo \ && rm -f /usr/local/cargo/.global-cache /usr/local/cargo/.global-cache-journal /usr/local/cargo/.global-cache-wal /usr/local/cargo/.global-cache-shm FROM build AS cli-archive-package -ARG SDK_VERSION=0.4.0 +# x-release-please-start-version +ARG SDK_VERSION=0.5.0 +# x-release-please-end ARG TARGETARCH COPY --from=source_inputs /prepared/source/LICENSE-APACHE /prepared/source/LICENSE-MIT /prepared/source/README.md /tmp/native-licenses/ RUN set -eu; \ diff --git a/sdk/generate-inventory.mjs b/sdk/generate-inventory.mjs index d695b885e..b0b4e50bd 100644 --- a/sdk/generate-inventory.mjs +++ b/sdk/generate-inventory.mjs @@ -68,7 +68,7 @@ const definitions = [ ['sdk-metadata-credentials', 'schema', '1', '/opt/prismpm/metadata-credentials.mjs'], ['sdk-metadata-helper', 'schema', '1', '/opt/prismpm/metadata-helper.mjs'], ['sdk-metadata-helper-supervisor', 'schema', '1', '/opt/prismpm/metadata-helper-supervisor.py'], - ['action', 'workflow', '0.4.0', 'action', 'tree'], + ['action', 'workflow', '0.5.0', 'action', 'tree'], // x-release-please-version ['adapter-compose', 'adapter', 'compose-spec@fee041b381ffd4aad263410980bdce0cdf4beb7d', 'adapters/compose.json'], ['adapter-github-pages', 'adapter', 'github-pages-artifact@v4', 'adapters/github-pages.json'], ['adapter-github-pages-browser', 'adapter', 'github-pages-artifact@v4', 'adapters/github-pages-browser.json'], @@ -117,9 +117,9 @@ const definitions = [ ['playwright-chromium', 'oracle', '1.62.1', null, 'sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e'], ['playwright-driver', 'oracle', '1.62.1', '/opt/prismpm/oracles/node_modules/playwright', 'tree'], ['playwright-core', 'oracle', '1.62.1', '/opt/prismpm/oracles/node_modules/playwright-core', 'tree'], - ['prismpm', 'binary', '0.4.0', '/usr/local/bin/prismpm'], - ['prismpm-conformance', 'binary', '0.4.0', '/usr/local/bin/prismpm-conformance'], - ['prismpm-platform-equivalence', 'binary', '0.4.0', '/usr/local/bin/prismpm-platform-equivalence'], + ['prismpm', 'binary', '0.5.0', '/usr/local/bin/prismpm'], // x-release-please-version + ['prismpm-conformance', 'binary', '0.5.0', '/usr/local/bin/prismpm-conformance'], // x-release-please-version + ['prismpm-platform-equivalence', 'binary', '0.5.0', '/usr/local/bin/prismpm-platform-equivalence'], // x-release-please-version ['prism-stdlib', 'crate', '0.2.0', 'stdlib/generated/prism-stdlib-0.2.0.crate'], ['runtime-base', 'base-image', 'playwright-v1.62.1-noble', null, 'sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e'], ['runtime-os-lock', 'dependency-lock', 'ubuntu-noble@20260901T000000Z', 'sdk/runtime-os.lock'], @@ -133,7 +133,7 @@ const definitions = [ ['timeout', 'binary', 'coreutils-9.4', '/usr/bin/timeout'], ['unicode-17.0.0-normalization-corpus', 'test-corpus', '17.0.0', 'standards/corpora/unicode-17.0.0', 'tree'], ['opentelemetry-0.136.0-signal-corpus', 'test-corpus', '0.136.0', 'standards/corpora/opentelemetry-0.136.0', 'tree'], - ['workflow-reusable-sdk', 'workflow', '0.4.0', '.github/workflows/sdk.yml'], + ['workflow-reusable-sdk', 'workflow', '0.5.0', '.github/workflows/sdk.yml'], // x-release-please-version ]; const inputRoot = '/opt/prismpm/share/vv-inputs'; const inputPolicyBytes = await readFile('/opt/prismpm/share/vv-input-policy.json'); diff --git a/sdk/oracles/package.json b/sdk/oracles/package.json index c878a2384..4401f4630 100644 --- a/sdk/oracles/package.json +++ b/sdk/oracles/package.json @@ -1,6 +1,6 @@ { "name": "@prismpm/upstream-oracles", - "version": "0.4.0", + "version": "0.5.0", "private": true, "type": "module", "dependencies": { diff --git a/sdk/runtime/package.json b/sdk/runtime/package.json index 19c638bc8..b295ee2d3 100644 --- a/sdk/runtime/package.json +++ b/sdk/runtime/package.json @@ -9,5 +9,5 @@ }, "name": "prismpm-system-runtime", "private": true, - "version": "0.4.0" + "version": "0.5.0" } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 529f8a987..74bea1fc2 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -2054,8 +2054,12 @@ fn assemble_release(root: &Path, destination: &Path) -> Result<(), Fail> { )? .trim() .to_owned(); + let version = + repo_model::release::workspace_version(&std::fs::read_to_string(root.join("Cargo.toml"))?) + .ok_or("Cargo.toml has no [workspace.package] version")?; + let prefix = format!("--prefix=PrismPM-{version}/"); let archive = Command::new("git") - .args(["archive", "--format=tar", "--prefix=PrismPM-0.4.0/", "HEAD"]) + .args(["archive", "--format=tar", &prefix, "HEAD"]) .current_dir(root) .output()?; if !archive.status.success() { @@ -2065,7 +2069,7 @@ fn assemble_release(root: &Path, destination: &Path) -> Result<(), Fail> { ) .into()); } - let source_name = "PrismPM-0.4.0-source.tar"; + let source_name = &format!("PrismPM-{version}-source.tar"); std::fs::write(destination.join(source_name), archive.stdout)?; let metadata = Command::new("cargo") @@ -2131,11 +2135,11 @@ fn assemble_release(root: &Path, destination: &Path) -> Result<(), Fail> { "components": components, "source_commit": head, "spec": "prismpm/sbom/1", - "version": "0.4.0" + "version": version }); let mut sbom_bytes = prismpm::holo::canonical::encode_value(&sbom)?; sbom_bytes.push(b'\n'); - let sbom_name = "PrismPM-0.4.0-sbom.json"; + let sbom_name = &format!("PrismPM-{version}-sbom.json"); std::fs::write(destination.join(sbom_name), &sbom_bytes)?; let artifact_rows = [ @@ -2155,7 +2159,7 @@ fn assemble_release(root: &Path, destination: &Path) -> Result<(), Fail> { "artifacts": artifact_rows.iter().map(|(path, sha256)| serde_json::json!({"path": path, "sha256": sha256})).collect::>(), "commit": head, "schema": "prismpm/release-manifest/1", - "version": "0.4.0" + "version": version }); let mut manifest_bytes = prismpm::holo::canonical::encode_value(&manifest)?; manifest_bytes.push(b'\n'); From b781d0610a0ad04eb0ff20b69b8551bf1d8020dd Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 14:23:03 +0000 Subject: [PATCH 2/2] fix(release): native evidence names the workspace version's archive The release run's policy job refused v0.5.0 because release-gate-evidence only admitted prismpm-0.4.0-*.tar.gz. The archive name and its fixtures now follow the workspace version. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013Asa3PocMnfsTUbhe5XHQx --- scripts/release-gate-evidence.mjs | 4 +++- scripts/release-gate-evidence.test.mjs | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/release-gate-evidence.mjs b/scripts/release-gate-evidence.mjs index e4e84df9d..7df5640d2 100644 --- a/scripts/release-gate-evidence.mjs +++ b/scripts/release-gate-evidence.mjs @@ -8,6 +8,7 @@ import {fileURLToPath, pathToFileURL} from 'node:url'; import {bootstrapNames, canonical, captureBootstrap, hash, readOriginal, validateBootstrapBytes} from './sdk-bootstrap-retention.mjs'; import {assembleVvEvidence, validateVvPart, vvParts} from './sdk-vv-run.mjs'; import {isAncestor, kappa} from './factory.mjs'; +import {workspaceVersion} from './workspace-version.mjs'; export function releaseContext(revision, architecture, image, runId, attempt) { assert.match(revision, /^[0-9a-f]{40}$/); assert(['amd64', 'arm64'].includes(architecture)); @@ -218,7 +219,8 @@ export function validateNative(files, context) { assert.equal(result.schema, 'prismpm/native-equivalence-retention/1'); assert.equal(result.scope, 'original-native-sdk-comparison-only'); assert.equal(resolve(result.root), result.root); assert(!result.root.includes(',')); assert.deepEqual(Object.keys(result.archive).sort(), ['byte_length', 'path', 'sha256']); - assert.match(result.archive.path, /^prismpm-0\.4\.0-(?:aarch64|x86_64)-unknown-linux-gnu\.tar\.gz$/); + const version = workspaceVersion().replaceAll('.', '\\.'); + assert.match(result.archive.path, new RegExp(`^prismpm-${version}-(?:aarch64|x86_64)-unknown-linux-gnu\\.tar\\.gz$`)); assert.equal(result.archive.path.includes('aarch64'), context.architecture === 'arm64'); assert(Number.isSafeInteger(result.archive.byte_length) && result.archive.byte_length > 0); assert.match(result.archive.sha256, /^[0-9a-f]{64}$/); diff --git a/scripts/release-gate-evidence.test.mjs b/scripts/release-gate-evidence.test.mjs index 6d637af74..7771e0dfb 100644 --- a/scripts/release-gate-evidence.test.mjs +++ b/scripts/release-gate-evidence.test.mjs @@ -12,6 +12,7 @@ import {bootstrapNames, canonical, hash, readOriginal, validateBootstrapRetentio import {assembleSourceEvidence, captureCommand, nativeInvocations, releaseContext, sourceEvidenceNames, validateCommand, validateSourcePart, validateSourceReceipt} from './release-gate-evidence.mjs'; import {captureEvidence, packEvidence} from './sdk-release-evidence.mjs'; import {retainPart, vvParts} from './sdk-vv-run.mjs'; +import {workspaceVersion} from './workspace-version.mjs'; const require = createRequire('/opt/prismpm/oracles/package.json'), {load} = require('js-yaml'); const revision = 'a'.repeat(40), image = 'ghcr.io/uor-foundation/prismpm-sdk@sha256:' + 'b'.repeat(64); const context = releaseContext(revision, 'amd64', image, '123', '1'); @@ -48,7 +49,7 @@ function nativeFixture(root) { const source = '/unit-only/source'; for (const [prefix, args, status] of nativeInvocations(source, image, 'amd64', 1000, 1000)) commandFixture(root, prefix, 'docker', args, status); put(root, 'native-result.json', {schema: 'prismpm/native-equivalence-retention/1', scope: 'original-native-sdk-comparison-only', - ...context, root: source, uid: 1000, gid: 1000, archive: descriptor('prismpm-0.4.0-x86_64-unknown-linux-gnu.tar.gz', Buffer.from('fixture archive'))}); + ...context, root: source, uid: 1000, gid: 1000, archive: descriptor(`prismpm-${workspaceVersion()}-x86_64-unknown-linux-gnu.tar.gz`, Buffer.from('fixture archive'))}); } test('native and container mutable references use the PP6101 exit class', () => { @@ -400,7 +401,7 @@ test('missing bootstrap, failed command, substituted bytes and wrong native invo root => {const row = JSON.parse(readFileSync(join(root, 'native-error.json'))); row.status = 6; put(root, 'native-error.json', row);}, root => commandFixture(root, 'container-error', 'docker', ['run', 'changed'], 6), root => {const row = JSON.parse(readFileSync(join(root, 'native-error.json'))); row.status = 0; put(root, 'native-error.json', row);}, - root => {const row = JSON.parse(readFileSync(join(root, 'native-result.json'))); row.archive.path = 'prismpm-0.4.0-aarch64-unknown-linux-gnu.tar.gz'; put(root, 'native-result.json', row);}, + root => {const row = JSON.parse(readFileSync(join(root, 'native-result.json'))); row.archive.path = `prismpm-${workspaceVersion()}-aarch64-unknown-linux-gnu.tar.gz`; put(root, 'native-result.json', row);}, root => {const row = JSON.parse(readFileSync(join(root, 'container-check.json'))); commandFixture(root, 'container-check', row.command, row.arguments, 0, 'different success');}, ]], ]) for (const mutate of changes) {