Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/squad-standalone-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
with:
ref: ${{ inputs.source_sha }}
ref: ${{ github.sha }}
fetch-depth: 0
- name: Validate inputs
id: validate
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
with:
ref: ${{ inputs.source_sha }}
ref: ${{ github.sha }}
fetch-depth: 0

- name: Verify exact source checkout
Expand Down Expand Up @@ -363,7 +363,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
with:
ref: ${{ inputs.source_sha }}
ref: ${{ github.sha }}
fetch-depth: 0
- name: Verify exact source checkout
env:
Expand Down Expand Up @@ -514,7 +514,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
with:
ref: ${{ inputs.source_sha }}
ref: ${{ github.sha }}
fetch-depth: 0

- name: Verify exact source checkout
Expand Down Expand Up @@ -587,7 +587,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
with:
ref: ${{ inputs.source_sha }}
ref: ${{ github.sha }}
fetch-depth: 0
path: release-source
- name: Verify exact source checkout
Expand Down Expand Up @@ -770,7 +770,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
with:
ref: ${{ inputs.source_sha }}
ref: ${{ github.sha }}
fetch-depth: 0
path: release-source
- name: Verify exact source checkout
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/squad-workflow-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,18 @@ jobs:
if: github.event_name == 'workflow_dispatch'
env:
SOURCE_SHA: ${{ inputs.sha }}
DISPATCH_SHA: ${{ github.sha }}
run: |
[[ "$SOURCE_SHA" =~ ^[0-9a-f]{40}$ ]] || { echo "::error::sha must be a full lowercase 40-hex SHA, got '$SOURCE_SHA'"; exit 1; }
[ "$SOURCE_SHA" = "$DISPATCH_SHA" ] || { echo "::error::sha must match the selected workflow ref"; exit 1; }

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
if: github.event_name != 'workflow_dispatch'

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ inputs.sha }}
ref: ${{ github.sha }}
fetch-depth: 0

- name: Assert checkout is exactly the requested SHA
Expand Down
12 changes: 7 additions & 5 deletions docs/src/content/docs/scenarios/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,14 @@ Every row below is a pinned, published artifact of an older Squad release driven

### Runs

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).
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).

| Platform | Arch | Node | Target | Tree (targetSha) | Trigger | Recorded | Outcome |
|----------|------|------|--------|------------------|---------|----------|---------|
| 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). |
| 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). |
| 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). |
| 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). |

_Earlier runs remain in `historicalRuns` in the fixture; they do not attest the current harness._

### Producers (pinned, immutable provenance)

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

| Platform | Producer | Shapes | Observed |
|----------|----------|--------|----------|
| `linux` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0-preview.4 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; 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 …) |
| `linux` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; 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 …) |
| `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 |
| `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 |
| `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 |
| `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 |
| `win32` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0-preview.4 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; 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 …) |
| `win32` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; 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 …) |
| `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 |
| `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 |
| `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 |
Expand Down
1 change: 1 addition & 0 deletions scripts/pr-readiness.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ export const MAX_FILE_LIST = 50;
*/
export function sanitizeFilename(name) {
return name
.replace(/\\/g, '\\\\')
.replace(/\|/g, '\\|')
.replace(/`/g, "'")
.replace(/[\r\n]+/g, ' ');
Expand Down
3 changes: 2 additions & 1 deletion scripts/release/build-manifest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export function buildManifest(opts) {
}

export function renderMarkdown(m) {
const escapeCell = (value) => String(value).replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
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`;
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`;
md += `## Stack #${m.stack.id}\n\n| Layer | PR | Head tree | Squash tree | Equal |\n|---|---:|---|---|---|\n`;
Expand All @@ -183,7 +184,7 @@ export function renderMarkdown(m) {
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`;
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`;
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`;
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`;
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`;
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`;
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`;
return md;
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/check-release-scripts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function quotedArgumentSpansNewline(source, start) {

export function findWorkflowJavaScriptViolations(text, file = '<workflow>') {
const violations = [];
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;
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;
const heredocPattern = /\bnode(?:\.exe)?\s+(?:-\s+)?<<['"]?[A-Za-z_][A-Za-z0-9_]*['"]?/g;
for (const scalar of runScalars(text, file)) {
for (const match of scalar.source.matchAll(heredocPattern)) {
Expand Down
66 changes: 62 additions & 4 deletions scripts/render-host-feature-matrix.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,64 @@ export const CAPABILITIES = ['supported', 'degraded', 'unsupported', 'n/a'];
export const VALIDATION_LEVELS = ['validated-live', 'validated-test', 'static-only', 'untested', 'blocked'];
const CAPABILITY_ICON = { supported: '✅', degraded: '⚠️', unsupported: '❌', 'n/a': '—' };
const VALIDATION_ICON = { 'validated-live': '🖥️', 'validated-test': '🧪', 'static-only': '📄', untested: '❔', blocked: '⛔' };
function escapePlain(value) {
let backslashes = 0;
let result = '';
for (const char of value) {
if (char === '|' && backslashes % 2 === 0) result += '\\';
result += char;
backslashes = char === '\\' ? backslashes + 1 : 0;
}
return result;
}

function escapeCodeSpan(content, delimiter) {
let backslashes = 0;
for (const char of content) {
if (char === '\\') {
backslashes++;
} else {
if (char === '|' && backslashes % 2 !== 0) {
// A table cannot represent an odd number of backslashes before a pipe
// inside a Markdown code span; use equivalent, escaped inline HTML.
let text = content.replace(/\r\n?|\n/g, ' ');
if (text.startsWith(' ') && text.endsWith(' ') && /[^ ]/.test(text)) text = text.slice(1, -1);
const encoded = Array.from(text, (char) =>
/[A-Za-z0-9 ]/.test(char) ? char : `&#${char.codePointAt(0)};`,
).join('');
return `<code>${encoded}</code>`;
}
backslashes = 0;
}
}
let escaped = '';
for (const char of content) escaped += char === '|' ? '\\|' : char;
return `${delimiter}${escaped}${delimiter}`;
}

function escapeTableCell(value) {
const runs = [...value.matchAll(/`+/g)].map((match) => {
let slashes = 0;
for (let i = match.index - 1; i >= 0 && value[i] === '\\'; i--) slashes++;
return { start: match.index, end: match.index + match[0].length, delimiter: match[0], escaped: slashes % 2 !== 0 };
});
const next = new Map();
const closing = new Map();
for (const run of [...runs].reverse()) {
if (next.has(run.delimiter)) closing.set(run.start, next.get(run.delimiter));
next.set(run.delimiter, run);
}
let result = '';
let cursor = 0;
for (const run of runs) {
const end = closing.get(run.start);
if (run.start < cursor || run.escaped || !end) continue;
result += escapePlain(value.slice(cursor, run.start));
result += escapeCodeSpan(value.slice(run.end, end.start), run.delimiter);
cursor = end.end;
}
return result + escapePlain(value.slice(cursor));
}

export function evidenceKind(entry) {
return entry.split(':')[0];
Expand Down Expand Up @@ -122,7 +180,7 @@ export function render(matrix) {
lines.push('| Feature | Test (title; each generated test appends the host as `[<host>]`) | Hosts | Meaning |');
lines.push('|---------|-----------------------------|-------|---------|');
for (const e of matrix.expectedFailures) {
lines.push(`| [${e.featureId}](#${e.featureId}) | \`${e.test.replace(/\|/g, '\\|')}\` (${e.kind}${e.perHost ? ', per host' : ''}) | ${(e.hosts ?? []).map((h) => `\`${h}\``).join(' ')} | ${e.meaning} |`);
lines.push(`| [${e.featureId}](#${e.featureId}) | ${escapeTableCell(`\`${e.test}\``)} (${e.kind}${e.perHost ? ', per host' : ''}) | ${(e.hosts ?? []).map((h) => `\`${h}\``).join(' ')} | ${e.meaning} |`);
}
lines.push('');
}
Expand All @@ -145,7 +203,7 @@ export function render(matrix) {
const c = f.cells[h];
return `${CAPABILITY_ICON[c.capability]} ${VALIDATION_ICON[c.validation]}`;
});
lines.push(`| [${f.name.replace(/\|/g, '\\|')}](#${f.id}) | ${f.dependsOn.join(', ')}${f.hostIndependent ? ' (host-independent)' : ''} | ${cells.join(' | ')} |`);
lines.push(`| [${escapeTableCell(f.name)}](#${f.id}) | ${f.dependsOn.join(', ')}${f.hostIndependent ? ' (host-independent)' : ''} | ${cells.join(' | ')} |`);
}
lines.push('');
}
Expand All @@ -167,7 +225,7 @@ export function render(matrix) {
const notes = c.notes ? ` _${c.notes}_` : '';
const flags = [c.expectedFailure ? ' (expected failure)' : '', c.blockedReason ? ` — ${c.blockedReason}` : ''].join('');
const evidence = c.evidence.map((v) => `\`${v}\``).join('<br>') || '—';
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, '\\|')} |`);
lines.push(`| \`${h}\` | ${CAPABILITY_ICON[c.capability]} ${c.capability} | ${VALIDATION_ICON[c.validation]} ${c.validation}${escapeTableCell(flags)} | ${escapeTableCell(c.mechanism)}${escapeTableCell(notes)} | ${escapeTableCell(evidence)} |`);
}
lines.push('');
}
Expand All @@ -179,7 +237,7 @@ export function render(matrix) {
lines.push('| Date | Host | Scenario | Outcome | Observed tools | Notes |');
lines.push('|------|------|----------|---------|----------------|-------|');
const OUTCOME = { pass: '✅ pass', partial: '⚠️ partial', fail: '🔴 fail', blocked: '⛔ blocked' };
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, '\\|')} |`);
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 ?? '')} |`);
lines.push('');
}
return lines.join('\n') + '\n';
Expand Down
Loading
Loading