Skip to content

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

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#303, mpaulosky/dotfiles#304, mpaulosky/dotfiles#305 and mpaulosky/dotfiles#306.

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 6af2035.

🤖 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

The PR narrows the long-token rule in the credential redactor. A token chain with a run over MAX_TOKEN_RUN is now replaced whole only if it also contains a credential start (eyJ, gh[pousr]_, sk-ant- or github_pat_). Before, any long token was replaced, which redacted long generated test names, identifiers and digests and added a spurious "credential-shaped string(s) were redacted" warning. The workflow's inline copy matches the script, and a test pins the match. The PR also moves the duplicated withUiRole test helper into one shared ui-role-fixture.mts, and adds maxRetries/retryDelay to every test rmSync cleanup. I found no blocking problems, so my verdict is approve.

I checked three things on the redaction change:

  • Coverage of CREDENTIAL: every character CREDENTIAL can match is in TOKEN_CHAIN's class, which has letters, digits, _, - and .. So any CREDENTIAL match lies inside a single chain, and that chain contains a start string.
  • Safety of the gate: no match is missed because of the new CREDENTIAL_START gate. The only chains now left alone are ones CREDENTIAL could not have matched anyway.
  • Linear-time guarantee: it still holds. A chain with a long run and a start is replaced whole. A chain with no start gives CREDENTIAL no starting point. A chain with a start and short runs has bounded rescans.

The leak check against the review job's own secrets is a separate step, and this change does not touch it.

I could not read build.test.mts or its other uses of ROLE_AGENTS, because it is not in the context pieces. See the advisory below.

Changes

File What changed
.github/scripts/post_claude_review.py Adds CREDENTIAL_START. redact_credentials replaces a long chain only when it holds a start. The comments and the redact_path docstring are updated.
.github/workflows/claude-review.yml The inline answer check carries the same CREDENTIAL_START and the same gated rule. Only comments and the regex gate changed.
.github/scripts/tests/test_post_claude_review.py New tests: long plain tokens are left alone; long credential-start tokens are still replaced whole; the workflow and script definitions match; every credential CREDENTIAL matches begins with a start; a long path holding a start is left alone. The fuzz test adds LONG_NAME.
.sandcastle/lib/ui-role-fixture.mts (new), ui-role-fixture.test.mts (new) One shared withUiRole(enabled, run) helper with its own tests, replacing three copies.
.sandcastle/lib/{agents,build,plan}.test.mts Import the shared helper. build.test.mts now calls withUiRole(true/false, fn) with the flag first.
.sandcastle/lib/git-sandbox-fake.mts and {checkpoint,host-safety,review-ledger,scan,shell}.test.mts rmSync cleanup now retries up to 5 times, 100 ms apart.

Advisory (not blocking)

  • build.test.mts drops ROLE_AGENTS from its repo-config.mts import. I couldn't see the whole file, so I couldn't confirm nothing else in it uses ROLE_AGENTS. Node type-stripping would only fail at runtime, so confirm the suite passes.
  • The module docstring of post_claude_review.py still says only that CREDENTIAL must match the workflow's. CREDENTIAL_START, MAX_TOKEN_RUN and TOKEN_CHAIN must match too. test_the_workflow_carries_the_scripts_long_run_rule enforces this, but the docstring could say so.
  • A long token that does hold a start string by accident, for example a generated name like Get_eyJ_AAAA… in a review body or summary, is still replaced whole, and the step still warns. Only finding paths are exempt, as the new test shows. This is a narrow remaining false positive, and the change accepts it.
  • The retry options on rmSync and the withUiRole refactor have no connection to the redaction change. The PR's scope is the author's call.
  • ui-role-fixture.mts is test-only support code in lib/ next to production modules, and it has no .test suffix. This is harmless as long as nothing outside tests imports it.

I read all pieces: diff 001.diff and context 001–008.

No findings.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

660 tests  ±0   660 ✅ ±0   1m 2s ⏱️ +7s
  6 suites ±0     0 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit 6af2035. ± Comparison against base commit 6c98bac.

@mpaulosky
mpaulosky merged commit 78180f4 into main Oct 26, 2026
32 checks passed
@mpaulosky
mpaulosky deleted the chore/reapply-baseline branch October 26, 2026 21:36
@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 96.65%. Comparing base (6c98bac) to head (6af2035).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #443   +/-   ##
=======================================
  Coverage   96.65%   96.65%           
=======================================
  Files          42       42           
  Lines         568      568           
  Branches      100      100           
=======================================
  Hits          549      549           
  Misses          5        5           
  Partials       14       14           
🚀 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 #443, 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