Public dry run dryrun-309831e1e021
Source commit: 309831e1e021f962c118452336776fd9a94025f9 Public tree identity: sha256:6fa95c1745579bd6256dbeb3d476db0b07c2f24aa9213b0f7783ce1adfc8aca5
This commit is contained in:
commit
f22d0a5791
113 changed files with 39348 additions and 0 deletions
59
scripts/windows-validation-contract-smoke.js
Executable file
59
scripts/windows-validation-contract-smoke.js
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const repo = path.resolve(__dirname, "..");
|
||||
|
||||
function read(relativePath) {
|
||||
return fs.readFileSync(path.join(repo, relativePath), "utf8");
|
||||
}
|
||||
|
||||
function expect(source, name, pattern) {
|
||||
assert.match(source, pattern, `missing Windows validation evidence: ${name}`);
|
||||
}
|
||||
|
||||
const workflow = read(".forgejo/workflows/windows-validation.yml");
|
||||
const runnerSmoke = read("scripts/windows-runner-smoke.js");
|
||||
const readme = read("README.md");
|
||||
const publicAcceptance = read("scripts/acceptance-public.sh");
|
||||
const publicSplit = read("scripts/verify-public-split.sh");
|
||||
|
||||
expect(workflow, "manual workflow dispatch", /workflow_dispatch/);
|
||||
expect(workflow, "intermittent Forgejo Windows runner note", /intermittently online/);
|
||||
expect(workflow, "Windows runner label", /runs-on:\s*windows/);
|
||||
expect(workflow, "Windows validation acceptance report env", /DISASMER_WINDOWS_VALIDATION:\s*forgejo-windows-runner/);
|
||||
expect(workflow, "acceptance report step", /node scripts\/acceptance-report\.js windows/);
|
||||
expect(workflow, "Windows runtime unit coverage", /cargo test -p disasmer-node windows_backend_is_labeled_user_attached_dev_execution/);
|
||||
expect(workflow, "Windows runner smoke step", /node scripts\/windows-runner-smoke\.js/);
|
||||
|
||||
expect(runnerSmoke, "real Windows platform guard", /process\.platform !== "win32"/);
|
||||
expect(runnerSmoke, "CLI node attach function", /function runWindowsAttach/);
|
||||
expect(runnerSmoke, "CLI node attach command", /"node"[\s\S]*"attach"[\s\S]*"windows-command-dev"/);
|
||||
expect(runnerSmoke, "enrollment grant creation", /create_node_enrollment_grant[\s\S]*grant-forgejo-windows-attach/);
|
||||
expect(runnerSmoke, "CLI enrollment exchange asserted", /used_enrollment_exchange[\s\S]*true/);
|
||||
expect(runnerSmoke, "runtime enrollment grant", /grant-forgejo-windows-runtime/);
|
||||
expect(runnerSmoke, "runtime uses enrollment grant", /"--enrollment-grant"[\s\S]*grant/);
|
||||
expect(runnerSmoke, "Windows command task runs", /"windows-command-dev"[\s\S]*"cmd"[\s\S]*"echo disasmer-windows-runner"/);
|
||||
expect(runnerSmoke, "artifact metadata is asserted", /windows-runner-output\.txt[\s\S]*artifact_download_link/);
|
||||
expect(runnerSmoke, "Windows placement is asserted", /schedule_task[\s\S]*WindowsCommandDev[\s\S]*forgejo-windows-node/);
|
||||
expect(runnerSmoke, "debugger shows Windows virtual thread", /compile windows/);
|
||||
expect(runnerSmoke, "validation result artifact", /disasmer_windows_runner_validation/);
|
||||
|
||||
expect(readme, "docs mention manual Windows workflow", /manual `Windows validation`\s+workflow/);
|
||||
expect(readme, "docs mention intermittent runner", /intermittent Windows runner/);
|
||||
expect(readme, "docs mention CLI attach in Windows validation", /runs `disasmer node attach`/);
|
||||
expect(readme, "docs keep Windows unvalidated when report is not-run", /windows_validation: "not-run"[\s\S]*best-effort and unvalidated/);
|
||||
|
||||
for (const [scriptName, script] of [
|
||||
["public acceptance", publicAcceptance],
|
||||
["public split", publicSplit],
|
||||
]) {
|
||||
assert(
|
||||
script.includes("node scripts/windows-validation-contract-smoke.js"),
|
||||
`${scriptName} must run windows-validation-contract-smoke.js`
|
||||
);
|
||||
}
|
||||
|
||||
console.log("Windows validation contract smoke passed");
|
||||
Loading…
Add table
Add a link
Reference in a new issue