Skip to content

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

Merged
mpaulosky merged 2 commits into
mainfrom
chore/reapply-baseline
Oct 26, 2026
Merged

mpaulosky merged 2 commits 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, #304, #305 and #306: the opt-in UI developer role, the narrowed long-run credential redaction in Claude Review's script, the shared ui-role test helper and the retried scratch-directory cleanup in the Sandcastle tests.

What changed

  • ae4158b Apply commit, apply.sh output alone: 22 Owned files (byte-identical to the Template's) and one new Seed file, .sandcastle/roles/ui.md, the UI developer's prompt, which stays unused here: this repo has no ui entry in ROLE_AGENTS.
  • f1867b3 Takes the UI developer line in .sandcastle/roles/backend.md from the Seed: the Owned lib/prompts.mts always passes UI_DEVELOPER, so a backend prompt without the placeholder logged an unreferenced-argument warning on every run. With no ui entry the line renders the sentence it had before.

Verification

  • The pre-push gate (scripts/gate.sh) passed.
  • The Seed file makes this more than an Owned-only change, so it went through the local /pre-push-review: 1 round, no findings.

🤖 Generated with Claude Code

mpaulosky and others added 2 commits October 26, 2026 13:39
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rom the Template

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 does two things.

  1. It adds an opt-in ui (UI developer) role to the Sandcastle pipeline. A repo opts in by giving ROLE_AGENTS a ui entry. When it has, the planner may pick ui, and the role runs after the backend developer and before checkpoint 1. The backend prompt gets a new {{UI_DEVELOPER}} argument.
  2. It narrows the long-token redaction in post_claude_review.py and in the inline claude-review.yml check. A token with a run over 128 characters is now replaced whole only if it also contains a credential start (eyJ, gh[pousr]_, sk-ant-, github_pat_).

I traced the redaction change against CREDENTIAL, and the script and workflow copies match. Every CREDENTIAL alternative begins with one of the four starts. A long run with no start can't match, so CREDENTIAL still scans in linear time. The tests cover each start, a start in a later segment, and the script/workflow parity. I found no correctness or security regression there. The sandcastle changes look sound: the opt-out paths in resolveRoles, uiRuns and the backend prompt are consistent and tested. One latent gap in ui.md (below) would surface when a repo opts in. I did not run the tests.

Changes

File What changed
.github/scripts/post_claude_review.py, .github/workflows/claude-review.yml Added CREDENTIAL_START. Long-chain redaction now applies only to chains that hold a credential start. Comments and the path-redaction docstring updated.
.github/scripts/tests/test_post_claude_review.py Tests for long benign tokens being left alone, long credential-start tokens still replaced whole, the CREDENTIAL ⊆ CREDENTIAL_START invariant, and script/workflow parity.
.sandcastle/lib/agents.mts, config.mts, plan.mts, prompts.mts, build.mts, main.mts New OptInRole/AnyRole types, uiEnabled()/roleAgent(), and ui added to OPTIONAL_ROLES and BUILD_ROLES. resolveRoles drops ui when the repo hasn't opted in. buildIssue runs ui after backend. backendPromptArgs adds UI_DEVELOPER.
.sandcastle/roles/ui.md, roles/backend.md New UI developer prompt. The backend prompt's "last developer run" sentence becomes {{UI_DEVELOPER}}.
.sandcastle/lib/ui-role-fixture.mts and *.test.mts withUiRole test fixture, new tests for the ui role, and prompt/skills consistency tests.
Many *.test.mts files, git-sandbox-fake.mts rmSync now retries (maxRetries: 5, retryDelay: 100) to avoid flaky cleanup.

Advisory (not blocking)

  • In a repo that hasn't opted in, a planner answer of roles: ["ui"] is treated as invalid. It falls back to every available optional role (architect and scribe) rather than none. This is documented and tested, but it differs from picking an explicit subset.
  • config.test.mts counts the ui timeout at the backend's budget when the repo hasn't opted in. This is documented, but the label-age check only sees the real ui budget once a repo opts in.
  • I did not open CLAUDE.md or AGENTS.md, so repo conventions were not checked against them. I also did not read plan-prompt.md, report.mts or repo-config.mts. I assumed usageReport.record accepts AnyRole, and that plan-prompt.md describes ui only for opted-in repos.

Not reviewed

Nothing was skipped. Both diff pieces and all seven context pieces were read.

Comment thread .sandcastle/roles/ui.md Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

483 tests  ±0   483 ✅ ±0   21s ⏱️ +3s
  9 suites ±0     0 💤 ±0 
  9 files   ±0     0 ❌ ±0 

Results for commit f1867b3. ± Comparison against base commit 4df4869.

@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.63%. Comparing base (4df4869) to head (f1867b3).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #286   +/-   ##
=======================================
  Coverage   85.63%   85.63%           
=======================================
  Files          75       75           
  Lines        1566     1566           
  Branches      186      186           
=======================================
  Hits         1341     1341           
  Misses        190      190           
  Partials       35       35           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mpaulosky
mpaulosky merged commit b764ea6 into main Oct 26, 2026
37 checks passed
@mpaulosky
mpaulosky deleted the chore/reapply-baseline branch October 26, 2026 21:23
mpaulosky added a commit that referenced this pull request Oct 26, 2026
Automated release blog posts for #286, 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