From 5ba952f56a7d3e0c457d30eed7200d3bbc781eb4 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Mon, 19 Oct 2026 05:15:25 +0000 Subject: [PATCH 1/2] fix(ci): run architecture check without --report on PR heads that predate it Same-repo PRs check out the PR head, so a branch cut before the architecture CLI gained --report rejected the flag and failed lint, cascading into the other required checks. Only pass --report when the checked-out CLI knows it; the check's own exit code is unchanged. Co-Authored-By: Christian Byrne Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci-lint-format.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-lint-format.yaml b/.github/workflows/ci-lint-format.yaml index c44406646ce..dda5665be5c 100644 --- a/.github/workflows/ci-lint-format.yaml +++ b/.github/workflows/ci-lint-format.yaml @@ -61,7 +61,13 @@ jobs: - name: Verify architecture contracts id: architecture if: ${{ !cancelled() && steps.setup.outcome == 'success' && hashFiles('tools/architecture/src/cli.ts') != '' }} - run: pnpm architecture:check --report "$RUNNER_TEMP/architecture-findings.md" + # PR heads branched before --report existed reject it; drop the fallback once those have rebased. + run: | + if grep -q -- '--report' tools/architecture/src/cli.ts; then + pnpm architecture:check --report "$RUNNER_TEMP/architecture-findings.md" + else + pnpm architecture:check + fi - name: Check server facts on changed lines env: From a24fc4e01bd000576f6deeff5a1b8049e7c36425 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Mon, 19 Oct 2026 05:52:47 +0000 Subject: [PATCH 2/2] fix(ci): probe architecture CLI for --report support instead of grepping its source Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci-lint-format.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-lint-format.yaml b/.github/workflows/ci-lint-format.yaml index dda5665be5c..cc7cd6774af 100644 --- a/.github/workflows/ci-lint-format.yaml +++ b/.github/workflows/ci-lint-format.yaml @@ -63,9 +63,13 @@ jobs: if: ${{ !cancelled() && steps.setup.outcome == 'success' && hashFiles('tools/architecture/src/cli.ts') != '' }} # PR heads branched before --report existed reject it; drop the fallback once those have rebased. run: | - if grep -q -- '--report' tools/architecture/src/cli.ts; then - pnpm architecture:check --report "$RUNNER_TEMP/architecture-findings.md" + findings="$RUNNER_TEMP/architecture-findings.md" + probe=$(GITHUB_ACTIONS= pnpm --silent architecture:check --report= 2>&1 || true) + if grep -q -- '--report requires a file path' <<< "$probe"; then + pnpm architecture:check --report "$findings" else + echo "::warning::This PR head's architecture CLI predates --report; rebase onto main to get findings in the PR report." + echo 'Findings are in the workflow run log and annotations; this PR head predates `--report`.' > "$findings" pnpm architecture:check fi