Skip to content
Merged
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: 11 additions & 1 deletion .github/workflows/ci-lint-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So never?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not never, but you are right that the comment gives no checkable trigger. Here is a concrete one: the fallback can go once no open PR has a merge base older than eb0e38a (#21015, merged 2026-10-19). Right now 142 open PRs were created before that merge. Some have been rebased since; the rest will rebase or go stale. I left the comment wording as it is because a push to this branch would dismiss your approval. If you would like the comment to name that commit, say so and I will push it. Otherwise I can drop the fallback in a small follow-up once that condition holds.

run: |
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this now run it multiple times?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sneaky =

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right: with --report= the full check never runs. parseOptions rejects the empty value (tools/architecture/src/cli.ts:197), and main returns 1 at line 208, before runArchitecture is called. So the probe costs only the time it takes to parse the arguments, and the real check still runs exactly once in whichever branch is chosen.

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
Comment thread
mattmillerai marked this conversation as resolved.
Resolved
fi

- name: Check server facts on changed lines
env:
Expand Down
Loading