Skip to content

Commit 3138524

Browse files
authored
Merge pull request #2542 from github/squad/2538-codeql-workflows
fix: harden release and workflow inputs
2 parents cbaef50 + 30f46a0 commit 3138524

21 files changed

Lines changed: 11798 additions & 54 deletions

‎.github/workflows/squad-standalone-release.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
steps:
117117
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
118118
with:
119-
ref: ${{ inputs.source_sha }}
119+
ref: ${{ github.sha }}
120120
fetch-depth: 0
121121
- name: Validate inputs
122122
id: validate
@@ -231,7 +231,7 @@ jobs:
231231
steps:
232232
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
233233
with:
234-
ref: ${{ inputs.source_sha }}
234+
ref: ${{ github.sha }}
235235
fetch-depth: 0
236236

237237
- name: Verify exact source checkout
@@ -363,7 +363,7 @@ jobs:
363363
steps:
364364
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
365365
with:
366-
ref: ${{ inputs.source_sha }}
366+
ref: ${{ github.sha }}
367367
fetch-depth: 0
368368
- name: Verify exact source checkout
369369
env:
@@ -514,7 +514,7 @@ jobs:
514514
steps:
515515
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
516516
with:
517-
ref: ${{ inputs.source_sha }}
517+
ref: ${{ github.sha }}
518518
fetch-depth: 0
519519

520520
- name: Verify exact source checkout
@@ -587,7 +587,7 @@ jobs:
587587
steps:
588588
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
589589
with:
590-
ref: ${{ inputs.source_sha }}
590+
ref: ${{ github.sha }}
591591
fetch-depth: 0
592592
path: release-source
593593
- name: Verify exact source checkout
@@ -770,7 +770,7 @@ jobs:
770770
steps:
771771
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
772772
with:
773-
ref: ${{ inputs.source_sha }}
773+
ref: ${{ github.sha }}
774774
fetch-depth: 0
775775
path: release-source
776776
- name: Verify exact source checkout

‎.github/workflows/squad-workflow-lint.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,18 @@ jobs:
5353
if: github.event_name == 'workflow_dispatch'
5454
env:
5555
SOURCE_SHA: ${{ inputs.sha }}
56+
DISPATCH_SHA: ${{ github.sha }}
5657
run: |
5758
[[ "$SOURCE_SHA" =~ ^[0-9a-f]{40}$ ]] || { echo "::error::sha must be a full lowercase 40-hex SHA, got '$SOURCE_SHA'"; exit 1; }
59+
[ "$SOURCE_SHA" = "$DISPATCH_SHA" ] || { echo "::error::sha must match the selected workflow ref"; exit 1; }
5860
5961
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
6062
if: github.event_name != 'workflow_dispatch'
6163

6264
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
6365
if: github.event_name == 'workflow_dispatch'
6466
with:
65-
ref: ${{ inputs.sha }}
67+
ref: ${{ github.sha }}
6668
fetch-depth: 0
6769

6870
- name: Assert checkout is exactly the requested SHA

‎docs/src/content/docs/scenarios/upgrading.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,14 @@ Every row below is a pinned, published artifact of an older Squad release driven
183183
184184
### Runs
185185

186-
All recorded runs executed against **one tree**, commit `9b254ba858abc19ef62e513993d9802312bfe34c`, with harness hash `a9713d320fdb479c…` (sha256 over the suite, renderer, workflow, fs hook and this fixture minus `runs`; the integrity test refuses a recorded run whose harness differs from the committed one, so folding results may change nothing but the runs data).
186+
All recorded runs executed against **one tree**, commit `f6c82545c764f1e1fbf4dd19f3ec4606b93f85f2`, with harness hash `ed7a6a62ab80de5d…` (sha256 over the suite, renderer, workflow, fs hook and this fixture minus `runs`; the integrity test refuses a recorded run whose harness differs from the committed one, so folding results may change nothing but the runs data).
187187

188188
| Platform | Arch | Node | Target | Tree (targetSha) | Trigger | Recorded | Outcome |
189189
|----------|------|------|--------|------------------|---------|----------|---------|
190-
| Linux (`linux`) | x64 | v22.23.4 | v2.0.0-preview.4 | `9b254ba858ab` | [pull_request](https://github.com/github/squad/actions/runs/43147851248) | 2026-11-12 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). |
191-
| Windows (`win32`) | x64 | v22.23.4 | v2.0.0-preview.4 | `9b254ba858ab` | [pull_request](https://github.com/github/squad/actions/runs/43147851248) | 2026-11-12 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). |
190+
| Linux (`linux`) | x64 | v22.23.4 | v2.0.0 | `f6c82545c764` | [pull_request](https://github.com/github/squad/actions/runs/44559093526) | 2026-11-19 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). |
191+
| Windows (`win32`) | x64 | v22.23.5 | v2.0.0 | `f6c82545c764` | [pull_request](https://github.com/github/squad/actions/runs/44559093526) | 2026-11-19 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). |
192+
193+
_Earlier runs remain in `historicalRuns` in the fixture; they do not attest the current harness._
192194

193195
### Producers (pinned, immutable provenance)
194196

@@ -395,12 +397,12 @@ Recorded by the `downgrade-probe` check (dry-run on a copy; the only assertion i
395397

396398
| Platform | Producer | Shapes | Observed |
397399
|----------|----------|--------|----------|
398-
| `linux` | 0.9.1 | all 4 shapes | exit 0, last lines "[32m✓[0m refreshed .squad/templates/ \| Upgrade complete: v2.0.0-preview.4 → v0.9.1 \| [2mPreserves user state: team.md, decisions/, agents/*/history.md[0m"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) |
400+
| `linux` | 0.9.1 | all 4 shapes | exit 0, last lines "[32m✓[0m refreshed .squad/templates/ \| Upgrade complete: v2.0.0 → v0.9.1 \| [2mPreserves user state: team.md, decisions/, agents/*/history.md[0m"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) |
399401
| `linux` | 0.13.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing |
400402
| `linux` | 1.0.0 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing |
401403
| `linux` | 1.0.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing |
402404
| `linux` | 1.1.0 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing |
403-
| `win32` | 0.9.1 | all 4 shapes | exit 0, last lines "[32m✓[0m refreshed .squad/templates/ \| Upgrade complete: v2.0.0-preview.4 → v0.9.1 \| [2mPreserves user state: team.md, decisions/, agents/*/history.md[0m"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) |
405+
| `win32` | 0.9.1 | all 4 shapes | exit 0, last lines "[32m✓[0m refreshed .squad/templates/ \| Upgrade complete: v2.0.0 → v0.9.1 \| [2mPreserves user state: team.md, decisions/, agents/*/history.md[0m"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) |
404406
| `win32` | 0.13.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing |
405407
| `win32` | 1.0.0 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing |
406408
| `win32` | 1.0.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing |

‎scripts/pr-readiness.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ export const MAX_FILE_LIST = 50;
321321
*/
322322
export function sanitizeFilename(name) {
323323
return name
324+
.replace(/\\/g, '\\\\')
324325
.replace(/\|/g, '\\|')
325326
.replace(/`/g, "'")
326327
.replace(/[\r\n]+/g, ' ');

‎scripts/release/build-manifest.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export function buildManifest(opts) {
173173
}
174174

175175
export function renderMarkdown(m) {
176+
const escapeCell = (value) => String(value).replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
176177
let md = `# Squad 2.0 verification manifest — \`${m.target.commit.slice(0, 8)}\` (${m.target.version})\n\nGenerated ${m.generatedAt} by \`${m.generator.script}\` (sha256 \`${m.generator.scriptSha256.slice(0, 12)}…\`, ${m.generator.mode}). Schema \`${m.schemaVersion}\`. Presence facts (carried / anchorPresent / contentEvidencePresent) and behavioral evidence (tree equality, cited CI run, regression tests) are reported separately.\n\n`;
177178
md += `## Target\n\n- Commit \`${m.target.commit}\` on \`${m.target.branch ?? '?'}\`\n- Tree \`${m.target.tree}\`\n- Verify: \`${m.target.immutableVerification.commitCommand}\`; \`${m.target.immutableVerification.treeCommand}\`\n\n`;
178179
md += `## Stack #${m.stack.id}\n\n| Layer | PR | Head tree | Squash tree | Equal |\n|---|---:|---|---|---|\n`;
@@ -183,7 +184,7 @@ export function renderMarkdown(m) {
183184
md += `\n## Lockfiles\n\n${m.lockfiles.files} lockfiles, ${m.lockfiles.registryEntries} registry entries, **${m.lockfiles.violations} violations** (denied: ${m.lockfiles.deniedPatterns.map((d) => `\`${d}\``).join(', ')}).${m.lockfiles.externalNpmCi ? ` External \`npm ci\`: \`${m.lockfiles.externalNpmCi.command}\` → exit ${m.lockfiles.externalNpmCi.exitCode}.` : ''}\n\n`;
184185
md += `## Tests\n\n${m.tests.source}: total ${m.tests.numTotalTests}; ${Object.entries(m.tests.byStatus).map(([k, v]) => `${v} ${k}`).join(', ')}; categories ${JSON.stringify(m.tests.byCategory)}; counts sum: **${m.tests.countsSum}**; unlisted: **${m.tests.unlistedTests}**; skipped files: ${m.tests.skippedFiles.join(', ') || 'none'}.\n\n`;
185186
md += `## Closure matrix\n\n**${m.closure.carried}/${m.closure.trackedItems} carried** (${m.closure.notCarried} not carried); **${m.closure.contentEvidencePresent} with code-level evidence**, ${m.closure.presenceOnly} presence-only; anchors present: ${m.closure.anchorPresent}.\n\n| ID | Anchor | Kind | Implementation symbol | Regression tests (defined / executed) | Carried | Content evidence |\n|---|---|---|---|---|---|---|\n`;
186-
for (const i of m.closure.items) md += `| ${i.id} | \`${String(i.anchor ?? '—').replace(/\|/g, '\\|')}\` in \`${i.anchorLocation ?? '—'}\` | ${i.anchorKind} | ${i.implementationSymbol ? `\`${i.implementationSymbol.symbol}\` in \`${i.implementationSymbol.file}\`` : '—'} | ${i.regressionTests.length ? i.regressionTests.map((t) => `${t.definedIn ? '✓' : '✗'}/${t.executedInCitedReport === null ? '?' : t.executedInCitedReport ? '✓' : '✗'} ${t.title.replace(/\|/g, '\\|')}`).join('<br>') : '—'} | ${i.carried ? 'yes' : 'NO'} | ${i.contentEvidencePresent ? 'yes' : i.presenceOnly ? 'presence-only' : 'NO'} |\n`;
187+
for (const i of m.closure.items) md += `| ${i.id} | \`${escapeCell(i.anchor ?? '—')}\` in \`${i.anchorLocation ?? '—'}\` | ${i.anchorKind} | ${i.implementationSymbol ? `\`${i.implementationSymbol.symbol}\` in \`${i.implementationSymbol.file}\`` : '—'} | ${i.regressionTests.length ? i.regressionTests.map((t) => `${t.definedIn ? '✓' : '✗'}/${t.executedInCitedReport === null ? '?' : t.executedInCitedReport ? '✓' : '✗'} ${escapeCell(t.title)}`).join('<br>') : '—'} | ${i.carried ? 'yes' : 'NO'} | ${i.contentEvidencePresent ? 'yes' : i.presenceOnly ? 'presence-only' : 'NO'} |\n`;
187188
md += `\n## Behavioral evidence\n\n- Tree equality: ${m.behavioralEvidence.treeEquality.layersEqual}/${m.behavioralEvidence.treeEquality.layersChecked} layers equal (${m.behavioralEvidence.treeEquality.layersUnavailable} unavailable in this clone)\n- Cited CI run: ${m.behavioralEvidence.citedCiRun.url} at \`${m.behavioralEvidence.citedCiRun.headSha.slice(0, 8)}\` (matches target: ${m.behavioralEvidence.citedCiRun.matchesTarget})\n- Regression tests: ${m.behavioralEvidence.regressionTests.titlesDefinedInTree}/${m.behavioralEvidence.regressionTests.titlesCited} cited titles defined in the tree; ${m.behavioralEvidence.regressionTests.reportAvailable ? `${m.behavioralEvidence.regressionTests.titlesExecutedInReport} executed in the cited report` : 'no vitest report available to this generator (executed = unknown)'}\n\n`;
188189
if (m.comparison.baselineCommit) md += `## Comparison\n\nBaseline \`${m.comparison.baselineCommit.slice(0, 8)}\`${m.comparison.diffStat ? `: ${m.comparison.diffStat.raw}` : ''}. ${m.comparison.verdict ?? ''}\n\n${(m.comparison.firstParentCommits ?? []).map((c) => `- \`${c.sha.slice(0, 8)}\` ${c.subject}`).join('\n')}\n`;
189190
return md;

‎scripts/release/check-release-scripts.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function quotedArgumentSpansNewline(source, start) {
5454

5555
export function findWorkflowJavaScriptViolations(text, file = '<workflow>') {
5656
const violations = [];
57-
const evalPattern = /\bnode(?:\.exe)?(?:(?:[ \t]+|\\\r?\n[ \t]*)+--[A-Za-z0-9-]+(?:=[^ \t\r\n]+)?)*(?:[ \t]+|\\\r?\n[ \t]*)+(?:--eval|--print|-(?:pe|ep|e|p))(?=[ \t=\\\r\n"']|$)/g;
57+
const evalPattern = /\bnode(?:\.exe)?(?:(?:[ \t]|\\\r?\n)+--[A-Za-z0-9-]+(?:=[^ \t\r\n]+)?)*(?:[ \t]|\\\r?\n)+(?:--eval|--print|-(?:pe|ep|e|p))(?=[ \t=\\\r\n"']|$)/g;
5858
const heredocPattern = /\bnode(?:\.exe)?\s+(?:-\s+)?<<['"]?[A-Za-z_][A-Za-z0-9_]*['"]?/g;
5959
for (const scalar of runScalars(text, file)) {
6060
for (const match of scalar.source.matchAll(heredocPattern)) {

‎scripts/render-host-feature-matrix.mjs‎

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,64 @@ export const CAPABILITIES = ['supported', 'degraded', 'unsupported', 'n/a'];
2424
export const VALIDATION_LEVELS = ['validated-live', 'validated-test', 'static-only', 'untested', 'blocked'];
2525
const CAPABILITY_ICON = { supported: '✅', degraded: '⚠️', unsupported: '❌', 'n/a': '—' };
2626
const VALIDATION_ICON = { 'validated-live': '🖥️', 'validated-test': '🧪', 'static-only': '📄', untested: '❔', blocked: '⛔' };
27+
function escapePlain(value) {
28+
let backslashes = 0;
29+
let result = '';
30+
for (const char of value) {
31+
if (char === '|' && backslashes % 2 === 0) result += '\\';
32+
result += char;
33+
backslashes = char === '\\' ? backslashes + 1 : 0;
34+
}
35+
return result;
36+
}
37+
38+
function escapeCodeSpan(content, delimiter) {
39+
let backslashes = 0;
40+
for (const char of content) {
41+
if (char === '\\') {
42+
backslashes++;
43+
} else {
44+
if (char === '|' && backslashes % 2 !== 0) {
45+
// A table cannot represent an odd number of backslashes before a pipe
46+
// inside a Markdown code span; use equivalent, escaped inline HTML.
47+
let text = content.replace(/\r\n?|\n/g, ' ');
48+
if (text.startsWith(' ') && text.endsWith(' ') && /[^ ]/.test(text)) text = text.slice(1, -1);
49+
const encoded = Array.from(text, (char) =>
50+
/[A-Za-z0-9 ]/.test(char) ? char : `&#${char.codePointAt(0)};`,
51+
).join('');
52+
return `<code>${encoded}</code>`;
53+
}
54+
backslashes = 0;
55+
}
56+
}
57+
let escaped = '';
58+
for (const char of content) escaped += char === '|' ? '\\|' : char;
59+
return `${delimiter}${escaped}${delimiter}`;
60+
}
61+
62+
function escapeTableCell(value) {
63+
const runs = [...value.matchAll(/`+/g)].map((match) => {
64+
let slashes = 0;
65+
for (let i = match.index - 1; i >= 0 && value[i] === '\\'; i--) slashes++;
66+
return { start: match.index, end: match.index + match[0].length, delimiter: match[0], escaped: slashes % 2 !== 0 };
67+
});
68+
const next = new Map();
69+
const closing = new Map();
70+
for (const run of [...runs].reverse()) {
71+
if (next.has(run.delimiter)) closing.set(run.start, next.get(run.delimiter));
72+
next.set(run.delimiter, run);
73+
}
74+
let result = '';
75+
let cursor = 0;
76+
for (const run of runs) {
77+
const end = closing.get(run.start);
78+
if (run.start < cursor || run.escaped || !end) continue;
79+
result += escapePlain(value.slice(cursor, run.start));
80+
result += escapeCodeSpan(value.slice(run.end, end.start), run.delimiter);
81+
cursor = end.end;
82+
}
83+
return result + escapePlain(value.slice(cursor));
84+
}
2785

2886
export function evidenceKind(entry) {
2987
return entry.split(':')[0];
@@ -122,7 +180,7 @@ export function render(matrix) {
122180
lines.push('| Feature | Test (title; each generated test appends the host as `[<host>]`) | Hosts | Meaning |');
123181
lines.push('|---------|-----------------------------|-------|---------|');
124182
for (const e of matrix.expectedFailures) {
125-
lines.push(`| [${e.featureId}](#${e.featureId}) | \`${e.test.replace(/\|/g, '\\|')}\` (${e.kind}${e.perHost ? ', per host' : ''}) | ${(e.hosts ?? []).map((h) => `\`${h}\``).join(' ')} | ${e.meaning} |`);
183+
lines.push(`| [${e.featureId}](#${e.featureId}) | ${escapeTableCell(`\`${e.test}\``)} (${e.kind}${e.perHost ? ', per host' : ''}) | ${(e.hosts ?? []).map((h) => `\`${h}\``).join(' ')} | ${e.meaning} |`);
126184
}
127185
lines.push('');
128186
}
@@ -145,7 +203,7 @@ export function render(matrix) {
145203
const c = f.cells[h];
146204
return `${CAPABILITY_ICON[c.capability]} ${VALIDATION_ICON[c.validation]}`;
147205
});
148-
lines.push(`| [${f.name.replace(/\|/g, '\\|')}](#${f.id}) | ${f.dependsOn.join(', ')}${f.hostIndependent ? ' (host-independent)' : ''} | ${cells.join(' | ')} |`);
206+
lines.push(`| [${escapeTableCell(f.name)}](#${f.id}) | ${f.dependsOn.join(', ')}${f.hostIndependent ? ' (host-independent)' : ''} | ${cells.join(' | ')} |`);
149207
}
150208
lines.push('');
151209
}
@@ -167,7 +225,7 @@ export function render(matrix) {
167225
const notes = c.notes ? ` _${c.notes}_` : '';
168226
const flags = [c.expectedFailure ? ' (expected failure)' : '', c.blockedReason ? ` — ${c.blockedReason}` : ''].join('');
169227
const evidence = c.evidence.map((v) => `\`${v}\``).join('<br>') || '—';
170-
lines.push(`| \`${h}\` | ${CAPABILITY_ICON[c.capability]} ${c.capability} | ${VALIDATION_ICON[c.validation]} ${c.validation}${flags.replace(/\|/g, '\\|')} | ${c.mechanism.replace(/\|/g, '\\|')}${notes.replace(/\|/g, '\\|')} | ${evidence.replace(/\|/g, '\\|')} |`);
228+
lines.push(`| \`${h}\` | ${CAPABILITY_ICON[c.capability]} ${c.capability} | ${VALIDATION_ICON[c.validation]} ${c.validation}${escapeTableCell(flags)} | ${escapeTableCell(c.mechanism)}${escapeTableCell(notes)} | ${escapeTableCell(evidence)} |`);
171229
}
172230
lines.push('');
173231
}
@@ -179,7 +237,7 @@ export function render(matrix) {
179237
lines.push('| Date | Host | Scenario | Outcome | Observed tools | Notes |');
180238
lines.push('|------|------|----------|---------|----------------|-------|');
181239
const OUTCOME = { pass: '✅ pass', partial: '⚠️ partial', fail: '🔴 fail', blocked: '⛔ blocked' };
182-
for (const r of matrix.liveRuns) lines.push(`| ${r.date} | \`${r.host}\` | ${r.scenario} | ${OUTCOME[r.outcome] ?? r.outcome} | ${(r.observedTools ?? []).map((t) => `\`${t}\``).join(', ') || '—'} | ${(r.notes ?? '').replace(/\|/g, '\\|')} |`);
240+
for (const r of matrix.liveRuns) lines.push(`| ${r.date} | \`${r.host}\` | ${r.scenario} | ${OUTCOME[r.outcome] ?? r.outcome} | ${(r.observedTools ?? []).map((t) => `\`${t}\``).join(', ') || '—'} | ${escapeTableCell(r.notes ?? '')} |`);
183241
lines.push('');
184242
}
185243
return lines.join('\n') + '\n';

0 commit comments

Comments
 (0)