fix: accept pnpm release verifier arguments

This commit is contained in:
2026-08-24 13:48:46 +08:00
parent 8820e82530
commit 13efe84d42
3 changed files with 8 additions and 0 deletions

View File

@@ -96,6 +96,11 @@
Windows Playwright worker exit with code `3221226505`; both isolated paths Windows Playwright worker exit with code `3221226505`; both isolated paths
passed and the final uninterrupted full run passed. passed and the final uninterrupted full run passed.
- Final-product artifact verification is pending. - Final-product artifact verification is pending.
- First Windows packaging on candidate `8820e82` passed, and the existing
Windows artifact verifier passed. The first invocation of the new Pi verifier
exposed that pnpm `10.33.4` forwards the conventional `--` separator to the
script; the parser is being corrected and the artifact will be rebuilt from
the corrected commit before evidence is accepted.
## Follow-ups ## Follow-ups

View File

@@ -26,6 +26,7 @@ export function parsePiArtifactVerifierArgs(argv, projectRoot = process.cwd()) {
index += 1; index += 1;
return value; return value;
}; };
if (argument === '--') continue;
if (argument === '--app-exe') options.executable = resolve(next()); if (argument === '--app-exe') options.executable = resolve(next());
else if (argument === '--report') options.reportPath = resolve(next()); else if (argument === '--report') options.reportPath = resolve(next());
else if (argument === '--samples') options.samples = Number.parseInt(next(), 10); else if (argument === '--samples') options.samples = Number.parseInt(next(), 10);

View File

@@ -92,6 +92,8 @@ describe('final Pi product artifact verification', () => {
'--timeout-ms', '12000', '--timeout-ms', '12000',
'--report', 'release/evidence/pi.json', '--report', 'release/evidence/pi.json',
], 'D:\\repo')).toMatchObject({ samples: 5, timeoutMs: 12_000 }); ], 'D:\\repo')).toMatchObject({ samples: 5, timeoutMs: 12_000 });
expect(parsePiArtifactVerifierArgs(['--', '--samples', '3'], 'D:\\repo'))
.toMatchObject({ samples: 3 });
expect(() => parsePiArtifactVerifierArgs(['--samples', '0'], 'D:\\repo')) expect(() => parsePiArtifactVerifierArgs(['--samples', '0'], 'D:\\repo'))
.toThrow('--samples must be a positive integer'); .toThrow('--samples must be a positive integer');
expect(() => parsePiArtifactVerifierArgs(['--unknown'], 'D:\\repo')) expect(() => parsePiArtifactVerifierArgs(['--unknown'], 'D:\\repo'))