Skip to content

Make the required build-deploy check always report - #117

Open
d-morrison wants to merge 3 commits into
mainfrom
claude/fix-build-deploy-always-reports-97
Open

d-morrison wants to merge 3 commits into
mainfrom
claude/fix-build-deploy-always-reports-97

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Requested by Ezra · project thread

Before: preview.yml had a workflow-level paths: filter, so PRs touching only other files (workflows, lychee.toml, ...) never started build-deploy, and the required check stayed pending.

After: the paths: filter is gone.
A first step in the job diffs base...head and sets relevant using the same path set as the old filter; the setup, render, highlight, DOCX and banner steps run only when relevant == 'true' and the PR is not closed.
build-deploy therefore always reports, and finishes in seconds on irrelevant PRs.
The deploy step still runs on closed for every PR, so preview removal keeps working (it no longer needs the R/Quarto setup, which is now skipped on close).
A failing git diff fails the step instead of reading as "not relevant".

Considered Morrison-Lab/gha's reusable preview.yml: it is the build half of a build/deploy split (job build, deploy via workflow_run), so migrating would rename the required check and restructure the workflow.
That is a separate, larger change; this PR is the minimal fix the issue recommends.

How verified: actionlint clean; the relevance regex checked against sample paths (chapters, _quarto*.yml, root *.qmd/*.css, latex-macros match; lychee.toml, other workflows, inst/WORDLIST, nested *.qmd do not).
This PR itself touches only preview.yml, which is in the relevant set, so it exercises the full path.

Closes #97

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK


Generated by Claude Code

claude added 2 commits October 9, 2026 08:44
Drop the workflow-level paths filter from preview.yml and gate the expensive steps inside the job on a changed-files check instead.
A PR that touches no site files now gets a passing build-deploy run; the PR-closed cleanup still runs.

Closes #97

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Copilot AI balanced review requested due to automatic review settings October 9, 2026 08:56

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@d-morrison d-morrison self-assigned this Oct 9, 2026
@github-actions

This comment has been minimized.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:12

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
Collaborator Author

OpenCode adversarial review (deepseek-v4-pro): round 1 findings (diff failure read as not-relevant; diff against merge HEAD) fixed in 80f5415.
Round 2 found one valid issue (the filter step must not run on closed, where the head commit may be gone and a diff failure would block preview removal), fixed in 4793198 with if: github.event.action != 'closed'.
Its second point (regex anchoring) is a false positive: every alternative sits inside the single ^( ... ) group.
latex-macros is a submodule gitlink, so git diff --name-only lists it as the file latex-macros, same as the old paths entry.
No round 3 run; the fix is a one-line guard checked with actionlint.

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://Morrison-Lab.github.io/win/pr-preview/pr-117/

Built to branch gh-pages at 2026-10-09 09:36 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Collaborator Author

/review


Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Collaborator Author

/review

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

👀 Claude Review Dispatched — run reviewing PR #117 at 4793198.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Claude finished review — View run


The current PR head commit (4793198... matching 47931986bdb043b1de1d12d905ba7d6e66bdfb10) is identical to the commit already reviewed in the prior round. No new commits have been pushed since that review.

Verdict

Ready for merge — no new findings. The prior review (comment from 2026-10-09T10:00:52Z, verdict: CLEAN) reviewed this exact commit (47931986bdb043b1de1d12d905ba7d6e66bdfb10), which is still the PR's current head — I confirmed via gh pr view that headRefOid matches. That review reconstructed and YAML-validated the patched preview.yml, traced every conditional path (opened/synchronize/labeled with relevant true/false, and closed), verified the relevance regex against sample paths, confirmed bash -eo pipefail semantics for the git diff failure-propagation claim, and found no AI-hallucination concerns (all referenced actions — rossjrw/pr-preview-action, quarto-dev/quarto-actions, r-lib/actions, marocchino/sticky-pull-request-comment — are real and unchanged). I independently re-read the saved diff in this round and confirm it is byte-for-byte the same change already assessed; that prior verdict stands.

No R/Quarto content or LaTeX math is touched by this diff, so the SERG lab-manual coding-style/practices checks and the latex-macros macro-opportunity checks remain not applicable, as previously noted.

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "47931986bdb043b1de1d12d905ba7d6e66bdfb10",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "No new commits since the prior round; preview.yml diff at this head is byte-identical to the already-validated version, so no new failure modes were introduced.",
  "holistic_assessment": "Scope remains limited to restoring always-reporting required-check behavior for preview builds without regressing deploy or removal integration paths."
}

Reviewed commit: 4793198

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

💰 Cost: $0.1772 (review) — run

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Required build-deploy check never reports on PRs outside preview.yml paths

3 participants