Skip to content

fix(tasks): stop rechecking old Claude subagent files on every poll - #2527

Merged
devswha merged 1 commit into
mainfrom
perf/claude-subagent-sync-checks
Nov 1, 2026
Merged

devswha merged 1 commit into
mainfrom
perf/claude-subagent-sync-checks

Conversation

@devswha

@devswha devswha commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Fixes #2510

Change

ClaudeSubagentStatus.poll() runs claudeSubagentState() on the server's main thread every 2 s per Claude pane (and on busy/refresh signals). That call lstat()ed every listed subagent transcript (up to 5000 names) before filtering to the last day and MAX_AGENTS, so a long-lived session with thousands of old subagent files paid thousands of synchronous stats on every poll, matching the trace in the issue. #2511 already moved the HTTP task-list scan to file workers; this addresses the status poll.

  • Agent files last written more than a day ago (RECENT_MS) are remembered per subagents folder and checked again only every 60 s (STALE_RECHECK_MS). A missing or non-plain file is never remembered, so a transcript that appears after its meta file is picked up at once.
  • subagentsSignature carries which check of the old agents a read relied on (none / no old agents / the check's time / due). A recheck by another pane on the same session, an evicted cache entry, or a due recheck changes the signature, so a certified poll reads again: an old agent resumed while the parent transcript stays quiet is counted within a minute.
  • Safety: an old agent resumed inside its 60 s window can be uncounted for up to that minute. That only fails toward "working": restsOn needs running > 0, and holdsQueue does not use the counts, so stale state never makes a busy pane eligible for queued input.

Reproduction

Synthetic isolated session (mkdtemp, 2,500 subagent files aged 3 days), spyOn(fs, "lstatSync") around claudeSubagentState on origin/main 94b34b4: 2,500 old-file lstats on every call (16–36 ms). With this change: 2,500 on the first call, then 0 (≈2.6 ms) until the minute is up.

Tests

Three tests in server/claude-subagents.test.ts (#2510 describe): no lstat of old files within the minute while a resumed or late-appearing agent is still handled; a resumed old agent counted by the tracker once its minute is up with a quiet parent transcript; and the same on two panes of one session. All three fail on origin/main; swapping the generation token back to a due boolean fails the two-pane test; dropping it from the signature fails the tracker tests.

Validation

  • bun run check fast at 832e64a: workflow syntax, generated files, typecheck, build, 10,370 unit tests pass (41 skipped).
  • Skipped: check full, browser and Windows runs (server-only change; CI runs them).

Reviews

  • Codex (gpt-6.1-terra, xhigh): one P2, a due boolean in the signature let a second pane on the session or an evicted entry stay certified. Fixed with the generation token and covered by the two-pane test.
  • omo code reviewer: approve, no blockers. Minor notes declined: the up-to-a-minute undercount above (fails safe), and two trackers with different injected clocks sharing the per-folder cache (test-only; costs rescans, never a wrong answer).

Follow-up not in this PR: agentIds caps the listing at 5000 names before filtering to meta files.

Each Claude pane's status poll lstat()ed every listed subagent transcript
before filtering to the last day and MAX_AGENTS, on the server's main
thread. Long-lived sessions keep thousands of them (#2510).

Agent files last written over a day ago are now remembered per folder and
checked again once a minute. The poll signature carries which check of
them a read relied on, so a recheck by another pane of the session, an
evicted entry or a due recheck invalidates a certified poll: a resumed old
agent is counted within a minute even while the parent transcript is quiet.

Fixes #2510
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ec53a43 and 832e64a.

Files selected for processing: 3
  • changelog.d/claude-old-subagents-stat.md
  • server/claude-subagents.test.ts
  • server/claude-subagents.ts

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

Summary

Summary by CodeRabbit

  • Improvements
    • In Claude Code sessions with many subagent transcripts, files last updated more than a day ago are rechecked once per minute instead of on every status poll.
    • Newly written or resumed agents are reflected in pane counts after the next recheck, including across panes sharing the same session.

Subagent tracking now rechecks transcripts older than a day at most once per minute per folder. It includes stale-check state in its signature, clears the stale cache when subagent state is forgotten, and adds tests for resumed agents and shared-pane status counts.

Changes: Stale subagent recheck flow

Layer / File(s) Summary
Stale-file cache and validation
server/claude-subagents.ts, server/claude-subagents.test.ts, changelog.d/claude-old-subagents-stat.md
The scan reuses cached IDs for old files while the 60-second check interval is fresh. When due, it checks files again and updates the stale-ID set. The signature reflects stale-check state, and forgetSubagents clears the cache. Tests cover file checks, resumed-agent counts, and updates across panes sharing a session. The changelog records the periodic recheck.

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

Change: Bug fix

Possibly related PRs

  • devswha/ovis#2072: This PR derives Claude rest and working status from subagent state; delayed stale-agent counts can affect that behavior.
  • devswha/ovis#2511: This PR moves request-driven task-list scans to file workers, while this change reduces checks in periodic polling.

Suggested reviewers: kilhyeonjun

Merge Risk: Minimal · up to 832e6

Resumed old agents may take up to a minute to appear, while queued-input safeguards remain intact.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check Inconclusive [#2510 performance] The diff in server/claude-subagents.ts adds a per-folder staleAgents cache (STALE_RECHECK_MS = 60_000). claudeSubagentState() skips lstat of cached old agent IDs while the cache is… Confirm from server/claude-subagents.ts at head (the definitions of restsOn and holdsQueue, and their callers) that an undercounted running value cannot make a busy pane eligible for queued input. Also confirm that the 60-second undercount …
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preventing repeated checks of old Claude subagent files during task polling.
Description check Passed The description includes the required Change and Validation sections. It explains the problem, resulting behavior, safety trade-off, reproduction, tests, validation results, and skipped checks. It als…
Out of Scope Changes check Passed All changed files relate to #2510. server/claude-subagents.ts changes the scan policy, the subagentsSignature generation token, and forgetSubagents cache clearing. server/claude-subagents.test.ts adds…
Full details: Description check

Explanation

The description includes the required Change and Validation sections. It explains the problem, resulting behavior, safety trade-off, reproduction, tests, validation results, and skipped checks. It also links issue #2510 and identifies the follow-up work.

Full details: Out of Scope Changes check

Explanation

All changed files relate to #2510. server/claude-subagents.ts changes the scan policy, the subagentsSignature generation token, and forgetSubagents cache clearing. server/claude-subagents.test.ts adds three tests for the new policy, using the spies and helpers needed for them. The changelog.d entry documents the behavior change. No change in the reviewed diff is unrelated to the issue. The agentIds 5000-name cap is named in the PR as a follow-up and is not changed here.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. 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 2 functions across 2 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Linked Issues check

Explanation

[#2510 performance] The diff in server/claude-subagents.ts adds a per-folder staleAgents cache (STALE_RECHECK_MS = 60_000). claudeSubagentState() skips lstat of cached old agent IDs while the cache is fresh. Files older than RECENT_MS are not stat-ed again for up to one minute. This reduces the measured repeated checks that #2510 reports. The first call per folder still stats every listed file on the main thread. The issue asks for the scanning to be kept off the main event loop. The PR reduces the work but does not move it to a worker. The issue allows change-driven invalidation with reconciliation as a direction, so this is an accepted approach. Three tests in server/claude-subagents.test.ts cover: no lstat of old files within the minute; a resumed old agent counted after the minute; and the same on two panes of one session. [#2510 safety] The issue requires that stale or unknown background state must not make a busy pane eligible for queued input. The PR states that an old agent resumed inside its 60-second window can be uncounted. It also states that restsOn requires running > 0 and that holdsQueue does not use the counts. I did not read the restsOn or holdsQueue code at the reviewed head, so this claim is unverified in this assessment. The queued-input safety requirement therefore cannot be confirmed from the evidence read.

Resolution

Confirm from server/claude-subagents.ts at head (the definitions of restsOn and holdsQueue, and their callers) that an undercounted running value cannot make a busy pane eligible for queued input. Also confirm that the 60-second undercount does not reach any queued-input decision. Optionally confirm whether the main-thread first-call scan is accepted as a remaining cost, or whether the scan must move off the main event loop as the issue requests.

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.

Share

@devswha

devswha commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Browser regression (other scripts) has failed twice on this PR, both times on scripts unrelated to the change, which only touches Claude subagent stat caching in server/claude-subagents.ts:

  • Attempt 1: health-flap-demo-regression, terminal-switch-resize-regression, omo-question-wheel-regression (plus 4 flaky retries).
  • Attempt 2: a different script, key-bar-hold-repeat-regression (plus 3 different flaky retries). None of the attempt-1 failures recurred.

All four pass locally on 832e64a through scripts/ci-browser-parallel.ts (3/3 and 1/1). main failed this job at 04:46Z on application-paging-regression under the same runner load (8/8 self-hosted runners busy). I re-ran the failed jobs again.

@devswha

devswha commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Merging 832e64a into 0.4.22 (fixes #2510, lane bug-2510): a Claude Code pane whose session keeps thousands of old subagent transcripts no longer stats every one of them on each status poll; files last written over a day ago are rechecked once a minute, and the poll signature marks that set due when the minute is up, so a resumed old subagent shows within a minute.

Measured by the merge pass, a clean main-vs-PR pair: claudeSubagentState on synthetic mkdtemp sessions, main ec53a43 vs this head, 7 alternating rounds each, one at a time on this PC (median, range):

case main PR
2500 old subagents, p50 per poll 12.6 ms (11.2-15.6) 3.8 ms (3.2-6.9)
2500 old subagents, p90 per poll 15.6 ms (12.5-23.3) 4.9 ms (4.4-24.3)
2500 old subagents, first call 15.7 ms (14.7-18.6) 16.3 ms (15.4-18.9)
200 fresh subagents, p50 4.35 ms (3.8-4.6) 4.59 ms (3.7-5.3)
200 fresh subagents, p90 6.36 ms (4.8-7.6) 6.38 ms (4.7-8.5)
200 fresh subagents, first call 18.2 ms (14.9-44.5) 17.5 ms (15.0-57.4)

Clearly better where #2510 lives; the other cases run unchanged paths and differ within run-to-run noise (ranges overlap fully), no regression. The lane's failing-first tests fail on main; check fast green; Claude reviewer approved and Terra's P2 fixed.

LOW: an old subagent that is written to again shows up within a minute rather than on the next poll.

@devswha
devswha merged commit fa5bc05 into main Nov 1, 2026
44 of 50 checks passed
@devswha
devswha deleted the perf/claude-subagent-sync-checks branch November 1, 2026 07:58
@devswha devswha mentioned this pull request Nov 1, 2026
devswha added a commit that referenced this pull request Nov 2, 2026
## Release 0.4.22

The release PR, prepared by step 1 of
[docs/development.md#releasing](https://github.com/devswha/ovis/blob/main/docs/development.md#releasing)
on main `41492320` (#2453 the last merge), refreshed to main `99a6671f`
(#2582 the last merge).

**Do not merge yet:** the owner tests main and judges the final build
before release. No tag and no Release run from this PR's author.

- **Version:** `version` is 0.4.22 in `package.json` and
`herdr-plugin.toml`.
- **Changelog:** `bun scripts/changelog-fold.ts 0.4.22` (2026-10-31,
local) folded 20 fragments into the 2026-10-31 section of `CHANGELOG.md`
(23 entries with the hand entry), linked their PRs and deleted the
fragments; `changelog.d` holds only `README.md`.
- `by @login` on every outside contributor's PR link: #2453 @jokkopucko,
#2452 @jokkopucko, #2442 @nahwan-kim, #2463 @zerodice0, #2468
@Yoonwoo-Ha, #2065 @rabbitson87 (both entries), #2466 @jpcarranza94,
#2467 @jpcarranza94, #2457 @YuuuXie, #2420 @cheol-95 (both entries),
#2459 @Haeminway1, #2450 @briantcl1992, #2448 @briantcl1992.
- One outside PR had no fragment and got an entry by hand: #2448
(installer test no longer finds the host's Node, Maintenance).
- Issue reporters: #2442's entry credits @Ploppy3, who asked for
herdr-core support in #2439. The other fixed issues were filed by the
PR's own author (#2460 @zerodice0, #2464 @jpcarranza94, #2419 @cheol-95,
#2089 @rabbitson87) or the maintainer (#2444), so the PR credit covers
them.
- Two fragments ran past the changelog's width (#2443, #2446); their
entries are re-wrapped, words unchanged.
- Folded after the PR opened (merge of main `653613cb`, by hand per the
release steps): #2474 (Pi Chat message with leading/trailing spaces, a
tab or a trailing `@mention` no longer stuck "waiting for transcript",
Fixed), credited `reported by @BeerBelly69` (he reported issue #2454;
the PR is the maintainer's, so the earlier `by @BeerBelly69` was
corrected in `90536524`). Its fragment is deleted; `changelog.d` holds
only `README.md`. The release summaries are unchanged: their fixed list
is already at five lines.
- Folded in a second refresh (merge of main `98c1f5e0`, by hand): #2475
(a reconnecting or reloading browser gets back its follow-up's lost
"sent" receipt, Fixed), credited `reported by @christso`, who filed
#2421 and proposed the approach. Its fragment is deleted; `changelog.d`
holds only `README.md`. The release summaries are unchanged (fixed list
already at five lines).
- Folded in a third refresh (merge of main `af20e0a4`, by hand): #2490
(Chat keeps its messages mounted when the pane's skill names load, so a
decoded image no longer drops back to its loading slot, Fixed), credited
`by @nocstah` (outside PR, no linked issue); #2483 (a Copilot turn stays
whole when its pictures pass the page window, Fixed); #2479 (Chat shows
the pictures in a Copilot CLI session, Added); #2482 (Chat shows the
picture attached to a Hermes prompt, Added). #2483, #2479 and #2482 are
maintainer PRs; #2483's issue #2478 is the maintainer's, so no reporter
credit. #2480 (site only) had no fragment. Their fragments are deleted;
`changelog.d` holds only `README.md`. The release summaries are
unchanged: the fixed list is already at five lines, and the two new
picture features stay in the changelog only (the new list has room for
them if the owner wants them there).
- Folded in a fourth refresh (merge of main `4ca7d24d`, by hand): #2481
(Grok pictures in Chat), #2477 (svg figures, `reported by @affeek`, who
filed #2441 and co-authored the PR), #2498 (dollar math, `reported by
@kjohnsen`, #2407), #2484 (Expand thinking / Collapse work defaults,
`reported by @altgans and @Ploppy3`, #2346 and #2228) under Added; #2494
(`by @todor-a`), #2491 (`by @nocstah`), #2487, #2486, #2472 (`reported
by @matiemer`, #2462) and #2476 (relay session uses the server's port)
under Fixed. 10 fragments deleted; `changelog.d` holds only `README.md`.
Every entry's credit was re-checked with GraphQL (PR author, closing
issues' authors, commit authors): #2487's #2374, #2486's #2485 and
#2483's #2478 are the maintainer's, so no reporter credit.
- Folded in a fifth refresh (merge of main `f5370d54`, by hand): #2503
(Claude question card steps and Back, `reported and co-authored by
@jpcarranza94`, who filed #2465 and co-authored the fix), #2502 (tab
name from its first message, `reported by @vibewriter-hand`, #2019) and
#2505 (a note on a diff line goes into the next message; #1603 is the
maintainer's, so no credit) under Added; #2506 (OmO, Codex and Hermes
question cards move between questions without answering; it closes no
issue, so no credit) under Fixed. 4 fragments deleted; `changelog.d`
holds only `README.md`. #2499's hand-written relay entry is kept. All
four PRs are the maintainer's; credits re-checked with GraphQL (PR
author, closing issues' authors, commit authors).
- Sixth refresh (merge of main `feb3ae09`, head `e3b0dc37`): main had no
fragment left to fold. #2504 (the owner's PR, no fragment) gets a hand
entry under Added next to #2499's: the PC side of the relay, which
answers the relay's server proof, `/api/relay` start/stop routes
restricted to the owner and to direct connections, and a relay QR from
`plugin pair`; off by default with no Settings switch yet. No credit
(maintainer PR). It stays out of the release summaries (off by default,
no UI).
- Seventh refresh (merge of main `a683e3ff`, head `7855c73c`): folded
#2509's two fragments by hand, two entries under Added (the phone side
of the relay: the hosted shell that pairs from the PC's relay QR and
opens the app end-to-end encrypted; files and chat images through the
relay) and one under Fixed (the iOS and Android apps no longer show the
hosted shell's home-screen hint). Each says the relay is off by default.
#2499's entry now says Ovis uses the relay only once a PC's relay link
is started. No credit (maintainer PR). The fragments are deleted;
`changelog.d` holds only `README.md`. The relay stays out of the release
summaries.
- Eighth refresh (merge of main `0b215abf`, head `f76f3ae4`): folded
#2514's three fragments by hand under Fixed (relay connection limits and
the 30 s wait for an absent PC, proof of the PC's relay key, the hosted
shell's copy-on-select and relay-control requests) and added a hand
entry for #2514 under Added: remote access through the Ovis relay can be
turned on in **Settings → Phone & devices** (off by default), with the
iOS and Android apps opening a relay-paired PC from its link;
app.ovis.sh is deployed separately. #2499, #2504 and #2509's entries no
longer say there is no Settings switch: they now say the relay is turned
on in Settings. No credit (maintainer PR). Also folded #2511 (Claude
task-list scan on file workers, Fixed, `by @duytbp`) and #2518 (feedback
typed on Claude Code's plan card keeps Claude planning, Fixed, `by
@jpcarranza94`, who also reported #2517, so no separate reporter
credit). #2515 is docs only, no fold. 5 fragments deleted; `changelog.d`
holds only `README.md`.
- Ninth refresh (merge of main `fbb97b62`, head `44048d5f`, fold in the
merge commit): folded 23 fragments by hand: 7 entries under Added
(#2514's rewritten relay-identity entry, which replaces its old Fixed
entry about the PC's relay key; #2519 Letta model pill `by @homebodify`;
#2522 relay bulk window and the relay overview, self-hosting and
hosted-shell attestation; #2524 DeepSeek Harness in the catalog), 3
under Changed (#2533 Connect a phone dialog and the `tailscale serve`
box; #2539 chat pictures shown whole) and 26 under Fixed: #2508; #2512
`by @lifeofpi-ux`; #2516; #2521, #2526, #2531, #2538, #2541, #2543,
#2545, #2547, #2549 and #2551 `by @jpcarranza94`; #2527 `reported by
@duytbp` (#2510); #2532; #2535 `reported by @devtm1123` (#2513). #2532's
#2523 is the maintainer's; @jpcarranza94's issues (#2525, #2537, #2540,
#2542, #2544, #2546, #2548, #2550) are covered by his PR credit. #2529
(perf) is not merged and stays out of 0.4.22. 23 fragments deleted;
`changelog.d` holds only `README.md`.
- Tenth refresh (merge of main `afdfb1e0`, head `1cfcfab7`, fold in the
merge commit), on the owner's OK for both: folded #2567 (Connect a phone
shows three choice cards and opens on the relay whenever it is offered,
with the relay's switch on its card on a tailnet; maintainer PR, no
credit) under Changed and #2555 (the New workspace folder picker's
compact row; `by @iwangjie`, no linked issue) under Fixed. 2 fragments
deleted; `changelog.d` holds only `README.md`. The IMPROVED summary line
now says the relay needs no Tailscale, in en, ko, ja and zh.
- Eleventh refresh (merge of main `2b620462`, head `13fa0181`, fold in
the merge commit), on the owner's go for each: folded 13 entries from 12
fragments by hand. Changed: #2562 (a chat starts loading when the press
begins, `by @jpcarranza94`), #2574 (Quote a selection into the message
box), #2578 (the relay's switch, reset and failures only in Connect a
phone). Fixed: #2564 and #2560 (two entries) `by @jpcarranza94`; #2554
`by @iwangjie`; #2577; #2576 (the session-bound conversation cache,
fixing the two HIGHs the post-merge Codex Terra review reproduced in
#2562 and #2545); #2572 `reported by @rkqksk` (#2557); #2570 `reported
by @nathanvale` (#2566); #2571 `reported by @altgans` (#2568); #2575
`reported by @matiemer` (#2558). @jpcarranza94's own issues (#2559,
#2561, #2563) are covered by his PR credit. 12 fragments deleted;
`changelog.d` holds only `README.md`. IMPROVED summary: "Select words in
a Chat reply to quote them into your message." replaces the spacing
line, in en, ko, ja and zh.
- Twelfth refresh (merge of main `64ae5e72`, head `3ae2133e`), on Dori's
go: folded #2580 under Fixed (the Cloudflare relay closes both ends of a
pair after a frame send fails, so they reconnect at once; maintainer PR,
no credit) and deleted its fragment. #2579 (guide only) has no fragment.
Summaries unchanged.
- Thirteenth refresh (merge of main `99a6671f`, head `aebaabbf`), on
Dori's go: folded #2582 under Fixed (`by @iwangjie`: the folder picker's
Show hidden waits for a loading folder; the path bar wraps at very
narrow widths) and deleted its fragment. Summaries unchanged.
- Maintainer PRs without a fragment and without a user-facing change
have no entry: #2436 (relay crypto/mux foundations, not wired yet),
#2445 (CI contract test against a pinned hc).
- **Release summaries:** en, ko, ja and zh each have 8 new, 8 improved
and 8 fixed lines (8 is the most a list the app reads may hold, 90
characters a line). New: remote access through the Ovis relay, turned on
in Settings (off by default), with app.ovis.sh shipping separately
(#2514); pictures in Chat for Copilot, Grok and Hermes (#2479, #2481,
#2482); svg figures (#2477); math with dollar signs (#2498); Portal
sign-in with watch-only visitors (#2065); DeepSeek Harness in Settings →
Agents with its conversations in Chat on Linux (#2524, #2453); tab names
from the first message (#2502); notes on diff lines (#2505). Improved:
Expand thinking / Collapse work defaults (#2484), Chat spacing that
follows the font size (#2491), key bar drag reorder (#2463), same-host
links in an in-app popup on phones (#2459), Claude question cards with
steps and Back (#2503), OmO, Codex and Hermes cards with Back and Next
(#2506), one Connect a phone dialog (#2533), pictures shown whole
(#2539). Fixed: panes again on Safari 16.4–17.3 and iOS 16.4+ (#2535),
Stop with a queued follow-up keeps the stopped message (#2547), a first
message reaches Claude Code (#2526), Codex Chat after a finished answer
(#2443), question cards show at once and stay (#2543), Chat no longer
redraws turns or jumps (#2538, #2545), a setting kept across a quick
reload (#2487), Claude's plan card in narrow panes (#2541). Moved to the
changelog only to fit the 8-line lists: Codex behind Kiro (#2420), Pi
messages with spaces (#2474), the Claude question card between questions
(#2466, #2467, now covered by the question-card line), short-phone
overlap (#2494), cross-tab settings (#2486), the Antigravity note
(#2472), plus the subagent poll perf (#2527), relay transport (#2516),
herdr-core no-watch (#2512) and the other Fixed entries above.
- **Remote bundle:** `REMOTE_BUNDLE_VERSION` rises from 40 to 41 because
the bundle inputs (`server/`, `shared/`, `bun.lock`) changed since
remote-v40. After merge: push `remote-v41` on the merged commit and wait
for the Remote PC bundles workflow before running Release.
- **Telemetry:** `telemetry/worker.ts` and `shared/telemetry.ts` are
unchanged since `telemetry/deployed.json`; no Worker deploy.

## Validation

- `bun scripts/release-guards.ts --base v0.4.21`: before the bump it
asked to raise `REMOTE_BUNDLE_VERSION` from 40 to 41 and nothing else;
after it, "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order."
- `UNIT_TEST_WORKERS=4 dori heavy rel0422 -- bun run check fast` on this
branch: workflow syntax, generated types and themes, typecheck, build,
unit tests all ok. Unit: 9827 pass, 0 fail, 41 skip in 623 files.
- After folding #2474 (head `3de63b49`): `bun scripts/release-guards.ts
--base 653613c` "Release 0.4.22: remote bundle, telemetry Worker and
release metadata are in order."; `UNIT_TEST_WORKERS=4 dori heavy
refresh2473 -- bun run check fast` all ok, unit 9827 pass, 0 fail, 41
skip in 623 files.
- After folding #2475 and correcting the #2474 credit (head `90536524`):
`bun scripts/release-guards.ts --base 653613c` "Release 0.4.22: remote
bundle, telemetry Worker and release metadata are in order.";
`UNIT_TEST_WORKERS=4 dori heavy refresh2473b -- bun run check fast` all
ok, unit 9851 pass, 0 fail, 41 skip in 623 files.
- After folding #2490, #2483, #2479 and #2482 (head `0da3756d`;
`e6eb7df6` removed the fragments and `0da3756d` adds their CHANGELOG
entries, which that commit left out): `bun scripts/release-guards.ts
--base 98c1f5e` "Release 0.4.22: remote bundle, telemetry Worker and
release metadata are in order."; `UNIT_TEST_WORKERS=4 dori heavy
refresh2473c -- bun run check fast` all ok, unit 9855 pass, 0 fail, 41
skip in 623 files (with `TMPDIR` off the quota'd `/tmp` tmpfs; an
earlier run with the default `TMPDIR` hit `EDQUOT` there).
- After the fourth refresh (head `af31fa98`): `bun
scripts/release-guards.ts --base v0.4.21` and `--base origin/main` both
"Release 0.4.22: remote bundle, telemetry Worker and release metadata
are in order." main still has `REMOTE_BUNDLE_VERSION` 40 (no commit
since v0.4.21 touches it) and `remote-v41` is not tagged yet, so this
PR's 41 stays the one raise. `UNIT_TEST_WORKERS=4 dori heavy rel2473 --
bun run check fast` all ok, unit 9973 pass, 0 fail, 41 skip in 624
files.
- After the fifth refresh (head `b602a998`, merge of main `f5370d54`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41).
`UNIT_TEST_WORKERS=4 dori heavy rel2473c -- bun run check fast` all ok,
unit 10107 pass, 0 fail, 41 skip in 631 files.
- After the sixth refresh (head `e3b0dc37`, merge of main `feb3ae09`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41).
`UNIT_TEST_WORKERS=4 dori heavy rel2473d -- bun run check fast` all ok,
unit 10123 pass, 0 fail, 41 skip in 632 files.
- After the seventh refresh (head `7855c73c`, merge of main `a683e3ff`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41).
`UNIT_TEST_WORKERS=4 dori heavy rel2473e -- bun run check fast` all ok,
unit 10314 pass, 0 fail, 41 skip in 644 files.
- After the eighth refresh (head `f76f3ae4`, merge of main `0b215abf`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." #2514's and #2511's `server/` changes land
before `remote-v41` is tagged, so `REMOTE_BUNDLE_VERSION` stays 41.
`UNIT_TEST_WORKERS=4 dori heavy rel2473g -- bun run check fast` all ok,
unit 10363 pass, 0 fail, 41 skip in 649 files.
- After the ninth refresh (head `44048d5f`, merge of main `fbb97b62`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41; `remote-v41`
is not tagged yet). `UNIT_TEST_WORKERS=4 dori heavy rel2473 -- bun run
check fast` all ok, unit 10511 pass, 0 fail, 41 skip in 654 files;
`server/release-notes.test.ts` and `src/lib/updateNotes.test.ts` 52
pass.
- After the tenth refresh (head `1cfcfab7`, merge of main `afdfb1e0`):
`bun scripts/release-guards.ts --base v0.4.21` and `--base origin/main`
both "Release 0.4.22: remote bundle, telemetry Worker and release
metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41; both PRs are
client-only). `UNIT_TEST_WORKERS=4 dori heavy rel2473j -- bun run check
fast` all ok, unit 10511 pass, 0 fail, 41 skip in 654 files;
`server/release-notes.test.ts` and `src/lib/updateNotes.test.ts` 52
pass.
- After the eleventh refresh (head `13fa0181`, merge of main
`2b620462`): `bun scripts/release-guards.ts --base v0.4.21` and `--base
origin/main` both "Release 0.4.22: remote bundle, telemetry Worker and
release metadata are in order." (`REMOTE_BUNDLE_VERSION` stays 41;
`remote-v41` is not tagged). `UNIT_TEST_WORKERS=4 dori heavy rel2473k --
bun run check fast` all ok, unit 10551 pass, 0 fail, 41 skip in 656
files; `server/release-notes.test.ts` and `src/lib/updateNotes.test.ts`
52 pass.
- After the twelfth refresh (head `3ae2133e`, merge of main `64ae5e72`):
both release guards "in order" (`--base v0.4.21` and `--base
origin/main`); `UNIT_TEST_WORKERS=4 dori heavy rel2473l -- bun run check
fast` all ok, unit 10553 pass, 0 fail, 41 skip in 656 files;
release-notes tests 52 pass.
- After the thirteenth refresh (head `aebaabbf`, merge of main
`99a6671f`): both release guards "in order" (`--base v0.4.21` and
`--base origin/main`); `UNIT_TEST_WORKERS=4 dori heavy rel2473m -- bun
run check fast` all ok, unit 10553 pass, 0 fail, 41 skip in 656 files;
release-notes tests 52 pass.
- Not run: `bun run check full` (integration and browser), left to CI;
no hands-on test of main, which is the owner's.

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-v41`,
wait for its bundles, and run Release with `0.4.22`.






 [exit 0]
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.

Claude subagent tracking performs thousands of synchronous file checks on long-lived agent sessions

1 participant