Skip to content

Add CI check for duplicate crossref ids - #115

Open
d-morrison wants to merge 3 commits into
mainfrom
claude/ci-duplicate-crossref-ids
Open

d-morrison wants to merge 3 commits into
mainfrom
claude/ci-duplicate-crossref-ids

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Requested by Ezra · project thread

Before: nothing stopped a second definition of an existing crossref id (win#79).
After: .github/workflows/check-duplicate-crossref-ids.yml runs .github/scripts/check-duplicate-crossref-ids.py, which fails when a crossref id is defined twice across index.qmd and chapters/**/*.qmd.
It reads attribute-block ids and #| label: ids in executable cells, and ignores other fences, inline code and HTML comments.
No existing check in Morrison-Lab/gha covers this.
How: the script fails on current main (it reports #def-ip-weights) and passes on the branch of the chapter 12 fix, so this check will be red until that PR merges.

Not closing an issue; this is a guard for #79.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK


Generated by Claude Code

claude added 2 commits October 9, 2026 08:43
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.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:15

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, then gpt-5.6-luna) found parser gaps (non-cell fences, inline code and multi-backtick spans, multi-line comments, missing prf/sol prefixes, annotations without file and line).
All were fixed in 5d49e07.
The final re-review by luna of the pre-fix diff gave only the two gaps now fixed; kimi-k3 and deepseek-v4-pro stalled on the last pass, so there is no final "VERDICT: clean" line.
Remaining deferred: prefixes are hardcoded rather than read from _quarto.yml.
The check job is red on this PR by design until the chapter 12 rename (#114) merges; on that branch the script passes.

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


Generated by Claude Code

@github-actions

This comment has been minimized.

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 #115 at 5d49e07.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Claude finished review — View run


This PR's head commit is still 5d49e0783479cd6a29b74c902d57facef0d2995d — identical to the commit reviewed in the prior round (no new commits have landed; the only new PR activity is another /review trigger comment). I re-ran check-duplicate-crossref-ids.py against the current tree and confirmed it still reports exactly the same expected pre-existing duplicate (#def-ip-weights in chapters/02-randomized-experiments.qmd:433 and chapters/12-ip-weighting-marginal-structural-models.qmd:149), red-by-design pending PR #114, consistent with the prior review's findings.

Review: PR #115 — Add CI check for duplicate crossref ids

No code has changed since the previous review round. My prior review (posted 2026-10-09T10:02:35Z, commit 5d49e0783479cd6a29b74c902d57facef0d2995d) verified the parser's fence-nesting, inline-code-stripping, HTML-comment, and multi-backtick handling via synthetic fixtures and the real chapters/ tree, found no bugs, security issues, or lab-manual/CLAUDE.md violations, and confirmed the workflow YAML (permissions, timeout, triggers) matches sibling conventions. That verdict still stands — this confirming pass re-ran the script and reproduced the identical expected output, so there is nothing new to add.

The three observations from that review remain non-blocking optional follow-ups: no automated tests for the new script (consistent with the existing convention for this whole family of .github/scripts/ checks), the local-vs-Morrison-Lab/gha placement question (already resolved as acceptable given the local-script convention), and the hardcoded PREFIXES list vs. reading _quarto.yml (already disclosed by the author as a deferred trade-off, and still matches current _quarto.yml reality).

No d-morrison/macros math changes are introduced by this diff, so the macro-opportunity check does not apply, consistent with the prior round.

Verdict

Ready for merge — no new findings; the prior round's "Ready for merge" verdict stands unchanged since no commits have landed since that review.

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "5d49e0783479cd6a29b74c902d57facef0d2995d",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Re-ran check-duplicate-crossref-ids.py against the unchanged chapters/ tree and reproduced the identical pre-existing def-ip-weights duplicate reported in the prior review round.",
  "holistic_assessment": "No new commits landed since the last review, so scope, integration, and validation posture against issue 79 and PR 114 remain exactly as previously assessed."
}

Reviewed commit: 5d49e07

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

💰 Cost: $0.1825 (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.

3 participants