diff --git a/.qa/task-agreement-release/verify-seal.mjs b/.qa/task-agreement-release/verify-seal-corrected.mjs index 4dfab29c..dcc7d12f 100644 --- a/.qa/task-agreement-release/verify-seal.mjs +++ b/.qa/task-agreement-release/verify-seal-corrected.mjs @@ -25,7 +25,9 @@ const walk = directory => fs.readdirSync(directory, { withFileTypes: true }).fla }); assert.deepEqual(walk(root).filter(name => name !== 'manifest.json').sort(), [...names].sort()); assert.equal(manifest.count, names.size); assert.equal(manifest.bytes, total); assert.equal(manifest.realModelRequests, 0); -assert.equal(hash(fs.readFileSync('docs/verify-task-agreement-1.25.mjs')), hash(bytes('receipts/verify-seal.mjs.txt'))); +const supplementRoot=path.resolve('docs/task-agreement-1.25-supplement'),supplement=JSON.parse(fs.readFileSync(path.join(supplementRoot,'manifest.json')));assert.equal(supplement.kind,'task-agreement-1.25-verifier-correction'); +const supplementaryNames=new Set();let supplementaryBytes=0;for(const row of supplement.entries){assert.ok(row.path&&!row.path.includes('\\')&&!row.path.split('/').includes('..')&&!path.isAbsolute(row.path));assert.equal(supplementaryNames.has(row.path),false);supplementaryNames.add(row.path);const data=fs.readFileSync(path.join(supplementRoot,row.path));assert.equal(data.length,row.bytes);assert.equal(hash(data),row.sha256);supplementaryBytes+=data.length;} +assert.equal(supplement.count,supplementaryNames.size);assert.equal(supplement.bytes,supplementaryBytes);assert.equal(supplement.originalManifestSha256,hash(bytes('manifest.json')));assert.equal(hash(fs.readFileSync(path.join(supplementRoot,'verifier-original.mjs.txt'))),hash(bytes('receipts/verify-seal.mjs.txt')));assert.equal(hash(fs.readFileSync('docs/verify-task-agreement-1.25.mjs')),hash(fs.readFileSync(path.join(supplementRoot,'verifier-corrected.mjs.txt')))); const freeze = read('receipts/freeze.json'), release = read('receipts/candidate.json'), identity = read('release-identity.json'); assert.equal(freeze.sourceCommit, manifest.sourceCommit); assert.equal(identity.sourceCommit, freeze.sourceCommit); assert.equal(release.documentation.sourceCommit, freeze.sourceCommit); assert.equal(identity.version, '1.25.0'); @@ -53,7 +55,7 @@ const stages = ['rebuild', 'archives', 'portable', 'install', 'source-a', 'sourc for (const stage of stages) { const receipt = read('receipts/receipts/' + (stage === 'source-a' ? 'source-a-recheck' : stage === 'install' ? 'install-recheck' : stage) + '.json'); assert.equal(receipt.success, true, stage); assert.equal(receipt.sourceCommit, freeze.sourceCommit); assert.equal(receipt.candidate, release.portableRoot); - assert.equal(hash(bytes('receipts/logs/' + stage + '.log')), receipt.logSha256); + assert.equal(hash(bytes('receipts/logs/' + path.basename(receipt.log))), receipt.logSha256); } const build = read('validation/rebuild/result.json'); assert.equal(build.success, true); assert.equal(build.sourceCommit, freeze.sourceCommit); assert.equal(build.compiled.length, freeze.compiled.length); assert.deepEqual(build.mismatches, []); @@ -165,6 +167,8 @@ if (index) { const data = bytes(name), oid = blob(data); assert.equal(blobs.get('docs/task-agreement-1.25-evidence/' + name), oid, name + ' indexed bytes'); } + const supplementalRows=execFileSync('git',['ls-files','--stage','-z','--','docs/task-agreement-1.25-supplement'],{encoding:'utf8',maxBuffer:1024*1024}).split('\0').filter(Boolean), supplementalBlobs=new Map(supplementalRows.map(row=>{const[meta,file]=row.split('\t');return[file,meta.split(' ')[1]];})); + for(const name of [...supplementaryNames,'manifest.json']){const data=fs.readFileSync(path.join(supplementRoot,name));assert.equal(supplementalBlobs.get('docs/task-agreement-1.25-supplement/'+name),blob(data),name+' supplemental indexed bytes');} } console.log(JSON.stringify({ success: true, files: names.size, bytes: total, sourceCommit: freeze.sourceCommit, inputs: freeze.inputs.length, compiled: freeze.compiled.length, - independentInputs: build.inputCount, rawArtifacts: rawArtifacts.length, uiRuns, originalArtifacts, originalSnapshots, isolatedInstallGroups: 12, realModelRequests: 0, indexChecked: index })); + independentInputs: build.inputCount, rawArtifacts: rawArtifacts.length, uiRuns, originalArtifacts, originalSnapshots, isolatedInstallGroups: 12, supplementFiles:supplementaryNames.size,supplementBytes:supplementaryBytes,realModelRequests: 0, indexChecked: index }));