Repository navigation
chore: Re-apply the repo-ci-baseline Template - #286
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rom the Template Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Review
Overview
This PR does two things.
- It adds an opt-in
ui(UI developer) role to the Sandcastle pipeline. A repo opts in by givingROLE_AGENTSauientry. When it has, the planner may pickui, and the role runs after the backend developer and before checkpoint 1. The backend prompt gets a new{{UI_DEVELOPER}}argument. - It narrows the long-token redaction in
post_claude_review.pyand in the inlineclaude-review.ymlcheck. 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.mtscounts theuitimeout at the backend's budget when the repo hasn't opted in. This is documented, but the label-age check only sees the realuibudget once a repo opts in.- I did not open
CLAUDE.mdorAGENTS.md, so repo conventions were not checked against them. I also did not readplan-prompt.md,report.mtsorrepo-config.mts. I assumedusageReport.recordacceptsAnyRole, and thatplan-prompt.mddescribesuionly for opted-in repos.
Not reviewed
Nothing was skipped. Both diff pieces and all seven context pieces were read.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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:
|
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>
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
ae4158bApply commit,apply.shoutput 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 nouientry inROLE_AGENTS.f1867b3Takes the UI developer line in.sandcastle/roles/backend.mdfrom the Seed: the Ownedlib/prompts.mtsalways passesUI_DEVELOPER, so a backend prompt without the placeholder logged an unreferenced-argument warning on every run. With nouientry the line renders the sentence it had before.Verification
scripts/gate.sh) passed./pre-push-review: 1 round, no findings.🤖 Generated with Claude Code