Docs: --wait-for-regex can match a prior-turn redraw - #71
Merged
Conversation
CHG-0073's advice was overstated in two places, found on internal review before merge: - "the pattern cannot already be sitting in the child's visible history" was the wrong framing. `send` scans bytes emitted after the send-time cursor, not the rendered screen, so the correct condition is that the child will not emit the pattern again as a reprint of earlier output before this turn's answer. - Pairing `child_busy` with a unique sentinel as an alternative safeguard was wrong. `child_busy` is `idle_ms < DEFAULT_SETTLE_MS` (800ms) on `read` — it goes false during a silent think that follows a reprint, before the real answer prints. A destination file the child writes is the other real check; `child_busy` is not. Also corrects a duplicate CHG-0073 changelog row and a version number that skipped 36 -> 38 instead of 36 -> 37. CHG-0074, accepted, evidence: exact.
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.
--wait-for-regexcan returnmatched: trueon a reprint of an earlier answer.Echo#repaint?only covers a copy of this send's input. A child that reprints scrollback, then works, then prints a new answer, puts the previous sentinel on the wire as ordinary new bytes.Measured on current main (
ruby -Ilib bin/rune), child reprints then sleeps 3s then printsDONE N:DONE 2was not in the captured output.Two candidate rules were considered and not shipped:
echo DONEto a simple childUnique-per-turn sentinels wait through the reprint. That is the documented answer. A PendingSend example locks the workaround in so a later "fix" cannot lose it.
English
docs/sessions.mdno longer calls the flag deterministic. The nine translations are not updated here — English is authoritative; the in-language follow-up is a separate job.ROADMAP.mdis brought up to date: renderer row closed, half-painted--screenmoved off the 1.0 blocker list.CHG-0073 accepted. 611 examples, 0 failures. Lint clean.
Test plan
specsync change verify(611 / 0, lint, smoke)