Skip to content

refactor(scripts): drop comments the code can say, part 1 of 5 - #4042

Merged
devswha merged 2 commits into
mainfrom
refactor/no-comment-scripts-1
Nov 17, 2026
Merged

devswha merged 2 commits into
mainfrom
refactor/no-comment-scripts-1

Conversation

@devswha

@devswha devswha commented Nov 17, 2026

Copy link
Copy Markdown
Owner

What

Part 1 of 5 for scripts/ in the repo-wide comment pass (after #4036, #4038 and #4040). This part covers:

  • the a–ci browser regressions and QA scripts
  • the build and check tooling: check.ts, check-report.ts, build-cache.ts, build-xterm.ts, build-site.ts, build-server.ts, ci-browser*.ts/.sh, ci-flakes-issue.ts
  • the installer tests (install-*.test.ts)
  • the inbox regressions and the join kit (scripts/join/)

About 3,450 comment lines go. The usage headers of check.ts, ci-browser-parallel.ts, ci-browser-timings.ts and ci-flakes-issue.ts went: docs/development.md already documents those commands and their variables.

What stays:

  • Machine-read comments: every // fixed wait: (scripts/fixed-sleeps.ts reads them), and the @ts-expect-error on app/web/shell.js's import.
  • The join kit's contract: the usage and exit-code block of join.sh.
  • Behaviour we cannot change: POSIX shells and job control, Linux /proc and zombies, socket path limits, ps locale, git, Vite, TypeScript, xterm, Playwright, Chromium and WebKit, @legendapp/list (checked in its source), and GitHub's API limits.

Every comment-only change was checked against origin/main: TypeScript by syntax tree, shell with whole-line comments dropped. No test, script or doc reads a deleted comment: each agent searched *.test.ts, scripts/ and docs/ for a phrase of every comment before deleting it.

Code changes (mechanical, no behaviour change)

  • scripts/inbox-mode-demo-regression.ts: the drawer's second-tap wait takes SECOND_TAP_MS from src/lib/useSidebarLayout.ts (passed into waitForFunction) instead of a bare 400.
  • scripts/join/join.sh: dropped a shellcheck disable=SC2086. No shellcheck runs on scripts, and the split it hid is listed below.

Left open (redesigns, not done here)

  • check.ts:
    • HERDR_TEST_SHARDS defaults to 1 because timing-bound contract tests fail four at a time.
    • askTicket ranks a lock without a ticket at -Infinity.
    • takeTicket bumps queuedAt + 1 for a clock set back.
    • retire leaves a known window for two claims.
    • acquire checks the queue twice, and alone treats a pre-slot holder as owning the PC.
  • ci-browser-parallel.ts stopRun: its refused/unmarked/seen sets and the grace after SIGKILL.
  • ci-browser.sh: the scripts whose evidence code changes what they check are an unnamed case list.
  • check.test.ts descendant: relies on when a SIGTERM handler takes effect.
  • build-cache.ts: the cache's event rule, the shared/vendor/*/dist regex, "stop waiting once another job holds the lock", and the per-run lock name.
  • build-server.ts artifact (a lazy import so sign and verify run without packages), and build-site.ts's /icons/ rewrite (the client could use relative paths).
  • app-shell.test.ts: the @ts-expect-error goes once app/web/shell.js has a declaration file.
  • Unnamed timings and duplicated values:
    • android-ime-regression.ts has a bare typing pace.
    • install-hint-demo-regression.ts HOLD_DEMO_TURN copies a 4500 ms hold from site/demo/transport.ts, and so do several other scripts.
    • NO_RESIZE_WAIT_MS is a bare 1 s.
    • Several fixed waits for "frames to have gone out" in inbox-mode-demo-regression.ts could poll window.inboxFixture.frames.
    • join.contract.test.ts sleeps 2 s where it could use DWELL_MS.
  • inbox-mode-*-regression.ts: pass their part through INBOX_MODE_PART, where the main script could export run(part).
  • join.sh:
    • Globals carry results: $pid, j_b, j_got.
    • j_refusal and J_HERDR_REFUSED match the server's English sentences instead of a reason code.
    • j_remove's return codes 0–4 have no names.
    • $J_PROFILE_ENV $J_PREVIEW_ENV are left unquoted on purpose.
    • The 37/38/39 decision could be a function.
  • join.contract.test.ts: the flag files under /var/tmp/fake-* are declared nowhere, and serveHerdr takes a positional boolean.

Validation

  • bun run check fast: passed (18,567 unit tests, typecheck, build, generated files).
  • Unit tests of every touched test file and of the modules that import a touched one: all pass (349 + 405 + 203 + 15, plus scripts/conventions.test.ts).
  • sh -n on join.sh; SECOND_TAP_MS imports from a plain Bun script (400).
  • Not run here: the browser regressions themselves (their code changed only in the one wait above) and join.contract.test.ts (needs containers). CI's browser jobs run the regressions.

🤖 Generated with Claude Code

The first of five scripts/ slices in the repo-wide comment pass: the
a-ci browser regressions and QA scripts, the build and check tooling
(check.ts, build-cache.ts, build-xterm.ts, ci-browser-parallel.ts), the
installer tests and the join kit. About 3,450 comment lines go; every
`// fixed wait:` stays, and so do notes on POSIX, Linux /proc, Vite,
xterm, git, Playwright, Chromium, WebKit and @legendapp/list. The inbox
regression takes SECOND_TAP_MS from the app instead of a bare 400, and
join.sh drops a shellcheck suppression nothing reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Expanded browser regression coverage for inbox navigation, chat activity and rendering, and setup flows across device layouts and themes.
    • Added checks for accessible chat status, tool labels, clipboard behavior, and launcher and installer scenarios.
    • Existing checks continue to cover conversation history, device states, loading screens, and installation flows.

The pull request removes explanatory comments from many scripts and test files. It also changes selected browser and installer test assertions, updates an inbox timing constant, removes one install-hint scenario, and canonicalizes HOME in the join script.

Changes: Script and regression-suite updates

Layer / File(s) Summary
Regression, build, CI, installer, and join script updates
scripts/*, scripts/join/*
Most edits remove explanatory comments without changing executable behavior. Several browser tests add checks for chat history, code copying, working-line states, and inbox interactions. Installer tests add output and selection assertions. The join script canonicalizes HOME before deriving J_HOME.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Merge Risk: Minimal · previous review 5a255

This change mostly removes comments from scripts and tests, with a few small test adjustments. It does not alter production behavior in any way the supplied evidence shows. Merge risk is minimal; CI browser jobs will exercise the regression scripts.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "refactor(scripts): drop comments the code can say, part 1 of 5" matches the changeset, which removes roughly 3,450 explanatory comment lines from scripts/ files. It also notes the series po…
Description check Passed The description covers the scope (what changes and what stays), the code changes, deferred follow-ups, and validation steps run and skipped. It does not follow the repository template's exact headings…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "refactor(scripts): drop comments the code can say, part 1 of 5" matches the changeset, which removes roughly 3,450 explanatory comment lines from scripts/ files. It also notes the series position, and the single code change (SECOND_TAP_MS replacing a bare 400 ms wait) is minor and outside the title's focus. The title is specific and conventional.

Full details: Description check

Explanation

The description covers the scope (what changes and what stays), the code changes, deferred follow-ups, and validation steps run and skipped. It does not follow the repository template's exact headings: it uses "What" and "Validation" rather than "Change", and it omits the CONTRIBUTING.md/changelog reference. The changelog.d fragment requirement is not addressed. The content is substantive, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ac48916 and 5a25569.

Files selected for processing: 99

  • scripts/agent-entry-points-demo-regression.ts
  • scripts/agent-groups-demo-regression.ts
  • scripts/agent-helpers-fold-demo-regression.ts
  • scripts/agent-lock-demo-regression.ts
  • scripts/agent-skill-menu-demo-regression.ts
  • scripts/agent-state-groups-demo-regression.ts
  • scripts/agents-sign-in-demo-regression.ts
  • scripts/agy-chat-browser-qa.ts
  • scripts/alert-sound-regression.ts
  • scripts/alert-webhook-demo-regression.ts
  • scripts/android-ime-regression.ts
  • scripts/app-faces.ts
  • scripts/app-shell.test.ts
  • scripts/application-paging-regression.ts
  • scripts/artifacts-browser-regression.ts
  • scripts/artifacts-fixture.tsx
  • scripts/background-agent-detail-demo-regression.ts
  • scripts/background-agent-detail-demo-run.ts
  • scripts/background-agent-states-desktop-demo-regression.ts
  • scripts/background-agent-states-korean-demo-regression.ts
  • scripts/background-agent-states-phone-demo-regression.ts
  • scripts/bench-file-access.ts
  • scripts/benchmark-codex-transcript.ts
  • scripts/boot-loading-demo-regression.ts
  • scripts/browser-evidence.ts
  • scripts/build-cache.test.ts
  • scripts/build-cache.ts
  • scripts/build-remote-bundle.ts
  • scripts/build-server.ts
  • scripts/build-site.ts
  • scripts/build-xterm.test.ts
  • scripts/build-xterm.ts
  • scripts/bun-path.sh
  • scripts/changelog-fold.test.ts
  • scripts/changelog-fold.ts
  • scripts/chat-browser-qa.ts
  • scripts/chat-fallback-browser-qa.ts
  • scripts/chat-fallback-fixture.tsx
  • scripts/chat-gjc-streaming-browser-qa.ts
  • scripts/chat-greeting-demo-regression.ts
  • scripts/chat-history-browser-qa.ts
  • scripts/chat-history-fixture.tsx
  • scripts/chat-list-markers-demo-regression.ts
  • scripts/chat-local-send-follow-demo-regression.ts
  • scripts/chat-markdown-images-browser-qa.ts
  • scripts/chat-markdown-images-fixture.tsx
  • scripts/chat-math-demo-regression.ts
  • scripts/chat-no-rewind-demo-regression.ts
  • scripts/chat-outcome-note-browser-qa.ts
  • scripts/chat-quote-selection-end-regression.ts
  • scripts/chat-request-details-demo-regression.ts
  • scripts/chat-scroll-padding-fixture.tsx
  • scripts/chat-scroll-padding-regression.ts
  • scripts/chat-select-quote-demo-regression.ts
  • scripts/chat-selection-copy-regression.ts
  • scripts/chat-selection-turn-end-demo-regression.ts
  • scripts/chat-size-regression.ts
  • scripts/chat-svg-figures-demo-regression.ts
  • scripts/chat-tool-paths-demo-regression.ts
  • scripts/chat-unanswered-send-qa.ts
  • scripts/chat-unavailable-reason-qa.ts
  • scripts/chat-virtual-browser-qa.ts
  • scripts/chat-virtual-fixture.tsx
  • scripts/chat-visualization-browser-qa.ts
  • scripts/chat-visualization-fixture.tsx
  • scripts/chat-working-line-demo-regression.ts
  • scripts/check-report.test.ts
  • scripts/check-report.ts
  • scripts/check.test.ts
  • scripts/check.ts
  • scripts/chrome-path.ts
  • scripts/ci-bounded-retry.sh
  • scripts/ci-browser-parallel.test.ts
  • scripts/ci-browser-parallel.ts
  • scripts/ci-browser-timings.test.ts
  • scripts/ci-browser-timings.ts
  • scripts/ci-browser.sh
  • scripts/ci-browser.test.ts
  • scripts/ci-concurrency.test.ts
  • scripts/ci-ffmpeg.sh
  • scripts/ci-flakes-issue.test.ts
  • scripts/ci-flakes-issue.ts
  • scripts/inbox-mode-demo-regression.ts
  • scripts/inbox-mode-panes-demo-regression.ts
  • scripts/inbox-mode-rail-demo-regression.ts
  • scripts/install-binary.test.ts
  • scripts/install-gjc-integration.test.ts
  • scripts/install-gjc-integration.ts
  • scripts/install-herdr-core.test.ts
  • scripts/install-hint-demo-regression.ts
  • scripts/install-node-fallback.test.ts
  • scripts/install-ovis-command.test.ts
  • scripts/install-pi-integration.test.ts
  • scripts/install-pi-integration.ts
  • scripts/install-star.test.ts
  • scripts/install-state-demo-regression.ts
  • scripts/interface-font-demo-regression.ts
  • scripts/join/join.contract.test.ts
  • scripts/join/join.sh
Files with no reviewable changes: 82

  • scripts/agent-entry-points-demo-regression.ts
  • scripts/agent-groups-demo-regression.ts
  • scripts/agent-helpers-fold-demo-regression.ts
  • scripts/agent-lock-demo-regression.ts
  • scripts/agent-state-groups-demo-regression.ts
  • scripts/agents-sign-in-demo-regression.ts
  • scripts/agy-chat-browser-qa.ts
  • scripts/alert-sound-regression.ts
  • scripts/alert-webhook-demo-regression.ts
  • scripts/android-ime-regression.ts
  • scripts/app-faces.ts
  • scripts/app-shell.test.ts
  • scripts/artifacts-browser-regression.ts
  • scripts/artifacts-fixture.tsx
  • scripts/background-agent-detail-demo-regression.ts
  • scripts/background-agent-detail-demo-run.ts
  • scripts/background-agent-states-desktop-demo-regression.ts
  • scripts/background-agent-states-korean-demo-regression.ts
  • scripts/background-agent-states-phone-demo-regression.ts
  • scripts/benchmark-codex-transcript.ts
  • scripts/boot-loading-demo-regression.ts
  • scripts/build-cache.test.ts
  • scripts/build-remote-bundle.ts
  • scripts/build-server.ts
  • scripts/build-site.ts
  • scripts/build-xterm.test.ts
  • scripts/build-xterm.ts
  • scripts/bun-path.sh
  • scripts/changelog-fold.test.ts
  • scripts/changelog-fold.ts
  • scripts/chat-fallback-browser-qa.ts
  • scripts/chat-fallback-fixture.tsx
  • scripts/chat-gjc-streaming-browser-qa.ts
  • scripts/chat-greeting-demo-regression.ts
  • scripts/chat-history-browser-qa.ts
  • scripts/chat-history-fixture.tsx
  • scripts/chat-list-markers-demo-regression.ts
  • scripts/chat-local-send-follow-demo-regression.ts
  • scripts/chat-markdown-images-browser-qa.ts
  • scripts/chat-markdown-images-fixture.tsx
  • scripts/chat-math-demo-regression.ts
  • scripts/chat-no-rewind-demo-regression.ts
  • scripts/chat-outcome-note-browser-qa.ts
  • scripts/chat-quote-selection-end-regression.ts
  • scripts/chat-request-details-demo-regression.ts
  • scripts/chat-scroll-padding-fixture.tsx
  • scripts/chat-scroll-padding-regression.ts
  • scripts/chat-select-quote-demo-regression.ts
  • scripts/chat-selection-copy-regression.ts
  • scripts/chat-selection-turn-end-demo-regression.ts
  • scripts/chat-svg-figures-demo-regression.ts
  • scripts/chat-tool-paths-demo-regression.ts
  • scripts/chat-unanswered-send-qa.ts
  • scripts/chat-unavailable-reason-qa.ts
  • scripts/chat-virtual-fixture.tsx
  • scripts/chat-visualization-browser-qa.ts
  • scripts/chat-visualization-fixture.tsx
  • scripts/chat-working-line-demo-regression.ts
  • scripts/check-report.test.ts
  • scripts/chrome-path.ts
  • scripts/ci-bounded-retry.sh
  • scripts/ci-browser-timings.test.ts
  • scripts/ci-browser-timings.ts
  • scripts/ci-browser.sh
  • scripts/ci-concurrency.test.ts
  • scripts/ci-ffmpeg.sh
  • scripts/ci-flakes-issue.test.ts
  • scripts/ci-flakes-issue.ts
  • scripts/inbox-mode-panes-demo-regression.ts
  • scripts/inbox-mode-rail-demo-regression.ts
  • scripts/install-binary.test.ts
  • scripts/install-gjc-integration.test.ts
  • scripts/install-herdr-core.test.ts
  • scripts/install-hint-demo-regression.ts
  • scripts/install-node-fallback.test.ts
  • scripts/install-ovis-command.test.ts
  • scripts/install-pi-integration.test.ts
  • scripts/install-pi-integration.ts
  • scripts/install-star.test.ts
  • scripts/install-state-demo-regression.ts
  • scripts/interface-font-demo-regression.ts
  • scripts/join/join.contract.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.

@devswha
devswha merged commit 5a53eab into main Nov 17, 2026
25 checks passed
@devswha

devswha commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head e6591ea5eb23 as 5a53eab48a77 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
machine-proof CLEAR
supervisor-read CLEAR

The owner's refactor (scripts, part 1 of 5), merged by the merge pass on his word. A machine proof removed comments per language and compared the merge base with this head: 96 of the 99 files are identical, including all five shell scripts. The three that differ were read: two test fixtures differ only by the blank line a removed JSX comment leaves, and scripts/inbox-mode-demo-regression.ts replaces the literal 400 with SECOND_TAP_MS (400) from src/lib/useSidebarLayout.ts. One deleted comment was a shellcheck directive in scripts/join/join.sh, which nothing runs shellcheck on. No test reads a deleted comment.

Deleted comments that carried a reason were sorted before the merge (the owner's rule F): A=171 (a test already holds the reason), B=16 (tests to write; among them check.ts refusing an actionlint archive whose SHA-256 does not match, and join.sh refusing to write server.env from a value holding a quote or a backslash), C=198 (put back on this branch by the merge pass's worker: mostly why a browser script waits for what it waits for, and platform facts CI does not run). About 60 join.sh entries counted in A are guarded only by a container test no workflow runs; they join the B list.

@devswha
devswha deleted the refactor/no-comment-scripts-1 branch November 17, 2026 14:21
devswha added a commit that referenced this pull request Nov 17, 2026
## What

Part 2 of 5 for `scripts/` in the repo-wide comment pass (after #4042).
This part covers:

- the ci-flakes to file-viewer scripts: `ci-tests.ts`, `ci-setup`,
`ci-runner-route`, `conventions.test.ts`, the
composer/context-menu/deep-link/design-gate/device-security regressions
- the phone and plugin scripts: the `ovis` command's `plugin-link.ts`,
`plugin-launch.ts`, `plugin-port.ts`, `plugin-runtime.ts` and
`plugin.ps1`
- the virtual-source to xterm scripts: the Windows host and plugin
tests, `workflow-expression.ts`, the xterm composition and parser-state
tests

About 2,700 comment lines go. What stays:

- **Machine-read comments:** every `// fixed wait:`
(`scripts/fixed-sleeps.ts` reads them).
- **Contracts:** command-line usage that `docs/development.md` lacks
(`ci-lanes.ts`, `design-gate-qa.ts`, `files-prompt-regression.ts`).
- **Behaviour we cannot change:**
- terminals and shells: POSIX terminal modes, `tcflush` and canonical
mode, cmd.exe and PowerShell quoting, Windows pid reuse and file handles
- tools: git, Bun, GitHub's API and Actions expression rules, Dependabot
- the browser stack: Playwright, Chromium, Safari, Gboard and Firefox
IME, xterm internals, `@pierre/diffs`

Every comment-only change was checked against `origin/main`: TypeScript
by syntax tree, shell with whole-line comments dropped. No test, script
or doc reads a deleted comment. The two things the installer greps for
are both pinned by tests: `COMMAND_ALIASES` and `"tui"` in `plugin.ts`,
and `export function answerOf(` in `plugin-link.ts`
(`scripts/install-ovis-command.test.ts`).

## Code changes (mechanical, no behaviour change)

- `scripts/drawer-modal-regression.ts` imports `SECOND_TAP_MS` from
`src/lib/useSidebarLayout.ts` instead of a second `const SECOND_TAP_MS =
400`.
- `scripts/core-history-scroll-demo-regression.ts` hands the server's
`CLEAR_HISTORY` to its page fixture instead of a byte-for-byte copy of
the escape string.
- `server/copilot-foreground.ts`: its three bare `2000`s are now
`COPILOT_RPC_TIMEOUT_MS`, and
`scripts/copilot-foreground-prototype.test.ts` sizes its attempt budget
from it (`3 * COPILOT_RPC_TIMEOUT_MS`).
- A rule only a comment stated, now a test: `workflow-expression.ts`
evaluates both sides of `&&`/`||` and skips `format()`'s `{{ }}`
escapes, so no security rule may build on it.
`workflow-expression.test.ts` fails if anything other than
`light-runner-workflow.test.ts` imports it, and its message says why.

## Left open (redesigns, not done here)

- **`plugin-link.ts`:**
  - `asking` is a state machine of loose variables.
- `addByQr` is about 800 lines whose trust model and end order were
prose.
  - `WINDOW_MS`/`RELIST_MS` copy server and client constants.
- `LAST_MS`, `DWELL_MS` and `SWEEP_MS` (the last tied to the 10 s stop
budget) need named rules.
- **`plugin-launch.ts`:**
- `CheckoutCommit` is written three times (here, `install.ps1`,
`install.sh`).
- The `.ovis/server/source-build` stamp is an unwritten format shared
with `install.ps1`.
  - `marker`/`builtState` need a decision function.
- **Release capability checks by grepping the source:** `install.sh`
greps for `COMMAND_ALIASES` and `answerOf`. Tests pin both, but a real
capability marker would be better.
- **Hand-copied demo timings:** `plan-chip-demo-regression.ts holdTurn`
holds the demo's timers by their 4500/2400 ms values, as
`install-hint-demo-regression.ts` does.
- **Smaller items:**
  - `pi-image-browser-qa.ts` has an inline wait-until-stable loop.
  - `plugin-phone.test.ts FAKE` is safe only because of its PATH.
  - `ci-flakes.ts gh`: every writer must pass `attempts: 1`.
- `demo-first-message*.test.ts` import the demo transport with `?query`
because it binds `window` on import.
- The `windows-*` scripts repeat
`localStorage.setItem("ovis:mirror-wrap", false)` and inline request
waits.
- `windows-install.test.ps1`'s `bun` stand-in copies the plugin's
decisions.
- `windows-plugin-stop.test.ts` needs a child only because `plugin.ts`
reads its state folder on import.
  - `workflow-needs.test.ts` has a comment-justified exception.
  - `workflow-expression.ts` could short-circuit and handle the escapes.

## Validation

- `bun run check fast`: passed (18,569 unit tests, typecheck, build,
generated files).
- Unit tests of every touched test file and of the modules that import a
touched one: 316 + 376 + 106 pass.
`scripts/copilot-foreground-prototype.test.ts` with the Copilot tests:
21 pass. `scripts/workflow-expression.test.ts`: 5 pass.
- Not run here: the browser regressions themselves (their code changed
only in the two imports above). CI's browser jobs run them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: sisyphus-dev-ai <[email protected]>
devswha added a commit that referenced this pull request Nov 17, 2026
…4082)

## What

#4042 (`scripts/`, part 1 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's `main`.

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.

Comments only: no code changes. The refactor-merge kit's `proof.sh`
checks that every file is identical once comments are removed; lint
directives (which it counts as code) stay out.

## Details

### Lines restored per kind (approximate; a mixed block counts under its
main kind)

| Kind | Findings accepted | Lines |
|---|---|---|
| Security | 249 of 254 | ~573 |
| Platform fact | 99 of 101 | ~217 |
| Measured value | 19 of 19 | ~34 |
| Trap (names a concrete breakage) | 90 of 109 | ~194 |
| Attribution | 1 of 1 (ci-concurrency.test.ts: "as in oh-my-openagent's
ci.yml") | 5 |

74 files, all in `scripts/`. Nothing was already back on main: no commit
after #4042 touched these files.

### Declined, rejected, skipped

- 19 trap findings declined: they name a test target or a regression the
test catches, or give a design reason. Examples:
- build-xterm.test.ts: "must never see a module half rewritten (#2021)"
(the test's own target)
- changelog-fold.test.ts: per-PR fragments because Unreleased
"conflicted on nearly every merge" (a design reason)
- join.contract.test.ts: four "regression (before: ...)" notes (1022,
1138, 1157, 1170)
- 7 findings rejected as outside the rule: chat-history 435,
chat-svg-figures 110 and chat-tool-paths 357 and 536 (test targets, not
security notes); install-gjc-integration.test 109 and 123
(Given/When/Then lines); build-xterm.test 71 (it is about the build's
own order, not TypeScript).
- 7 findings about the PR body and 3 LOW findings were left alone.
- Partial blocks: when a header mixed narration with a kept note, only
the note's sentences came back (for example the "All files and HTTP
traffic stay in this disposable, loopback-only app" sentence of the demo
regressions).

### Security notes put back (file, a few words)

- agent-entry-points, agent-state-groups,
background-agent-detail-demo-run: a watching device gets no install and
sends nothing; a downgrade closes what was open; transcript reads only,
no POST, no input
- agents-sign-in: Claude Code's claude.com and Codex's auth.openai.com
flows; Escape cancels the sign-in by its id; sign-ins read only after
the user's own Continue
- alert-webhook: the webhook URL only shown masked, nothing posted
anywhere
- the demo and QA scripts (agent-skill-menu, artifacts,
bench-file-access, benchmark-codex-transcript, boot-loading, chat-*,
inbox-mode, interface-font, install-hint): loopback-only app, no herdr
session, no user state; boot-loading's page under the app's CSP
- browser-evidence: trace snapshots and network deliberately off
- build-cache(.test): the cache read-only on runners, entries filed per
trusted run, the launcher's GitHub check, manifest verification, no
write through a planted link; the read-only mount and runner-user
permissions in the fixture; a pull request naming main's key or run
- build-remote-bundle: the official Node SHASUMS256 source
- build-server: the signing key must match the committed public key; the
version check beside the signature; key file modes on Windows
- chat-browser-qa: no live terminal written; its own herdr session;
pairing cookie; no Tailscale login standing in; clipboard refusal never
reported as success
- chat-history-browser-qa: connection failures report metadata only; a
remote PC's same pane id is another target; a refusal hides stale
history
- chat-local-send-follow, chat-size-regression: an uncertain receipt or
reconnect sends nothing again; masked-prompt keys go as a password
would, held in no draft or disk, sent only by the user; the real
server's validation
- chat-select-quote: a shell would read the `>` lines as redirects
- chat-svg-figures, chat-visualization: a figure that could run or load
stays a code block; the card fetches nothing; RTL-override file names
- chat-tool-paths: a `..` path never labelled as inside the folder
- check.ts, check.test.ts: credentials kept out of reports; actionlint
SHA-256; the user's herdr socket and config never reached; the run's own
plugin registry and session; slots in other containers' networks; CI log
line injection; teardown only of the run's sessions; EPERM is no proof
of a stop
- ci-browser-parallel(.test): process ownership by run mark and start
time, never by pid alone; refused signals reported; argv[0] never
printed (credentials, URLs); hostile program names cannot inject
flake-report rows
- ci-browser-timings: `--runs` only reads through gh
- ci-ffmpeg.sh: ffmpeg pinned by release and SHA-256
- ci-flakes-issue: table cells escaped; only the issue ISSUE_AUTHOR
opened is updated
- install-binary.test: the one pinned key; verify before unpacking;
unsigned manifest ignored; size is no proof; a missing manifest is no
request for source
- install-gjc-integration, install-pi-integration: only their own file,
only with the banner, in pi's auto-loaded folder
- install-herdr-core, install-node-fallback, install-ovis-command,
install-star tests: stand-ins only, nothing installed or fetched, no
star read or given; typed-ahead input never answers a device approval or
the star question; a link never followed; a settings file never run; the
app's SSH terminal is not the person's
- join.sh: the trial's consent, SHA256SUMS by exact name, kit allowlist,
TEST-KIT pinning; env -i and the cleared variables; no newline or quote
in server.env; the owner socket's rules; whole-JSON and curl-exit
answers only; undo from fixed paths with the marker, never from the
receipt; links refused everywhere; pids never signalled unless proven
the probe's; the pairing gate closed before a server stays; accounts
named, never called yours; the relay key exposed by a shared state
folder
- join.contract.test: the same boundaries from the test's side (owner
socket, consent text, env -i, foreign units, receipts and links refused,
proxy bypass for 127.0.0.1, empty hashes not equal)

## 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](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant