Repository navigation
to-human 0.5.1: the start-up read no longer holds a draw past its budget - #317
Merged
Merged
Conversation
….5.1) On 2026-10-20 the autoreload's /reload-plugins started to-human over in every open session, and in the three longest (207 to 437 MB transcripts) the engine unloaded it: "to-human was unloaded: it crashed the hooks worker". Every draw waited on the module's start-up read, a grep of the whole transcript that took 6 to 10 s, ignoring its own signal; draws ran past the engine's fixed 10 s budget, and two in a row that ran on 5 s past it count as a runaway, which ends the hooks worker (every plugin's in-flight hooks with it) and unloads the plugin. A /reload-plugins in the 437 MB session did it again an hour later. - The read runs under the session.start each load of the module raises, where no redraw of a row cuts it short; a row asked about before that still begins one under its own dispatch, as before. - A draw waits on the read only while its own dispatch stands, and at most START_WAIT_MS (3 s) from the first draw that waited; past that the rows draw with what is known and are asked for again once the read lands. The mark is taken as soon as the conversation answers, ahead of the search. - The draws that waited go on each from a clock answer of its own, not in one turn of the hooks worker that would keep it from its heartbeat. - The transcript is searched by rg where the machine has it, else grep: 437 MB in 0.74 s against 10.3 s, the same 36,967 ids. live-reload-check.py resumes a copy of a long transcript the caller names and types /reload-plugins, passing when neither leaves a to-human hook skipped; it spends no model calls. Sminos-Session: doperpowers-c6#a588844a (doperpowers on macbook)
… alone The review's finding: a reload keeps a module whose files did not change, so the check's /reload-plugins started nothing over. It now changes the module first, as an update does, and passes only when the engine raises session.start for to-human "loaded later". The screen is no longer read: a resumed history draws the notices its own session was shown. On a copy of the 437 MB session (load average near 500): 0.5.0 failed 94 to-human hooks at the resume alone; 0.5.1 failed none at the resume or at the reload, whose search took 13.6 s against a 3 s wait. TECH-DEBT: the search past the wait and the rows' linear run lookup. Sminos-Session: doperpowers-c6#a588844a (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On 2026-10-20 the autoreload's
/reload-pluginsrestarted to-human in every open session. In the three longest sessions (transcripts of 207 to 437 MB) the engine then unloaded it with "to-human was unloaded: it crashed the hooks worker". A manual/reload-pluginsin the 437 MB session did it again an hour later.Cause. Every draw waited on the module's start-up read, a grep of the whole transcript that took 6 to 10 s, and the waiting draws ignored their own abort signal. The engine's budget for a draw is a fixed 10 s, and it cannot be configured. Two draws in a row that run 5 s past that budget count as a runaway. The engine then ends the hooks worker, which every plugin shares, so the other plugins' in-flight
tool.callhooks fell back to their.catchand two subagent outputs were withheld. It also unloads the plugin.Fix (to-human 0.5.1).
session.startthat each load of the module raises, so a redraw of a row no longer cuts it short. A row asked about before that still begins a read under its own dispatch, as before.$.clock.now()answer instead of in a single microtask burst.Verification.
to-human/tests/mods/run.sh: 98 kit tests, plus 8 search executions under rg and grep. Three tests are new and pin the bounded wait, the session-owned read, and a cut-short row answering at once.tests/mods/typecheck.sh.to-human/tests/mods/live-reload-check.py, no model calls) on a copy of the 437 MB session, at a load average near 500: 0.5.0 had 94 to-human hook failures at the resume alone. 0.5.1 had none, either at the resume or at a reload that restarted the module, even though its search took 13.6 s against the 3 s wait.Review. reviewer-medium found one issue: the live check's reload did not restart an unchanged module. That is fixed in the second commit. It found no defect in the wait/read state machine or in the search's shell.
Residue is logged in TECH-DEBT.
Sminos-Session: doperpowers-c6#a588844a (doperpowers on macbook)