Skip to content

chore: Re-apply the repo-ci-baseline Template - #330

Merged
mpaulosky merged 1 commit into
mainfrom
chore/reapply-baseline
Oct 26, 2026
Merged

mpaulosky merged 1 commit into
mainfrom
chore/reapply-baseline

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Why

Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#298 and mpaulosky/dotfiles#300.

What changed

Verification

  • The Apply commit is exactly apply.sh's output on a branch up to date with main.
  • The pre-push gate (scripts/gate.sh) passed on dd366da.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mpaulosky mpaulosky added the review:claude Claude reviews each head, a backup to Copilot's review label Oct 26, 2026

@github-actions github-actions Bot 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.

Claude Review

Overview
This PR makes the Claude Review pipeline harder to abuse and easier to read. The prompt now asks for a structured Markdown summary and titled findings. post_claude_review.py gets a single-line-suggestion vetting layer, and credential redaction is capped so long token runs can't be used for quadratic regex time. release_post.py stops splitting on U+2028/U+2029 (and lone CR in commit subjects). I found no blocking problems. Only the diff was reviewed. The workflow file's full text was not among the context pieces, so I checked the inline workflow code only through the diff and the tests that extract it.

Changes

File What changed
.github/workflows/claude-review.yml The prompt now requests Overview / Changes / Advisory / Not reviewed sections and a bold one-line title on each finding. The inline answer check gains MAX_TOKEN_RUN, TOKEN_CHAIN, redact_credentials and redact_path, mirroring the script. redact() now takes a key so that path fields get the lenient rule.
.github/scripts/post_claude_review.py Adds redact_credentials, which replaces any dot-joined token chain holding a run over 128 characters before CREDENTIAL runs, and redact_path, which skips that rule for paths of 1024 characters or fewer. Adds SUGGESTION_FENCE, defuse_suggestions and vet_suggestions, which keep only one well-formed single-line suggestion on the cited line. Suggestions on a nearest-line fallback or in an off-diff body finding are turned into ```text fences. Off-diff bodies are indented under their bullet.
.github/scripts/release_post.py _list, commit_subject and update_blog_index now split on newlines (and CR for subjects and index rows) only, instead of splitlines().
.github/scripts/tests/test_post_claude_review.py Adds tests for suggestion vetting, redaction (including script/workflow parity and fuzzing), path handling, linear-time behaviour and the new prompt text.
.github/scripts/tests/test_release_post.py Adds tests for U+2028/U+2029 in jq records, commit subjects and blog index rows, and for a lone CR in a subject.

Paths I traced and found sound:

  • Fence regexes: SUGGESTION_FENCE and ONE_LINE_SUGGESTION are linear and over-defuse rather than under-defuse. The cases I considered were \r, \v, \f, ſ under (?i), quoted or listed fences, and fences nested in longer fences.
  • Parity of the two copies: the workflow copy matches the script copy (the tests also fuzz this). The test's slice from CREDENTIAL = re.compile( to \n\n\ndef answer_in matches the blank-line layout the diff produces.
  • Which script runs: the post job runs the base's script and the review job runs the PR's workflow. The mix is safe in both orders, because text redacted by the new check passes through the older CREDENTIAL unchanged.
  • Redaction ordering: a credential glued to a long run is replaced whole, not left half-redacted.

Advisory (not blocking)

  • test_the_prompt_asks_for_a_structured_summary_and_titled_findings asserts "suggestion" not in the lower-cased text of the whole workflow file, comments and heredoc included. It is meant to guard the prompt, but any later comment, log message or identifier in claude-review.yml containing that word will fail it. Scoping the check to the prompt: block would match its intent.
  • The TOKEN_CHAIN rule applies to summaries and bodies as well as to paths. Any unbroken run of letters, digits, _ or - over 128 characters is redacted (for example, a long generated identifier, or a base64 or hash blob quoted in a finding). The text becomes [redacted] and the review warns about a credential. The docstring accepts this ("no legitimate review text has one"), so it is a known trade-off, not a defect.
  • first_paragraph in release_post.py still uses block.strip().splitlines(), and re.split(r"\n\s*\n", …) treats U+2028 as whitespace. These only affect blog card excerpts, but they are not yet consistent with the "split on Markdown line endings only" rule this PR applies elsewhere.
  • Off-diff bodies are indented only after \n. A body containing a lone \r (a Markdown line ending) would still leave its bullet. Normalising \r\n and \r to \n before indenting would close that.
  • The timing tests (< 2 s and < 3 s of wall clock) leave a very large margin over the quadratic case, so they are unlikely to flake. They do depend on runner speed.

No findings.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

880 tests  ±0   874 ✅ ±0   2m 8s ⏱️ +28s
  7 suites ±0     6 💤 ±0 
  7 files   ±0     0 ❌ ±0 

Results for commit dd366da. ± Comparison against base commit 51c712b.

@mpaulosky
mpaulosky merged commit e6f0e84 into main Oct 26, 2026
32 checks passed
@mpaulosky
mpaulosky deleted the chore/reapply-baseline branch October 26, 2026 17:03
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.42%. Comparing base (51c712b) to head (dd366da).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #330   +/-   ##
=======================================
  Coverage   85.42%   85.42%           
=======================================
  Files         117      117           
  Lines        2717     2717           
  Branches      387      387           
=======================================
  Hits         2321     2321           
  Misses        318      318           
  Partials       78       78           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

mpaulosky added a commit that referenced this pull request Oct 26, 2026
Automated release blog posts for #328, #329, #330, opened by the release
workflow. It holds every Release whose post isn't on main yet, rebuilt
from main on each run. The [skip-release] title marker keeps its merge
from starting another release.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:claude Claude reviews each head, a backup to Copilot's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant