Repository navigation
Conversation
… (PROF-16469) CI was the first place that reported a missing copyright line, a drifted CLAUDE.md or a PR without a ticket. The same scripts now run earlier: - .githooks/pre-push runs check-copyright.py and check-claude-md.py, loaded from origin/main like review-marker.py, on each pushed branch commit. Both scripts take --head to check a commit instead of the working tree, and no longer evaluate __file__ eagerly, so they also run as `python3 -I -c`. - The require-fresh-review hook runs check_pr_ticket.py from origin/main on the title and body of `gh pr create`, taken from --title, --body, --body-file or, with --fill, the branch's commits. Interactive, stdin and substituted bodies pass; CI checks them. - The pre-pr-review skill fixes both checks' violations before the marker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Scan-Build Report
Bug Summary
Reports
|
|||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
CI Test ResultsRun: #41919545601 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-11-04 22:11:46 UTC |
Contributor
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?:
Runs the #938 checks before CI does: the copyright and
CLAUDE.mdchecks atgit push, the ticket check atgh pr create..githooks/pre-push: runscheck-copyright.pyandcheck-claude-md.pyon each pushed branch commit. Exit 1 blocks the push. Any other exit code prints a warning and lets the push through, because CI still runs the check.--head <commit>: both scripts can check a commit instead of the working tree. With--head,check-claude-md.pynever applies the cairn-block exception, because the content comes from the commit.require-fresh-reviewhook: runscheck_pr_ticket.pyon the title and body ofgh pr create. It reads them from--title/-t,--body/-b,--body-file/-F, or, with--fill, from the branch's commit messages.pre-pr-reviewskill: step 4 runs both source checks, so their violations are fixed before the marker is written.Motivation:
Step 1 of PROF-16469, decision D7: an agent that learns about a violation from CI has already pushed and opened the PR. The same scripts, run locally, catch it while the change is still cheap.
Additional Notes:
rkennke/PROF-16469-ci-checks. Retarget tomainafter Enforce copyright, CLAUDE.md and ticket-reference rules in CI (PROF-16469) #938 merges.origin/mainwithpython3 -I -c, likereview-marker.py. A branch cannot weaken the check that judges it. So the scripts no longer compute their__file__default eagerly.main: a check that is not onorigin/mainyet is skipped, not failed.gh pr create, or a body from stdin (-F -);$(or a backtick, because the hook cannot know what the shell will substitute.shlextreats#as a comment, so an unquoted--title fix#123loses#123and can be blocked;--filladds the commit messages even when--title/--bodyare given, so a ticket in a commit can stand in for the explicit text;"$BODY"variable is checked as literal text, so it is blocked;How to test the change?:
bash utils/tests/test_quality_check_scripts.sh: 101 groups. The new--headcases check that:CLAUDE.mdis reported;bash utils/tests/test_review_marker.sh: 165 tests innode:22-bookworm, Pi cases included. New cases cover the pre-push source checks and the ticket check for each flag form.--headbranch makes the suite fail.origin/mainis this branch, a fresh headless Claude Code session rangh pr createwith a title and body without a ticket. The hook blocked it with the ticket message.For Datadog employees:
credentials of any kind, I've requested a security review (run the
dd:platform-security-reviewskill, or file a request via the PSEC review form).
bewairealso runs automatically on every PR.🤖 Generated with Claude Code