Commitf6f278c3Recorded19 Oct 2026Repositorysigil-http3
Create fresh preparation output directory and isolate rule per job
Changed
scripts/continuous-punch-window.mjs | 8 +++++---
scripts/phantom-continuous-punch-run.sh | 1 +
2 files changed, 6 insertions(+), 3 deletions(-)Diff
scripts/continuous-punch-window.mjsmodified
@@ -3,7 +3,7 @@ import { createHash, randomBytes } from 'node:crypto';
3
import { isIP } from 'node:net'; 4
import { copyFileSync, chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'; 5
import { hostname, networkInterfaces } from 'node:os';−6
import { join, resolve } from 'node:path';+6
import { basename, dirname, join, resolve } from 'node:path'; 7
import { fileURLToPath } from 'node:url'; 8
import { identity, inspectPlan, runTest, sameIdentity, stopRun } from './echo-lifecycle.mjs'; 9
import { preparePunchFirewall } from './punch-firewall.mjs';@@ -42,6 +42,8 @@ export function requestPrime(directory, rendezvousPath, controlFailed) {
42
43
async function run() { 44
+45
const jobId = basename(dirname(process.cwd()));+46
check(/^[a-z0-9][a-z0-9-]{0,63}$/.test(jobId), 'Invalid workspace name'); 47
const bindAddress = process.env.HTTP3_IPV6_ADDRESS; 48
check(isIP(bindAddress) === 6 && /^[23][0-9a-f:]+$/i.test(bindAddress), 'Expected current global /128'); 49
check(networkInterfaces()[process.env.HTTP3_INTERFACE]?.some(a => a.family === 'IPv6' && a.address === bindAddress && !a.internal),@@ -70,7 +72,7 @@ async function run() {
72
bindAddress, port: 43443, startedAt: new Date().toISOString(), expiresAt: new Date(deadline).toISOString(), 73
binarySha256: input.binarySha256, sourceRevision: process.env.HTTP3_SOURCE_REVISION, binarySourceRevision: input.sourceRevision }; 74
const statePath = join(directory, 'state.json'), firewall = join(directory, 'firewall');−73
preparePunchFirewall(firewall, { bindAddress, interfaceName: process.env.HTTP3_INTERFACE, supervisor, ruleComment: 'sigil-http3-example' });+75
preparePunchFirewall(firewall, { bindAddress, interfaceName: process.env.HTTP3_INTERFACE, supervisor, ruleComment: 'sigil-' + jobId }); 76
const cancellation = new AbortController(); 77
const stop = () => cancellation.abort(); 78
process.on('SIGTERM', stop); process.on('SIGINT', stop);@@ -88,7 +90,7 @@ async function run() {
90
const previousTestScope = process.env.HTTP3_PUNCH_TEST_LOOPBACK; 91
try { 92
save();−91
const config = { schema: 1, testId: 'phone-continuous-punch-002', expectedHost: hostname(), scope: 'ipv6-direct',+93
const config = { schema: 1, testId: 'phone-continuous-' + jobId, expectedHost: hostname(), scope: 'ipv6-direct', 94
bindAddress, port: 43443, binary, binarySha256: input.binarySha256, certificateDirectory, 95
authority: `[${bindAddress}]:43443`, origins: [new URL(page).origin], interopReceipt: join(directory, 'interop.json'), 96
runDirectory: join(directory, 'server'), lifetimeSeconds: 1800 };scripts/phantom-continuous-punch-run.shmodified
@@ -2,6 +2,7 @@
2
set -euo pipefail 3
cd "$(dirname "$0")/.." 4
umask 077+5
mkdir -p build 6
node --check scripts/continuous-punch-window.mjs 7
node --check scripts/punch-firewall.mjs 8
timeout --foreground 15 node --test test/test-continuous-punch-window.mjs