Skip to content

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

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 c3b2cab.

🤖 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

Copy link
Copy Markdown
Contributor

Test Results Summary

98 tests  ±0   98 ✅ ±0   31s ⏱️ +2s
 6 suites ±0    0 💤 ±0 
 6 files   ±0    0 ❌ ±0 

Results for commit c3b2cab. ± Comparison against base commit 49e601a.

@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 89.82%. Comparing base (49e601a) to head (c3b2cab).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #249   +/-   ##
=======================================
  Coverage   89.82%   89.82%           
=======================================
  Files          17       17           
  Lines         393      393           
  Branches       85       85           
=======================================
  Hits          353      353           
  Misses         15       15           
  Partials       25       25           
🚀 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.

@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 four changes. It reshapes Claude Review's summary and finding format in the prompt. It hardens post_claude_review.py and the workflow's mirrored answer check: credential redaction now runs in linear time, and one-click GitHub suggestions are vetted or defused. It fixes Unicode line-separator handling in release_post.py. It adds a shared headOfRef helper in Sandcastle. I traced the redaction, suggestion-vetting, line-splitting and ref-matching paths, including edge inputs and regex backtracking, and found no merge-blocking bug. One non-trivial behaviour regression is raised below. The claude-review.yml file itself was not in the context pieces, so I could only review its diff hunks.

Changes

File What changed
.github/workflows/claude-review.yml The prompt asks for a sectioned Markdown summary (Overview, Changes, Advisory, Not reviewed) and bold-titled finding bodies. The inline answer check gains MAX_TOKEN_RUN, TOKEN_CHAIN, redact_credentials and redact_path, and redact() now takes a key so path fields get the lighter rule.
.github/scripts/post_claude_review.py Adds the long-token-run redaction, redact_path (with MAX_PATH), SUGGESTION_FENCE, ONE_LINE_SUGGESTION, defuse_suggestions and vet_suggestions. On-diff comments are vetted. Nearest-line comments and off-diff body findings have suggestions defused. Off-diff bodies are indented under their bullet.
.github/scripts/release_post.py _list, commit_subject and update_blog_index split on \n or `\r\n
.sandcastle/lib/branches.mts, build.mts New headOfRef picks the exact refs/heads/<branch> line from ls-remote. originRefs.remoteHead, remoteMainIs and remoteBranchIsOnOrigin use it. Previously remoteHead took the first token of the first line, so a tail-matching ref could win.
test_post_claude_review.py, test_release_post.py, branches.test.mts, build.test.mts Tests for suggestion vetting, redaction (including script/workflow parity and linear time), Unicode separators, and headOfRef.

Advisory (not blocking)

  • vet_suggestions's docstring says "the prompt asks for one line only", but the prompt asks for no suggestions at all. The new test asserts the word suggestion appears nowhere in the prompt. The comment is stale or forward-looking, so reword it.
  • test_the_prompt_asks_for_a_structured_summary_and_titled_findings asserts "suggestion" not in prompt.lower() over the whole workflow file. The test will fail if any unrelated comment in the file ever mentions the word. Scope it to the prompt block.
  • The wall-clock thresholds in the "linear time" tests (< 2 s and < 3 s) can flake on a loaded CI runner. Consider a generous multiple, or a growth-ratio check between two input sizes.
  • In post_claude_review.py, redact_path is followed by a single blank line before the SUGGESTION_FENCE comment, and MAX_PATH sits between functions. This departs from the file's two-blank-line spacing.
  • Pre-existing and out of scope: post_title in the blog front matter is written into a double-quoted YAML scalar. Jekyll's YAML parser may treat a U+2028 or U+2029 in a PR title as a line break and fold it, even though this PR now preserves those characters when splitting.

Comment thread .github/scripts/post_claude_review.py Resolved
@mpaulosky
mpaulosky merged commit ead3dda into main Oct 26, 2026
34 checks passed
@mpaulosky
mpaulosky deleted the chore/reapply-baseline branch October 26, 2026 16:50
mpaulosky added a commit that referenced this pull request Oct 26, 2026
Automated release blog posts for #248, #249, 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>
mpaulosky added a commit to mpaulosky/dotfiles that referenced this pull request Oct 26, 2026
…304)

## Why

Claude Review's finding on mpaulosky/TicketManager#249:
`redact_credentials` replaced any dot-joined token holding a run over
128 characters. A generated test's file name quoted in a finding body or
the `Changes` table (`tests/Get_Articles_When_<130
chars>_Returns_401.cs`) became `tests/[redacted]`, lost its extension
and raised a false "credential-shaped string(s) were redacted" warning.

## What changed

- **The rule:** the long-run replacement now applies only to a token
that also holds one of the strings every `CREDENTIAL` alternative starts
with (`eyJ`, `gh[pousr]_`, `sk-ant-`, `github_pat_`) — the strings that
made `CREDENTIAL` quadratic. A long token without one can't match
`CREDENTIAL`, so a long identifier, a digest or a generated name is left
alone, and nothing credential-shaped is let through.
- **Where:** `post_claude_review.py` and its mirror in the
`claude-review.yml` answer check (`CREDENTIAL_START`), with the dotfiles
root copies.
- **Docs:** ADR 0004's redaction paragraph, `redact_path`'s docstring
and the workflow comment.

## Verification

- `test.sh` passes (the Python suite is 242 tests). New tests: long
plain tokens are left alone with no warning, in a finding body and the
summary, by the script and the workflow alike; a long token that starts
a credential is still replaced whole for every start, including each
`gh[pousr]_` letter and a start in another dot-separated segment; the
workflow carries the script's `CREDENTIAL_START`, `MAX_TOKEN_RUN`,
`TOKEN_CHAIN` and `CREDENTIAL`; every `CREDENTIAL` match starts with a
`CREDENTIAL_START` string.
- Mutation checks: with the condition removed, 7 tests fail; with a
start dropped from `CREDENTIAL_START`, 5 fail.
- Local `/pre-push-review`: 3 rounds, 7 findings (4 Critical, 1 Warning,
2 Advisory) all fixed, none open.
- Landing it needs a re-Apply of the other repos, since
`post_claude_review.py` and `claude-review.yml` are Owned.

Fixes #301

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.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