Repository navigation
docs(scripts): put back the notes the comment pass dropped (#4049) - #4087
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
devswha
added a commit
that referenced
this pull request
Nov 18, 2026
…d from shell and PowerShell files (#4115) ## What The restore PRs #4081, #4083 and #4087 put back the notes the comment pass dropped but should have kept (security notes, traps that name what breaks, platform facts, measured values). They held back eight shell and PowerShell files, because the refactor kit's comments-only proof cannot prove them (see "Kit proof" below). This PR puts back the notes in those files. | File | Dropped by | |---|---| | `install.sh`, `install.ps1` | #4040 | | `scripts/ci-runner-route.sh`, `scripts/windows-install.test.ps1` | #4047 | | `scripts/self-hosted-runner/run.sh`, `scripts/self-hosted-runner/build-cache-promote.sh`, `scripts/self-hosted-runner/hook-test-harness.sh`, `scripts/relay-ios-sim.sh` | #4049 | The notes were written against older code, so each one was read against the code beside it now. The second commit changes 12 that no longer matched, for example: - `run.sh`: the startup check covers the cgroup parent as well as the CPU list (#4061), and runners also mount their build cache outbox. - `install.sh`, `install.ps1`: the install lock is a pid file created only where none exists, not the folder. - `install.sh`: the herdr-core plugin build follows `herdr-plugin.toml`'s pre-flight step (#3800). - `windows-install.test.ps1`: the case reads `$state.badBinary`, not `releaseDown`. No code changes. One code line differs only in its comment: `install.ps1`'s `} catch { $job = [IntPtr]::Zero }` gets its trailing note back. No shellcheck or PSScriptAnalyzer directive comes back. ## Kit proof `~/.dori-sa/kit/refactor-merge/proof.sh 4115` at 4769efc ends with **FAIL**. Of the 8 files it proves 1 (`install.ps1`) and lists 7 as differing. Each one's first difference is "inside a string or heredoc": the kit's shell and PowerShell reader has lost track of the quoting by then and reads the restored comment as string text. This is the misread these files were held back for. Each file was checked again with the language's own parser, base 9df15d6 against this head: - `shfmt -mn` (shfmt 3.14.1's parser, which drops comments) prints the same output for `install.sh`, `ci-runner-route.sh`, `run.sh`, `build-cache-promote.sh` and `hook-test-harness.sh`. - `relay-ios-sim.sh`: two of its notes are inside the `remote.sh` heredoc, the script it runs on eamac. They are comments in that script, but text to this one. `shfmt -mn` gives the same output for the heredoc's script, and for the file with the heredoc emptied. - `install.ps1` and `windows-install.test.ps1`: PowerShell 7.6's `Parser.ParseFile` gives the same token list (comments and newlines left out) on both sides, 6,005 and 10,476 tokens. So this PR needs the owner's merge: the kit's rule is to merge only on PASS. ## Validation - `bun run check fast`: passed (18,673 unit tests, typecheck, build, generated themes and types). - `bash -n` on the six `.sh` files; `bun test scripts/conventions.test.ts`. - `git show HEAD~1 HEAD | grep -E '^[+-][^+-]' | grep -vE '^[+-]\s*#'` prints only that `install.ps1` line. Left open, not merged, on the owner's word. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#4049 (
scripts/, part 4 of 5) was part of the repo-wide comment pass and merged before the owner's rule for comment-removal PRs: security notes, platform facts, measured values, third-party attribution, Rust SAFETY notes and traps that name a concrete breakage stay. This PR puts back what it dropped of those, word for word where the code is unchanged, on today'smain.How the notes were picked: a Codex adversarial review (gpt-6.2-sol, reasoning high) of the merged commit against its parent listed every deleted comment it took for a kept kind; each finding was checked against the code before the pass and today's file, and put back only when it is one of those kinds. A trap came back only when it names what the obvious change would break. Notes whose code has since moved sit on that code now; notes whose code is gone, or that are no longer true, stay out.
run.sh,build-cache-promote.sh,hook-test-harness.sh,relay-ios-sim.share left out: the kit cannot yet prove a comment-only change there (its shell and PowerShell readers lose track of a quoted string partway through the file), so those notes wait for a kit fix.Comments only: no code changes. The refactor-merge kit's
proof.shchecks that every file is identical once comments are removed; lint directives (which it counts as code) stay out.Details
Committed: 92 files, +951 / -17 lines (the 17 are cut or reworded comments replaced by their original wording)
stopped)The provers print nothing (prove_ts, prove_other) and verify.ts reports
checked 92, problems 0.Held, not committed (the kit reads them as "inside a string or heredoc")
4 files, 83 findings, about 258 lines. Their whole diffs are in these patches, which apply cleanly to main:
Most of these are security notes (41 findings).
Security notes put back (committed)
from one descriptor, bounded; owner socket trusted only when owned, mode-checked, not a link; door pinned per
command; no
authorizationon the owner socket; machine profile pairs through the relay only; health neverfalls back to TCP;
authfields; PC's terminal is the approver; typed-ahead lines and pipes approve nothing;digits re-read; signals take the code back; QR is a key, terminal only;
phoneis the one Tailscale writer.pairing code replaced before the package check.
at exact refs; artifact actions by any spelling; anything not read-only counts as write; case variants
refused; reusable-workflow
ifchecked repo-wide; no download by id; Pages found by four signs; Releasehands the Mac app workflow every secret.
server-binary-workflow.test.ts: crate tree ties a host to sources; host record removed first, never trusted;
manifest signature, version, size and SHA-256 checked before anything changes; NoBinaryRelease only on 404;
https-only redirects; archive members without
..or links; committed key only, test key by option;installed binary re-verified; Ed25519 over exact bytes; strict base64; duplicate keys refused; schema
fail-closed; version check beside the signature; sign job leaves no key line; deploy job never reads the key.
for a release; attempt-bound, skipped is not passed; one-line annotation; restored builds sha256-checked;
Release restores no cache; effective token permissions; attest jobs cannot tag or release; output parser
refuses extra lines; release notes cannot open a tag.
proven guard; cache never writable; unclearable outbox means no cache; own network namespace; root-owned
lock files; no other host mount; mirror bound to its repository; exact repository name; only the proven
direct parent is signalled; name is not an executable; claim floods and stale claims; fail-closed hook
header; pid digits only; token to config.sh only; DNS rule scope; never a job without the firewall.
relay-join, relay-second-device-join: approve guards (focus, Tab, double-click, labels); QR code taken
back on join; visitor and serve-only limits; relay switch closes the device gate; non-extractable keys;
requests stay off the shell host; damaged or forged offers refused before any socket; revocation clears
the key; push isolated per PC; render host runs no script before consent; foreground-only session report;
CSP-only negative control.
sticky-modifiers, terminal-autoswitch, terminal-keyboard: replayed OSC 52 never copies (older bridge,
permission off, reconnect, pane switch, observer, retirement); secrets masked, dropped on disconnect, never
drafted or held offline; no auto-replay before readiness; held drafts not bypassed by keys or paste; a
newline in a path is not Enter; text dressed as a PNG refused; observers get no control.
test-herdr.tsimport keeps the user's session out;telemetry keeps nothing from before an off and tells nothing while off. Also pty-compare, ssh-integration,
ssh-password-docker, security-summary, revision-bound-update, session-history, repo-diff, pwa-update,
push-health, prompt-dock: isolation, watch-only refusals, store-bound Resume, auth boundary offline.
Declined or already there (43)
HERDR_SOCKET precedence, prompt-dock focus choices, tab-menu "must not open the gate").
that describe a fixture (2); one rewritten Vite note that kept its meaning (service-worker-build.ts).
removed), HANGUL_INK_EM now documented at its constant in src/.
For the owner
on any other form" do not mention the pull-request Mac
runs-onform that ci(mac): run the Apple Silicon jobs without secrets on the self-hosted Mac #4058 accepts. The README's rulelist does not either.
Left out after review: the 40-line security header of
scripts/privileged-jobs-workflow.test.ts. #4049 dropped it on purpose becausescripts/self-hosted-runner/README.md("Security model") carries it, and its rule 3 predates #4058's pull-request Macruns-onform, so putting it back word for word would restore an out-of-date rule.Validation
bun run check fast: passed (18,593 unit tests, typecheck, build, generated themes and types).proof.sh(comments only),ready.sh(required checks, threads, CodeRabbit, main) before the merge.🤖 Generated with Claude Code