Skip to content

feat(server): log how long PR watches stay quiet before they end - #16262

Merged
t3dotgg merged 3 commits into
mainfrom
t3code/bound-server-wakes
Oct 6, 2026
Merged

t3dotgg merged 3 commits into
mainfrom
t3code/bound-server-wakes

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

We want to know whether PR watches should end after a quiet period, and we have no data on it. Since #16204 a watched thread stays in Working until its watch ends. Since #16208 a rate limit never ends a watch. A watch on a quiet PR can therefore last until it merges. But nothing records how long watches live or how long they go without a push. The trace file rotates in about 30 minutes on a busy desktop, and the event table is empty on real installs.

A read-only audit of 11 fleet machines (Oct 1 to 5) could answer the other wake questions from saved messages, but not this one.

Now the server writes one local Info log line, pull request watch ended, for each ended watch. Nothing is sent to analytics.

Field Meaning
threadId, pullRequest which thread watched which PR
reason merged, closed, unreadable, comment-limit, settled, subagent, or stopped (ended outside the reactor: unwatch, Stop, settle, archive, delete)
minutes how long the watch lived
quietMinutes time since the last push the reactor saw, or since the start
longestQuietMinutes longest gap between pushes, including the final one
wakes, reads wakes sent, and successful host reads for its PR
partial the watch started before this server process, so the numbers cover only part of it

On boot-service installs, such as the fleet servers, the line goes to ~/.t3/userdata/logs/boot-service.log, which keeps days of history. Desktop installs keep it in the trace file only.

Tracking is in memory, so a restart sets it back. A watch that ends while the server is down, or that starts and ends between two passes, is not logged. Wake and end behavior does not change.

Proof: a new runtime test runs a watch through a push 6 hours in, 2 quiet hours, and an unwatch. It captures exactly one log line: stopped, 480 minutes, 120 quiet, 360 longest, 3 reads, with the thread and PR. The other 12 watch tests pass, and the server typecheck is clean.

Reviewed with sol-loop: 3 rounds with GPT-6.1 Sol on high. Declined nits: a host answer with no head SHA counts as a push, which is the same as the watch's own headMoved rule; and a separate test for each fixed path.

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants