Repository navigation
chore: Re-apply the repo-ci-baseline Template - #258
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…can add the Template's check.sh
…-limit module reads
…ger and CHECK_PATHS, and correct the gate text
…cribe the new CHECK_PATHS
…2022 LICENSE year, pin markdownlint-cli2 0.24.0 in the Dockerfile
…ndbox, record the gate timing, and point check-paths.txt at SANDCASTLE_PATHS
… not measured in the sandbox, and tie the check-paths test to the gate's wiring
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Test Results Summary98 tests 98 ✅ 40s ⏱️ Results for commit c52d87c. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #258 +/- ##
=======================================
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:
|
There was a problem hiding this comment.
🟡 Changes recommended
Recoverable credentials can bypass secret checks and leak into public reports, while unbounded log reads can exhaust host memory during report generation.
2 open issues
What changed in this PR
Re-applies the repo-ci-baseline template to update Sandcastle automation and review guidance while preserving this repository’s Docker-free sandbox gate.
Changes:
- Adds execution limits, sandbox diagnostics, role timing, and filtered reviewer-log artifacts.
- Separates the sandbox gate from the template check, expands watched paths, and updates role prompts and regression tests.
- Tightens Copilot reviewer identification and refreshes review guidance and Markdown lint pins.
Validation: No tests or builds were run; the repository snapshot was unavailable.
| File | Description |
|---|---|
scripts/gate.sh |
Updates the Markdown lint pin and review comment. |
docs/PROCESS.md |
Documents host-managed Sandcastle reviews. |
codecov.yml |
Clarifies template ownership in a comment. |
.security/README.md |
Documents template ownership of the README. |
.sandcastle/sandbox-gate.sh |
Preserves the Docker-free build and test gate. |
.sandcastle/roles/ui.md |
Generalizes UI responsibilities and adds shared skills. |
.sandcastle/roles/tester.md |
Generalizes testing guidance and adds shared skills. |
.sandcastle/roles/skills.md |
Adds the shared role-skills file. |
.sandcastle/roles/shared-rules.md |
Defines sandbox gate mapping and lint responsibilities. |
.sandcastle/roles/scribe.md |
Revises documentation ownership restrictions. |
.sandcastle/roles/gate-fixer.md |
Updates gate commands and checkpoint guidance. |
.sandcastle/roles/follow-up.md |
Updates gate references and template-edit guidance. |
.sandcastle/roles/backend.md |
Adds shared skills and optional standards guidance. |
.sandcastle/roles/architect.md |
Generalizes design and repository guidance. |
.sandcastle/review-prompt.md |
Updates gate and standards references. |
.sandcastle/repo-scripts.test.mts |
Tests watched paths and sandbox gate wiring. |
.sandcastle/plan-prompt.md |
Adds conditional UI-role guidance. |
.sandcastle/main.mts |
Integrates stall reporting, timing, and reviewer-log export. |
.sandcastle/lib/step-limit.mts |
Adds sandbox command timeouts and stall tracking. |
.sandcastle/lib/status.test.mts |
Tests hidden-text detection. |
.sandcastle/lib/status.mts |
Exposes hidden-text detection using terminal sanitization. |
.sandcastle/lib/skills.test.mts |
Tests CPU limits and shared skill prompts. |
.sandcastle/lib/skills.mts |
Reads Docker CPU capacity and limits sandbox CPUs. |
.sandcastle/lib/shell.mts |
Applies timeouts to host Git commands. |
.sandcastle/lib/security-record.test.mts |
Tests pinned ledger Git configuration. |
.sandcastle/lib/security-record.mts |
Pins ledger Git context and limits command execution. |
.sandcastle/lib/round.test.mts |
Tests reporting of unpublished advisory findings. |
.sandcastle/lib/round.mts |
Records lost or unpublishable advisory findings. |
.sandcastle/lib/role-timeline.test.mts |
Tests role timing and tool-name filtering. |
.sandcastle/lib/role-timeline.mts |
Collects role durations and tool-call timing. |
.sandcastle/lib/role-logs.mts |
Produces filtered reviewer-log views for artifacts. |
.sandcastle/lib/report.test.mts |
Tests stall summaries, timing, and report locations. |
.sandcastle/lib/report.mts |
Adds stall and timing reports outside the Actions checkout. |
.sandcastle/lib/repo-config.mts |
Configures the renamed gate, timeout, and check paths. |
.sandcastle/lib/prompts.test.mts |
Tests generalized roles and checkpoint mapping. |
.sandcastle/lib/prompts.mts |
Supplies conditional UI guidance and repair checkpoints. |
.sandcastle/lib/pre-push-review-skill.test.mts |
Tests updated review guidance contracts. |
.sandcastle/lib/plan.test.mts |
Tests conditional UI-role prompt wiring. |
.sandcastle/lib/plan.mts |
Passes UI-role availability to the planner. |
.sandcastle/lib/limits.test.mts |
Tests distinct time-budget stop errors. |
.sandcastle/lib/limits.mts |
Distinguishes time-budget stops from usage limits. |
.sandcastle/lib/intake.mts |
Applies timeouts to intake host commands. |
.sandcastle/lib/host-safety.mts |
Applies timeouts to Git configuration checks. |
.sandcastle/lib/host-limit.mts |
Bounds host commands and Docker lifecycle waits. |
.sandcastle/lib/handback.mts |
Adds bounded host calls and clarifies failure diagnostics. |
.sandcastle/lib/gate.mts |
Uses bounded host calls for gate queries. |
.sandcastle/lib/follow-up-run.mts |
Documents follow-up stall handling. |
.sandcastle/lib/errors.mts |
Adds time-budget and stalled-step error types. |
.sandcastle/lib/diagnostics.test.mts |
Tests sandbox probes and diagnostic failure handling. |
.sandcastle/lib/diagnostics.mts |
Adds bounded sandbox resource probes. |
.sandcastle/lib/config.test.mts |
Tests review modes, CPU limits, and timeout budgets. |
.sandcastle/lib/config.mts |
Defines review roles, execution limits, and label lifetime. |
.sandcastle/lib/building.test.mts |
Adjusts stale-label cases for the longer lifetime. |
.sandcastle/Dockerfile |
Aligns the Markdown lint version with the gate. |
.sandcastle/CODING_STANDARDS.md |
References the renamed sandbox gate. |
.sandcastle/check.sh |
Installs the template’s path-sensitive Sandcastle check. |
.sandcastle/check-paths.txt |
Explains this repository’s watched-path configuration. |
.sandcastle/.env.example |
Documents the reviewer-mode switch. |
.github/workflows/sandcastle.yml |
Uploads reports from runner temporary storage. |
.github/workflows/claude-review.yml |
Matches exact Copilot reviewer identities. |
.github/workflows/ci.yml |
Clarifies coverage-threshold ownership in comments. |
.github/scripts/tests/test_claude_review_copilot_gate.py |
Tests exact bot matching and lookalike rejection. |
.github/scripts/check_gh_repo.py |
Adds the skills README to its exception list. |
.github/ci/sandcastle.sh |
Watches review scripts, skills, and workflow changes. |
.claude/skills/README.md |
Documents owned review skills and repository-qualified commands. |
.claude/skills/pre-push-review/SKILL.md |
Updates review rounds, fix validation, and host integration. |
.claude/skills/pre-push-review/review-bar.md |
Requires verification of previously fixed findings. |
.claude/skills/pre-push-review/lenses.md |
Expands boundary and edge-case review guidance. |
.claude/skills/hardening-review/SKILL.md |
Explains branch-size warnings during hardening. |
.claude/skills/hardening-review/references/brief.md |
Clarifies mirror filtering and prior-fix verification. |
Review effort: Balanced
## Why Copilot's review of mpaulosky/TicketManager#258 (a verbatim copy of this Template file) pointed out that `lib/role-logs.mts` read every reviewer log whole into a string, then built a line array and a same-length keep array from it. The sandbox writes that log, so its size is the sandbox's choice, and a huge log cost the host memory in proportion to its size while generating the run report. The view keeps only the last lines of each kind, so reading the end of the log is enough. ## What changed Both the Template's Owned `role-logs.mts` and dotfiles' copy of it: - `REPORT_INPUT_LIMIT` (4 MiB): `liveRoleLogFs.read` reads at most the last 4 MiB (plus one byte, so a cut on a line break keeps that line), from a whole line; `allowlistedView` applies the same cap to the text it is given. - A log that was cut starts with the existing `[... lines left out]` marker, so a cut log can't be mistaken for a quiet one. - `readLogTail` checks the log with `lstat` before opening it (a symlink, device, FIFO, socket or directory is refused without an open), then opens with `O_NOFOLLOW | O_NONBLOCK | O_NOCTTY` and checks with `fstat`, so an entry swapped in after the check can't make the host wait on a FIFO. A device node swapped in inside that window is still opened and refused afterwards; the comment names that accepted gap. - `references/sandcastle.md` gets one sentence on the cap. The Template's tests cover the cut at n-1, n and n+1 for both caps, a cut on a line break, a tail with no line break, CRLF, an empty file, a cut in the middle of a multi-byte character, and the refusal of a symlink, a directory and a FIFO (the FIFO swap in a child process, so a regression fails the test instead of hanging the suite). Shifting each bound or dropping each flag fails a test; the one mutant that survives is equivalent. Not part of this change: Copilot's other thread on #258 (credentials split by invisible fillers or hex chunks in error lines). ## Review Local pre-push review: 4 rounds, 16 findings (2 Warnings and 1 Critical, all fixed behind tests), 1 Advisory left open (the wording of the comment on the accepted gap, which needs the sandbox's write access to the logs folder confirmed). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…read, keep the 2022 LICENSE year
There was a problem hiding this comment.
🔵 Needs a closer look
Sandbox lifecycle changes and public reviewer logs cross security and operational boundaries, while Docker/Claude isolation, cancellation, cleanup, tool restrictions, and gate timing could not be validated at runtime.
1 resolved since last review
Review effort: Balanced
…r-log view, not its text (#469) ## Summary Answers Copilot's thread 1 on mpaulosky/TicketManager#258: an error line in a reviewer log could carry a credential split by invisible fillers (U+3164, U+2800) or as spaced-out hex past the secret checks and into the public run-report artifact. The reviewer-log view (`lib/role-logs.mts`, Owned) no longer publishes any text of a log: - Error lines become the fixed message `[error line: <word>]` for the error word they matched. - Host status lines have every number masked as `#`. - The view is three sorted sets of fixed lines (host kinds, known tools, error words) plus one `[... lines left out]` line, so order, repeats, counts and gaps carry nothing. - Only the logs of builds the run recorded are copied (at most 20); `index.txt` says once that others were left out. - Docs (`references/sandcastle.md`, `.claude/rules/sandcastle.md`, both `sandcastle.yml` comments) state what the view holds and the small residue that remains. Regression tests cover both reported bypasses, Unicode look-alikes, the secret note, the sets and their counts, and the log limit; the new behaviours were mutation-checked. Changes `.github/workflows/sandcastle.yml` (comments only), so Actions can't push it; pushed with the owner's login. ## Test plan - [x] `scripts/gate.sh` (Template tests, Sandcastle check) - [x] Local `/pre-push-review`: 3 rounds, none blocking - [ ] CI 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Automated release blog posts for #258, 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#461, #460, #465 and #466.
What changed
4c4de51Apply commit,apply.shoutput alone: brings the Template changes above (new Sandcastle modules, the Template'scheck.sh, role prompts, workflow and skill updates)..sandcastle/check.sh(this repo's own Docker-free gate) renamed to.sandcastle/sandbox-gate.sh, so Apply can add the Template's Ownedcheck.sh;GATE_COMMANDandGATE_SCRIPTfollow.GATE_LIMIT_MINUTES, which the newstep-limit.mtsneeds, added torepo-config.mts;CHECK_PATHSand.github/ci/sandcastle.sh'sSANDCASTLE_PATHSextended to the review paths, with tests in.sandcastle/repo-scripts.test.mts.shared-rules.mdsays a role prompt'sscripts/gate.shmeans.sandcastle/sandbox-gate.shin the sandbox..sandcastle/lib/role-logs.mtsand its test come from fix(baseline): Read only the last 4 MiB of a reviewer log dotfiles#466 (a reviewer log is read only as far as its last 4 MiB, which answers Copilot's memory-bound thread on this PR).LICENSEkeeps its 2022 year (the Template's Owned copy says 2021, so each re-Apply reverts it); the Seed Dockerfile pins markdownlint-cli2 0.24.0 to matchscripts/gate.shand the v25 lint action.Verification
mainthis PR changes no pinned action, noglobal.jsonSDK and no LICENSE year (the Template now carries the newer pins, chore(baseline): Bump the Template's pins and SDK to the versions TicketManager already has dotfiles#465).scripts/gate.sh) passed, and the local pre-push review is recorded clean (3 rounds, 6 findings, all fixed; then a second run on the re-Appliedrole-logs.mts: 1 Advisory left open, about CI treating the review skills' Markdown as docs-only, which needs a Template change).GATE_LIMIT_MINUTES = 10is the Template default:sandbox-gate.shtook 52 s on a warm worktree outside the sandbox, a cold or loaded sandbox run was not timed.🤖 Generated with Claude Code