Repository navigation
test(pty-tape): settle the prompt queue before Ctrl-T - #187
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
0thernet
enabled auto-merge (squash)
October 10, 2026 22:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0thernet
force-pushed
the
fix/pty-tape-settle
branch
from
October 10, 2026 23:01
30ed262 to
837e274
Compare
This was referenced Oct 11, 2026
Merged
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.
Fixes the CI flake in
real PTY: TAPE gestures echo range commands at 80x24(expected "verse"; PR #185, Check run 38088154653). Also fixes a dawg race that turned up while proving it.1. Test: waited on signals that arrive before the queue drains
The test typed seven lines (
bars 8, twoadds, twosections,track drums,track bass), then waited for:· bass: true from launch, because bass is the default track.The CI frame shows exactly this:
rev 3, headerbass, no section row. Ctrl-T opened TAPE beforesection verseran. #173'ssettle()was never used here. The fix:t.settle()before Ctrl-T (all input acted on, nothing running), then the old checks become plain assertions, and Ctrl-T usest.type(). The TAPE tiles test had the same shape and gets the same fix.I audited the other PTY tests that send several lines then wait. Each waits on the last line's effect, which is sound with the FIFO queue from #173.
2. dawg: TAPE keys typed ahead reduced from stale state
A TAPE key reduces from the landed score and playhead, but its commands go into the prompt queue. With commands still queued (an agent turn, a slow write, a loaded box),
[ [ [computed every shrink from the same loop. One press was lost, and the loop ended at 2 bars instead of 1. Typing ahead in a real session does the same. Now, while the queue is busy, a command-typing TAPE key waits its turn as a deferred step (PromptQueueitems may be() => string[]). It reduces from what the lines before it left, and its commands run next. When the queue is idle, keys reduce immediately as before.Proof
Expected to contain: "verse"). Test fix only: those pass, but TAPE tiles fails (one-bar loop, the[race). Final head: 6/6 pty-tape tests pass.bun run checkon the final head: 4027 pass, 0 fail.No assertions were weakened and no retries were added.
🤖 Generated with Claude Code