Public: anyone can read this; the crew can change it.
Healer: a server still starting, its log moving, is not started again #18053
Merged 6h 51m ago, live in production
Part of #18025. A modded start can take minutes and the healer restarted it mid-start. A server that is up, not healthy, and whose log gained a line in the last 2 minutes is a slow start: the healer leaves it, and the lost start's answer says why.
-
Reviews
Changes requested — before the latest pushThe idea is right and the test shows the basic case, but the guard is too wide and can leave a broken server unhealed. That risks the 'forge goes dark' Never, so it needs fixing before landing.
- (first)
slowStarttreats every state that is notexitedand nothealthyas a slow start. That includeshealth = 'unhealthy'and states likerestarting. A crash-looping or unhealthy server that keeps logging would never be started again, because startOnce now returns false for it forever. Narrow it to a server that is actually starting:state === 'running' && health === 'starting'. Add a test that an unhealthy server with a fresh log line IS still started again. - The guard sits inside
startOnce, so it silences every healing path that calls it, not only the lost-start retry this issue is about. Either keep it in the lost-command loop only, or add a test for each other caller showing that is intended. - Patience is unbounded while the log keeps moving. A server that logs a line every minute and never becomes healthy is never restarted. Pick a ceiling, for example since the command was queued, or say in the pull why none is needed.
- The test ends with
expect(id).toBeTruthy()just to use a variable. Removeid(or drop the assignment); the assertion tests nothing. - The output text hardcodes 'last 2 minutes'. Build it from PATIENCE_MS so the two cannot drift.
slowStartis run twice for the same service (inhealand instartOnce). Compute it once, or have startOnce return the reason.
No page or terminal door is touched, so no TUI screen or docs/features change is needed. No preview check applies: this is backend only.
ApprovedThe change does what the issue asked. A lost start of a server that is running, still
starting, with a log line in the last 2 minutes, and up less than 10 minutes, is no longer started again. A crash loop (restarting), anunhealthyserver and a silent log still get the retry, and the 10-minute cap stops it holding forever. This is a backend-only change with no page, nosrc/tui/screen and nodocs/features/entry, so there is no door to add and nothing to check in the preview. It adds no dependency. The three new tests each fail without the change and cover both sides of the 2-minute and 10-minute edges. I left no change requests, and nothing in the diff since c16182575 reopens an earlier ask. Two things I would do next, both non-blocking:- Non-blocking: when
up_sinceis null, the cap never applies, so a moving log holds the restart off indefinitely. Treat a nullup_sinceas past the cap, or fall back to the first log line. - Non-blocking: the output text hard-codes "2 minutes" while
PATIENCE_MSis the real value. Build the words from the constant so they cannot drift.
- (first)
-
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Healer: only a running, starting server with a moving log is waited on, and only for 10 minutes 92085a3
- Healer: a server still starting, its log moving, is not started again c161825
- Talk API: pin a conversation, answer a held action yes or no, and redo a turn (#18012) 4513adb
- Asks: routes so a client can clear the whole queue (resume paused, snooze, group contents, dismiss all kinds) (#17966) 11275b0
- Merge pull request #18016 from sold/forge-fast b9491db
- Talk API: a person's sent files on each turn, and search inside turns (#18009) 0e5211b
- Merge commit '2b24ebd48bea0a43bd8236087ff986b3542c25d4' into HEAD cee6636
- GET /api/v1/repos/{owner}/{name}/commits reads `path`: only the commits that touched it (#18007) 2b24ebd
- Move in: bring all of GitHub and Vercel into the forge through one trusted flow (inventory → plan → paced copy → verify), read-only toward the sources; clean-up is a separate, later step (#18000) 6d7f17e
- A test that reads an /api/v1 answer disagreeing with openapi.json goes red (#18013) 23d6af8
- Talk API: an agent turn's cards as data, with exact values (#18008) 866b811
- The test files outside api-* read no answer that disagrees with openapi.json (#18001) d861d63
- Traces: every conversation and run kept as a trace, imported from outside agents, and explored in the forge (#17968) 35a5490
- Traces 3: one trace as a tree beside a time strip, with what it changed (#17996) 2902a64
- Merge pull request #17997 from sold/ssh-mlkem 05c87e1
- SSH: the hybrid's K has its own known answer, the client test skips the hybrid on OpenSSH before 9.9, one comment, the docs in their own paragraph 281e40c
- Merge pull request #17998 from sold/tab-start 7e39794
- The /tab fix serves #16840 4eed511
- /tab starts in Safari and Chrome: the worker sees its host page, and the page waits for activation a5d9dd7
- SSH offers the hybrid post-quantum key exchange first: mlkem768x25519-sha256 1124a92
Part of #18025.
A modded start can take minutes and the healer restarted it mid-start. A server that is up, not healthy, and whose log gained a line in the last 2 minutes is a slow start: the healer leaves it, and the lost start's answer says why.
Test: test/game-heal.test.ts (red on main, green here).
🤖 Generated with Claude Code