Repository navigation
chore(check): claim the checkout for fast runs too, and say which checks ran - #2353
Conversation
…cks ran (#554) Part of #554. `bun run check fast` took no checkout claim, although its unit tests rewrite shared/herdr-api.generated.ts and it builds into dist/: two fast runs, or a fast run beside a lane run, in one checkout could break each other. Every mode now claims the checkout marker; a fast run still takes no slot and no longer takes the PC-wide admission port, so it is never refused as busy. AGENTS.md and the PR template now say a handoff or PR names which checks ran and which were skipped (the item that stands in for a pre-push hook).
…er takes (#554) Fast checks claims only its checkout now, so CHECK_WAIT_SECONDS had nothing to wait for there.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
| Layer / File(s) | Summary |
|---|---|
Checkout claims and admission scripts/check.ts, scripts/check.test.ts, .github/workflows/ci.yml, docs/development.md |
All check modes claim checkout ownership. Zero-slot runs skip the admission port, and tests cover checkout conflicts and refusal behavior. The Fast checks job no longer sets CHECK_WAIT_SECONDS. |
Owner identity and marker takeover scripts/check.ts, scripts/check.test.ts, docs/development.md |
Markers can record process start identity. Linux takeover uses an abstract socket; other platforms use a reclaim file. Tests cover stale claims, process identity, and takeover races. |
Check reporting guidance
| Layer / File(s) | Summary |
|---|---|
Record validation performed .github/pull_request_template.md, AGENTS.md |
The pull request template asks for checks run and results, skipped checks, and HTTP/WS contract-test coverage. Maintainer guidance says handoffs and PR validation must list checks run and skipped. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Bug fix · Severity of issue fixed: Medium
Merge Risk: 
Minimal · previous review 72ca2
-
No actionable merge-blocking issue is established; proceed with normal checks and the workflow owner’s approval.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 inconclusiveCheck name Status Explanation Resolution Linked Issues check Directly linked issue #554has five items. Coding status per item:
1. Two runs in one checkout (#554): Headscripts/check.tsheader states thatfasttakes no slot but claims its checkout, so `fas…Provide evidence that the Node major-version comparison (warning) from #1788exists at the merge base b319e13 or at head 72ca2b0. Evidence means the file path and the relevan… Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "chore(check): claim the checkout for fast runs too, and say which checks ran" names the two main changes: fast runs now claim the checkout, and handoffs state which checks ran. It is specific and conventional. It is slightly long, and the second clause covers a secondary change, but the title is related to the changeset.
Full details: Out of Scope Changes check
-
Explanation
Each changed area maps to an item in
#554or supports one:scripts/check.ts: per-checkout claim for every mode, zero-slot admission that skips the admission port, and refusal messages. These implement items 1 and 2 of#554.- Claim-protocol hardening in
scripts/check.ts(Linux abstract-socket takeover,.reclaimfiles on other platforms, process start identity for PID reuse, zombie rejection): these make the checkout marker from item 1 correct after a killed run. They are part of the same claim, not separate features. .github/workflows/ci.yml: removesCHECK_WAIT_SECONDS: 120from the Fast checks job. This is connected becausefastno longer takes the admission port that the setting served.scripts/check.test.ts: tests for the claim, the slotless admission path, and the CLI refusal. These support the changed behavior.AGENTS.md,.github/pull_request_template.md,docs/development.md: the validation-reporting item and documentation of the claim behavior.
No unrelated behavior change appears in the summaries.
fastnow rejects an invalidCHECK_WAIT_SECONDSorCHECK_LOCK_PORTwith exit 2. This validation is tied to the lock settings thatfastnow reads. The review used the PR summary and the head file header, not a full diff, so this verdict assumes the summaries are complete.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 8 functions across 2 files. (3 skipped: 3 unsupported.)
Full details: Description check
-
Explanation
The pull request includes the required Change and Validation sections. It explains the problem, resulting behavior, linked issue, workflow impact, tests, command results, skipped checks, known limits, and contract-test applicability. The description is complete and relevant.
-
Full details: Linked Issues check
-
Explanation
Directly linked issue
#554has five items. Coding status per item:- Two runs in one checkout (
#554): Headscripts/check.tsheader states thatfasttakes no slot but claims its checkout, sofastand other modes refuse each other. The PR summary reports a checkout marker for every mode, and three new tests inscripts/check.test.ts. The issue names a per-checkout lock as the remedy. PASS by the PR's described implementation. Not independently read in the code. Documented gap: a manualbun run buildbeside a check is not blocked. The issue's own remedy does not require blocking it. check runtakes no lock (#554): Basescripts/check.tsneedsLock()returns true whentodo.command !== null. PASS, already on main.- Node version (
#554): The PR says#1788added a warning when the local Node major differs from CI. The reviewed evidence does not show that code. The base history's last ten commits do not include#1788, and the warning code was not read within the inspection limit. A PR reference alone is not evidence. INCONCLUSIVE for this item. - Lock port (
#554): BaselockPort()readsCHECK_LOCK_PORT, defaults to 41737, and validates 1024 toMAX_LOCK_PORT. PASS, already on main. - Handoff and PR validation statement (
#554): Changes to AGENTS.md and the PR template. This is documentation, a non-coding requirement, so no coding requirement applies.
The overall verdict is INCONCLUSIVE only because of item 3.
Resolution
Provide evidence that the Node major-version comparison (warning) from
#1788exists at the merge base b319e13 or at head 72ca2b0. Evidence means the file path and the relevant lines, or confirmation that#1788is an ancestor of the merge base. If the warning is absent, the item needs a coding change, and this assessment must be reassessed. - Two runs in one checkout (
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 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.
Comment @coderabbitai help to get the list of available commands.
…m its run (#554) Merge-pass findings on #2353: - A run killed right after linking <marker>.reclaim left a claim every later run refused until it was deleted by hand. On Linux the takeover of a dead claim now runs under an abstract socket named after the marker, which the kernel lets go of however its holder ends, so a killed takeover leaves nothing behind. Elsewhere the .reclaim file stays, and the next run clears a dead one: a dead run's file is renamed aside and dropped only when it is still the exact claim read (each claim carries a nonce). - A claim was its pid alone, so a stale marker whose pid now belongs to another process kept the checkout. Claims now record when their process started (Linux: boot id and /proc/<pid>/stat start ticks; macOS: ps lstart), and a pid running under another start is dead. Older markers keep the pid check. - The CLI refusal test asserts files and the exit code instead of prose.
|
Merge-pass review at ef5d7f4: fixed in 72ca2b0 (one commit). MEDIUM 1: a run killed right after linking
MEDIUM 2: ownership was PID liveness only.
A pid now running under another start is dead, and no
Found by the re-reviews of this fix, and fixed in the same commit:
LOW: the CLI test pinned prose. It now asserts the holder's pid and checkout (values, not Known, not changed (LOW):
Checks:
The workflow change still waits for the owner's go. |
… the clock (#554) The test that takes over a claim whose run exited but is not reaped yet now hears the zombie from a perl parent's SIGCHLD handler, which the kernel sends as the child becomes a zombie, instead of re-reading /proc against a deadline.
|
Merging 3da392f (closes #554, on the owner's go for the ci.yml change). |
## Release 0.4.21 The release PR, prepared by step 1 of [docs/development.md#releasing](https://github.com/devswha/ovis/blob/main/docs/development.md#releasing), now re-folded on main `1ef6ea329108a0985b823e8235b03daddcd0a5f4` after the owner held 0.4.21 for more work. The merge pass reported the 0.4.21 queue empty. **Do not merge yet:** the owner judges the final build before release. No tag and no Release run from this PR's author. - **Version:** `version` is 0.4.21 in `package.json` and `herdr-plugin.toml`. - **Changelog:** `bun scripts/changelog-fold.ts 0.4.21 2026-10-30` folded 63 fragments into the 2026-10-30 section of `CHANGELOG.md` (71 entries), linked their PRs and deleted the fragments; `changelog.d` holds only `README.md`. - `by @login` on every outside contributor's PR link: #2361 @eddieparc, #2333 @IdrisGit, #2355 @imurfutur3, #2341 @sulthonzh, #2359 @YuuuXie, #2377 @IdrisGit, #2269 @CharleoYang, #2405 @jpcarranza94, #2414 @homebodify, #2417 @cheol-95, #2418 @eddieparc, #2435 @cheol-95. - Two outside PRs had no fragment and got an entry by hand: #2341 (OpenCode background commands, Added) and #2359 (installer test timing, Maintenance). - Issue reporters are credited in their entries: @blaker3115-Agri (#1488), @Hyd3-14 (#2026), @osamahbeig (#2343), @Shunamxiao (#2329), @matiemer (#2362), @kilhyeonjun (#2344), @eddieparc (#2360), @Ploppy3 (#2236), @sulthonzh (#2340), @WOULDU-pres (#2056), @odfalik (#2038), @aNNdii (#511), @Noobear (#2281, fixed by #2424); #2435 fixes @cheol-95's own #2434. - Two fragments ran past the changelog's width (#2418, #2269); their entries are re-wrapped, words unchanged. #2382's entry reads "OpenCode's installer puts its folder first" (reviewed earlier on this PR). - Maintainer PRs without a fragment and without a user-facing change have no entry: #2353 (check tool), #2371 (guide docs), #2396 and #2397 (tests), #2403 and #2433 (server and client transport seams, no behaviour change), #2437 (test-only fix for #2435's check). #2438's own entry (the sidebar selection marked by its fill again) is dropped: the stroke #2352 added never shipped, so users see no change; #2352's entry keeps only the Windows high-contrast Highlight bar. - **Release summaries:** en, ko, ja and zh each have 5 new, 5 improved and 5 fixed lines. Since the first review: New lists the in-browser Claude Code / Codex sign-in (#2428) in place of the tab/workspace shortcut line; Improved lists Settings → Agents (#2427) in place of the sidebar fold line; Fixed lists the Codex wrong-session fix (#2426, #2430) in place of the phone screenshot paste line. The Artifacts and Claude status-line lines keep their reviewed wording (turned on in Settings). Not in 0.4.21: #2420 (Codex chat behind Kiro), #2065 (Portal sign-in) and #2436 (relay foundations) stay open for a later release. - **Remote bundle:** `REMOTE_BUNDLE_VERSION` rises from 39 to 40 because the bundle inputs (`server/`, `shared/`, `patches/`) changed since remote-v39. After merge: push `remote-v40` on the merged commit and wait for the Remote PC bundles workflow before running Release. - **iOS:** `CURRENT_PROJECT_VERSION` stays 3 (#2370 changed `Info.plist`; build 3 is not known to be uploaded yet). ## Validation - `bun scripts/release-guards.ts --base v0.4.20`: "Release 0.4.21: remote bundle, telemetry Worker and release metadata are in order." - `dori heavy … bun run check fast` on this branch: workflow syntax, generated types and themes, typecheck, build, unit tests all ok. Unit: 9166 pass, 0 fail, 36 skip in 591 files. - Every PR in `v0.4.20..main` was pre-run for the owner's hands-on guide on isolated copies (own herdr session, fresh state, never the owner's live session). Items that need a real device (iPhone tap dictation #2370, dictation keyboards #2386, the installed desktop app's title-bar overlay #2381) are left for the owner's final check. This is a release-metadata PR: it changes no code path. Per the release steps, merge it after CI and the owner's go, then push `remote-v40`, wait for its bundles, and run Release with `0.4.21`.
Change
Closes #554 (
bun run check: what a local run still does not cover). Status of each item on mainbefore this PR, and what this PR does:
in the same checkout, but
check fasttook no checkout claim, although its unit tests rewriteshared/herdr-api.generated.tsand it builds intodist/. Fixed here: every mode claims thecheckout marker (
node_modules/.cache/check/checkout.lock.check-lock), so two fast runs, or fastbeside a lane or
check run, refuse each other in one checkout. A fast run still takes no slot,and it no longer takes the PC-wide admission port at all (its markers are claimed atomically), so
it is never refused as busy because another checkout's run is being admitted. The fast job's
CHECK_WAIT_SECONDSin ci.yml, kept only for that port, is dropped.check runtakes no lock: already fixed on main (needsLock()coversrun).CHECK_LOCK_PORT).PR's Validation names which checks ran (
fast,full, or which single commands and files) andwhich were skipped. No pre-push hook, as the issue says.
A
bun run buildor a single test started by hand beside a check is still not stopped; the docssay so. No changelog fragment: developer tooling, not the app (as in #1788). No server or
remote-bundle change.
Workflow change: this PR touches
.github/workflows/ci.yml(the Fast checks job dropsCHECK_WAIT_SECONDS: 120and its comment, which only covered the admission port fast no longertakes). Per the policy for workflow PRs, it waits for the owner's go before merging.
Validation
scripts/check.test.ts, each failing on main and passing here:slots > claims the checkout for a run that takes no slot, so fast and a herdr-backed run refuse each otherslots > admits a run that takes no slot while another run holds the admission portcheck CLI > refuses a fast run in a checkout another check run holds, before any stepbun run check fastin this worktree, and a second one started while the first wasin its build: the second exited 1 in 43 ms with
another \bun run check` is running in thischeckout ... (port 41745: pid 220919 in )`; the first passed.
bun test scripts/check.test.ts: 70 pass, 0 fail.bun test scripts/conventions.test.ts: 19 pass.bun run typecheck: passes. actionlint on ci.yml: passes.bun run check fast: passes on both commits (unit 8569 pass, 0 fail, 34 skip), and again on themerge with current main (0.4.20, xterm 6.0.0): unit 8626 pass, 0 fail, 35 skip in 552 files.
fulland theintegration/browser lanes were not run locally (no app or herdr-backed code changed).
actionable findings (800 scripted cross-process races of fast/fast, fast/lane, retry and ticket
paths: zero double admissions).
The merge pass's claim-protocol findings (a killed takeover left a stuck claim; ownership was the
pid alone) are fixed in 72ca2b0; see the review reply comment for the details and tests.
Known limits (LOW, from the reviews)
Developer tooling, not user-facing; left as they are on purpose:
Windows ownership stays PID-only. Windows has no process start time to record, so a claim left by
a check that crashed, whose PID now belongs to another process, can refuse a run in that checkout.
Recover by deleting
node_modules/.cache/check/checkout.lock.check-lockonce no check runs there.The Linux takeover socket can be squatted on a shared host. It is an abstract unix socket named
after the claim's path, with no permission check, so another local user could bind that name first
and keep runs in that checkout from taking over a dead claim (they fail with "could not claim");
denial of service only, like the slot ports.
A lane run waiting for a slot (
CHECK_WAIT_SECONDS) in a checkout is refused on its next roundwhen a fast run starts in the same checkout meanwhile: the documented "refuse each other", but the
run that came first loses.
check fastnow validatesCHECK_WAIT_SECONDS/CHECK_LOCK_PORTtoo and exits 2 on a bad value.Worktrees sharing one
node_modulesby symlink would share the marker (none do today).