Repository navigation
Conversation
There was a problem hiding this comment.
ℹ️ No critical issues — one minor observation about the geometry fix's actual role.
Reviewed changes
- Detector rewritten as a positional rule —
findAntigravityReadyPromptIndexnow asks only where the caret sits: the last content line trims to a bare>, the line above it is a ≥8-glyph─run, gated byantigravity cliappearing anywhere. Model/account/banner text is no longer read. - Transcript replay hardened —
replayableLiveTranscriptcuts each capture atagy's teardown marker so replays stop where the live screen stopped;createTranscriptPaneaccepts asizeread from each fixture's.meta.json. - Fixtures/specs realigned to the captures — hand-written ready screens rebuilt from the real capture, the "prompt before the model line" shape deleted, dependent specs re-titled/repointed.
- Evidence doc rewritten — documents the three clauses, the bare-
>trap, the teardown cut, and the emulator-vs-tail rationale.
The detector logic is sound, the mutation check in the PR body confirms the tests genuinely pin the fixed behavior, and the verdict path (buildTerminalWaitText → isKnownReadyPromptPreview) is correctly over the raw tail. Nice work — the one note below is about a claim, not a bug.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| onForegroundProbe?: () => void | ||
| /** The PTY grid the transcript was recorded on. Replaying a 120-column capture through an | ||
| * 80-column emulator rewraps every cursor-addressed row into a different screen. */ | ||
| size?: { cols: number; rows: number } |
There was a problem hiding this comment.
size/getSize only sizes the headless emulator, but the verdict path (buildTerminalWaitText → isKnownReadyPromptPreview) reads the raw newline-split tail, never the emulator — so this geometry fix changes no verdict. I forced { cols: 80, rows: 24 } for every case and all 23 tests still pass; only replayableLiveTranscript (the teardown cut) is load-bearing. Worth keeping the plumbing for harness fidelity/future emulator assertions, but the test header's "fed to an emulator of the grid it was recorded on" claim should be softened to not imply the grid determines the verdict.
Technical details
# Geometry fix is not load-bearing for the verdict
## Affected sites
- src/main/runtime/agent-transcript-pane-test-harness.ts:21 — `size` feeds `getSize`, which only sizes the headless emulator (`trackHeadlessTerminalData` → `createPtyHeadlessTerminalState`), never the raw tail.
- src/main/runtime/antigravity-readiness-transcripts.test.ts:9 — header comment claims the grid matters "for a replay to mean anything".
- src/main/runtime/antigravity-readiness-transcripts.test.ts:140 — `captureGrid` reads `.meta.json` and hard-fails (rather than skips) if `cols`/`rows` are missing, for a dependency that doesn't affect the verdict.
## Evidence
`waitForTerminal` resolves `tui-idle` from `buildTerminalWaitText(tailBuffer, partialLine, preview)`, a pure predicate over the newline-split, right-trimmed tail. `appendNormalizedToTailBuffer` is width-independent (no grid argument); only the emulator (`readHeadlessVisibleTerminalState`, the visible-read probe) consumes the grid, and the probe fires only when the tail is empty — never for a banner-printing Antigravity pane. Forcing `{ cols: 80, rows: 24 }` leaves all 23 tests green; only `replayableLiveTranscript` changes any verdict.
## Required outcome
- Correct the test header comment (and PR body) so they don't state the emulator grid determines the replay verdict. Either remove the `size`/`captureGrid` plumbing, or keep it for harness fidelity / future emulator assertions and say the grid matters only for the emulator, not the tail-based rule.
## Open questions for the human
- Is the `size` plumbing intended for a future emulator-based assertion, or is it leftover from the manual derivation in evidence-doc §7?3427de8 to
deb49ae
Compare
There was a problem hiding this comment.
ℹ️ No critical issues — one doc-consistency nitpick inline.
Reviewed changes
- Swapped the replay-cut marker to
ESC[?2004l—replayableLiveTranscriptnow cuts on bracketed-paste-off instead ofESC[>4m ESC[=0;1u, whichagyalso emits on raw-mode entry and which was truncatingantigravity-busy-mid-turndown to its failed first launch. - Inverted the cut guard — the per-fixture assertion now checks the replay carries no shutdown bytes and pins the cut length, so it holds for both the old and the fixed recorder instead of failing outright on the newer captures.
- Pinned two busy-pane verdicts — a "refuses a live turn" case replays the mid-turn capture as not-ready, and a synthetic "KNOWN GAP" case documents the one-tick frame-park window that still reads ready.
- Extended the evidence doc — a new §9 records that busy frames park the caret with the same bytes as idle frames and that the spinner is the sole differentiator.
The detector is unchanged from the prior review. I verified the marker claim against the fixture bytes: ESC[?2004l appears once (on exit), while ESC[>4m appears twice in the busy capture (offsets 18 and 1320) — so the old marker really was mis-cutting and the new guard would have caught it.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — one small accuracy nitpick inline.
Reviewed changes
- Rewrote §8 around the marker trap — the evidence doc now names
ESC[?2004las the shutdown marker and documents thatESC[>4m ESC[=0;1uis emitted on raw-mode entry, addressing the prior stale-marker note. - Added a "Still needed" section — lists the two open captures (a successful turn completion, and one ending inside the residual window) and what each would settle.
- Documented the KNOWN GAP decision — §9 and the test comment now explain why the frame-park gap stays pinned rather than closed by an unpinned "last N lines" guess.
The detector and test code are unchanged in this delta; it is documentation and PR-body only.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| the replay cuts them. **Which sequence marks the cut is not obvious, and the first choice was | ||
| wrong.** | ||
|
|
||
| `ESC[>4m ESC[=0;1u` appears exactly once, at the end, in all six of the original captures — which |
There was a problem hiding this comment.
"exactly once, at the end, in all six" is contradicted by antigravity-dialog-trust-workspace.txt — an original capture whose pair sits at offsets 18 (raw-mode entry) and 580 (shutdown), as the test-file comment already notes. What actually holds is that the pair's last occurrence is at the end in all six, which is why lastIndexOf cut correctly for them; "exactly once" should read "at its last occurrence".
…ot what the screen says The detector has been written five times and each version read the ready screen's text: a line starting with the model name, an account row carrying an `@`, the banner as an ordering anchor. The captured transcripts refute all three. Antigravity paints a block-glyph logo down the left margin, so the identity, model and path rows share their physical lines with it and none of them starts a line; `Gemini API key` has no `@` and `AGY_CLI_HIDE_ACCOUNT_INFO=1` deletes the row outright; and the banner is printed once and never reprinted. On real output the shipped rule was inverted — it refused a genuinely ready screen and accepted the live `/model` picker, whose own model rows do start lines. Replaying the captures through the main-process emulator at the grid they were recorded on shows what actually separates the two. The composer is a framed box — a pane-wide rule, then a row holding only the caret — and every dialog is drawn underneath it. On a ready screen nothing follows the caret row; on the picker nine dialog rows do, and on the palette seven. So the rule is positional and reads no product text at all: the last line with content trims to exactly `>`, and the line above it is the composer's rule. A bare `>` alone is not enough, which an earlier reading of the evidence got wrong: `/model` is drawn in place below the composer, so the idle composer's own bare `>` is still on screen while the picker owns it. The rule above the caret is what excludes that. Unknowns fail closed. The four uncaptured dialogs, and accept-edits and plan mode (where the composer carries a mode banner rather than a bare caret), all report not ready — a stalled wait rather than a prompt typed into a live dialog. Also fixes two replay faults that made the fixtures answer the wrong question: the pane now replays at the capture's recorded geometry, since Antigravity positions rows with absolute cursor moves and an 80-column emulator rebuilds a screen nobody saw; and the replay stops at the CLI's own teardown, which every capture contains because the recorder had to stop `agy` to end it. The full bytes still get one case, pinning that a pane whose `agy` has exited is refused. The hand-written five-line ready screen the first five attempts were tuned on is replaced by the real capture's shape, and the fixture asserting a caret above the model row is deleted: no real screen prints one. The emulator route was evaluated first and is documented in the evidence file. It is the right long-term layer but is not on the readiness path today — the only call site wired to it runs solely when the tail is empty — and moving it there changes readiness for every agent.
…o-row composer really do Attempt six shipped with three rules, two open captures and one mutation-dead clause. All three are addressed against a live `agy` — which self-updated to banner 1.2.1 mid-investigation, so the whole rule set is now confirmed across a version bump it did not know about. **The rule clause decided nothing.** Deleting "the line above the caret is a run of dashes" failed no test: every capture ending on a bare `>` also had the composer rule above it. `antigravity-composer-multiline-unsent.txt` is the state that separates them — `abc` typed, then shift+enter, leaving an empty second composer row, so the tail ends on a bare `>` under `> abc`. Without the clause that reads ready, and a delivered prompt is appended to the operator's own text: a mis-send, not a wedge. The `>= 8` floor is still mutation-dead and is now documented as unpinned rather than defended. **The residual window is a capture, not an argument.** Chunk-level timing puts it at ~116 ms between a frame park and the first spinner tick. `antigravity-busy-residual-window.txt` lands in it. Its sibling, `...-no-spinner.txt`, kills the proposed braille clause outright rather than merely subsuming it: a turn's first frame draws the spinner row with no glyph, so that capture carries zero braille codepoints while the turn is live, and even an unbounded braille scan would call it ready. The gap stays pinned and open. **A finished turn was mischaracterised, and the capture wins.** The refusal has nothing to do with the turn ending in an error. `agy` ends a turn on one of two frames, and the spinner-erase touch-up walks back down over the composer box with bare newlines without redrawing it, so the retained tail loses rows the real terminal still holds. Twelve real turns ended that way 3 times and on a full repaint 9 times; neither state is transient. `antigravity-turn-ended-composer-repainted.txt` is committed as the pair, because either capture alone is misleading — the same trap §8 already records, hit again. Also adds the adversarial matrix run against the live binary: seven dialogs, four grid widths, type-ahead, and pane content carrying box-drawing glyphs or the banner string. Line-wrapping does not split the rule, because `agy` draws it at the grid width; below ~17 columns the banner gate fails first, and a scrollback long enough to evict the banner fails the same safe way.
deb49ae to
ec2bcb2
Compare
|
Too many files changed for review (627 files, 100 file limit). |
There was a problem hiding this comment.
ℹ️ No critical issues — one off-by-one in the evidence counts, inline.
Reviewed changes
- Added seven transcript captures — turn endings on both of
agy's final frames (spinner-erase touch-up and full composer repaint), the ~116 ms residual window (with and without a spinner glyph), idle at 20/10 columns, a typed bare caret, and a multi-row unsent composer. - Expanded the transcript suite — the residual-window false positive and the 10-column banner-truncation wedge are now pinned as KNOWN GAP/DEFECT, plus a braille-glyph meta-assertion and a scrollback test pinning the banner-gate eviction direction.
- Rewrote the evidence doc — the mutation table (§10), the two-frame turn-ending analysis (§9a), the captured residual window (§9), and the adversarial validation matrix.
The detector is unchanged: this delta rebases the previously reviewed positional caret rule and adds the evidence that tests it. I verified the fixtures back the doc's central claims — antigravity-composer-multiline-unsent.txt ends on a bare > under > abc (rule 3's only live case), the -no-spinner capture contains zero braille codepoints, and every fixture carries a valid .meta.json.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| | `antigravity-busy-turn-ended.txt` | The same turn after it ended and the composer returned | | ||
| | `antigravity-busy-turn-ended.txt` | The same turn, ended on `agy`'s spinner-erase touch-up | | ||
|
|
||
| Six more were recorded on 1.2.1 to answer the two open questions and the adversarial cases: |
There was a problem hiding this comment.
Off by one: the table below lists seven fixtures, but this line says "Six more" — and the test header (antigravity-readiness-transcripts.test.ts:6) says "Fourteen" while 15 captures are committed. The PR body already has the correct "7 new committed fixtures (15 total)"; align both counts.
… rule they never had Rebasing onto main picked up #19749's test changes, which the old base branch predated. Its production change was reverted; its constructed screens landed and are on main, and one of them fails against attempt six. The screen asserts ready for: Antigravity CLI 1.0.3 / [email protected] / Gemini 3.5 Flash (High) / > There is no composer rule in it. Every one of the fifteen captured ready screens has one directly above the caret, across two agy versions — the composer is a framed box, and this screen is one agy cannot print. It passed before only because the old detector keyed on the `gemini` model line, which is the exact rule the captures refuted. Adds the rule to the two hand-written screens that assert readiness, and leaves every dialog untouched: a dialog's caret is its selected row with dialog text above it, not a rule, which is what keeps refusing them. The test's intent is unchanged and is independently proven by a real capture — `antigravity-dialog-dismissed.txt` is a dismissed dialog above a redrawn composer. Two neighbouring comments had also become false and are corrected rather than left to mislead the next reader: - The non-Gemini screen was a characterization test recording a wedge as unfixed. The detector reads no model text at all now, so with a realistic screen it reads ready. Flipped to assert that, because it is the user-visible point of the rewrite. - The five-dialog ratchet no longer passes "because none prints a gemini model line". It passes because each one's last line is a dialog row. Same ratchet, accurate reason.
There was a problem hiding this comment.
ℹ️ No critical issues — one minor observation, and three prior Pullfrog nits remain open.
Reviewed changes
- Gave the two ready-shaped hand-written screens the composer rule — the dismissed-dialog test now draws a real
─rule under the caret, and the non-Gemini screen carries it too, so both match a screenagycould actually print. - Renamed and re-commented the dismissed-dialog test — it anchors on the redrawn composer rather than the model line, and cites
antigravity-dialog-dismissed.txtas its captured counterpart. - Flipped the non-Gemini wedge test — from a "known wedge" characterization to a positive assertion that the detector reads no model text, now expecting
isKnownReadyPromptPreviewto betrue.
I traced both updated tests through findAntigravityReadyPromptIndex and confirmed they pin the real detector behavior: the redrawn-composer case resolves ready + unblocked, and the non-Gemini case is ready because the model row is never read. The detector itself is unchanged in this delta.
ℹ️ Nitpicks
- The adjacent
keeps reporting a dialog that opens after a Gemini ready screentest (lines 368-384) was not updated, so its comment still claims "the Gemini model line and caret satisfy readiness" and its ready-shaped half still lacksCOMPOSER_RULE. Under the positional detector neither holds — that screen is not ready even without the dialog below it. The test still passes (the trailing dialog forces the refusal), but the comment now misdescribes the mechanism; worth either addingCOMPOSER_RULEto that screen's ready half or correcting the comment.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
📝 WalkthroughWalkthroughThe change replaces model-text readiness detection with a positional composer-rule and caret check. Transcript tests now replay captures on their recorded PTY grids and stop before shutdown output. The corpus adds busy, narrow-terminal, typed-composer, multiline, and repaint captures. Runtime fixtures and integration tests use the current Antigravity screen layout. Documentation records the capture evidence, replay rules, validation cases, and known limitations. Priority: ➖ Normal Merge Risk: 🟠 High · up to Hookless and remote Antigravity sessions can stall after completed turns or receive a new task while still processing the previous one. Narrow terminals can also remain permanently unready, so these readiness regressions should be fixed before merge. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 7 files. (15 skipped: 15 unsupported.) Full details: Description checkExplanation The description provides extensive technical context and validation evidence, but it does not follow the required template. It omits the required section headings and critical items such as a Linked Issue using Resolution Restructure the description using all template headings. Add a linked issue in the
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: d8ebae2e-aab2-4b03-b44c-0868fd029c58
📒 Files selected for processing (22)
docs/reference/antigravity-readiness-evidence.mdsrc/main/runtime/__fixtures__/antigravity-busy-residual-window-no-spinner.meta.jsonsrc/main/runtime/__fixtures__/antigravity-busy-residual-window-no-spinner.txtsrc/main/runtime/__fixtures__/antigravity-busy-residual-window.meta.jsonsrc/main/runtime/__fixtures__/antigravity-busy-residual-window.txtsrc/main/runtime/__fixtures__/antigravity-composer-multiline-unsent.meta.jsonsrc/main/runtime/__fixtures__/antigravity-composer-multiline-unsent.txtsrc/main/runtime/__fixtures__/antigravity-composer-typed-caret.meta.jsonsrc/main/runtime/__fixtures__/antigravity-composer-typed-caret.txtsrc/main/runtime/__fixtures__/antigravity-ready-narrow-10-columns.meta.jsonsrc/main/runtime/__fixtures__/antigravity-ready-narrow-10-columns.txtsrc/main/runtime/__fixtures__/antigravity-ready-narrow-20-columns.meta.jsonsrc/main/runtime/__fixtures__/antigravity-ready-narrow-20-columns.txtsrc/main/runtime/__fixtures__/antigravity-turn-ended-composer-repainted.meta.jsonsrc/main/runtime/__fixtures__/antigravity-turn-ended-composer-repainted.txtsrc/main/runtime/agent-transcript-pane-test-harness.tssrc/main/runtime/antigravity-readiness-transcripts.test.tssrc/main/runtime/orca-runtime-test-fixtures.spec.tssrc/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-06.spec.tssrc/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-03.spec.tssrc/main/runtime/terminal-wait-detection.test.tssrc/main/runtime/terminal-wait-detection.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
| `agy models` fetches the model list over the network fine, so the credential is live — but the | ||
| generation endpoint rejects it: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings
Length of output: 41659
🏁 Script executed:
#!/bin/bash
set -eu
file='docs/reference/antigravity-readiness-evidence.md'
printf '%s\n' '--- targeted lines ---'
sed -n '80,100p;151,170p;305,320p;328,342p;420,432p' "$file"
printf '%s\n' '--- fence openings and nearby content ---'
awk 'BEGIN{n=0} /^```/{n++; print NR ":" $0; for(i=1;i<=3;i++){if(getline line){print (NR+i) ":" line}}}' "$file"
printf '%s\n' '--- repository markdownlint configuration and scripts ---'
find . -maxdepth 3 -type f \( -iname '*markdownlint*' -o -name 'package.json' -o -name '.markdownlint*' \) -print
rg -n --hidden --glob '!node_modules' --glob '!dist' 'markdownlint|MD040' . | head -80Repository: stablyai/orca
Length of output: 7743
🏁 Script executed:
#!/bin/bash
set -eu
file='docs/reference/antigravity-readiness-evidence.md'
sed -n '80,100p;151,170p;305,320p;328,342p;420,432p' "$file"
printf '%s\n' '--- fence openings ---'
rg -n '^```' "$file"
printf '%s\n' '--- markdownlint references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' 'markdownlint|MD040' . | head -80Repository: stablyai/orca
Length of output: 5214
🏁 Script executed:
printf '%s\n' '--- target ---'
sed -n '80,100p;151,170p;305,320p;328,342p;420,432p' docs/reference/antigravity-readiness-evidence.md
printf '%s\n' '--- fences ---'
rg -n '^```' docs/reference/antigravity-readiness-evidence.mdRepository: stablyai/orca
Length of output: 5189
🏁 Script executed:
#!/bin/bash
set -eu
file='docs/reference/antigravity-readiness-evidence.md'
printf '%s\n' '--- all fence contexts ---'
for line in 92 117 139 163 258 267 314 335 427; do
start=$((line-2)); end=$((line+3))
printf '\n--- lines %s-%s ---\n' "$start" "$end"
sed -n "${start},${end}p" "$file"
done
printf '%s\n' '--- package scripts and markdownlint config candidates ---'
sed -n '1,220p' package.json
find . -maxdepth 3 -type f \( -iname '.markdownlint*' -o -iname '*markdownlint*' \) -print
printf '%s\n' '--- tracked diff for the reviewed file ---'
git diff --unified=3 -- "$file"Repository: stablyai/orca
Length of output: 23022
Add text language identifiers to the five cited fenced blocks.
Each opening fence at lines 92, 163, 314, 335, and 427 is bare and violates MD040. Change each opening fence to ```text, then run the repository markdownlint check.
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 92-92: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
Source: Linters/SAST tools
| "command": ["agy"], | ||
| "cols": 10, | ||
| "rows": 10, | ||
| "note": "agy TUI 1.2.1 idle on a 10-column PTY, where the banner row truncates to 'Antigrav'. Ground truth: ready.", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -euo pipefail
ast-grep outline src/main/runtime/terminal-wait-detection.ts --items all
rg -n -C 5 'Antigravity|Antigrav|ready-narrow-10|tui-idle' \
src/main/runtime/terminal-wait-detection.ts \
src/main/runtime/terminal-wait-detection.test.ts \
src/main/runtime/antigravity-readiness-transcripts.test.tsRepository: stablyai/orca
Length of output: 38296
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings
Length of output: 32267
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- detector ---'
sed -n '140,171p' src/main/runtime/terminal-wait-detection.ts
printf '%s\n' '--- narrow fixture metadata ---'
cat -n src/main/runtime/__fixtures__/antigravity-ready-narrow-10-columns.meta.json
printf '%s\n' '--- narrow fixture transcript ---'
cat -n src/main/runtime/__fixtures__/antigravity-ready-narrow-10-columns.txt | sed -n '1,80p'
printf '%s\n' '--- transcript assertions ---'
sed -n '145,162p;295,315p' src/main/runtime/antigravity-readiness-transcripts.test.tsRepository: stablyai/orca
Length of output: 4066
Support clipped Antigravity banners
findAntigravityReadyPromptIndex requires antigravity cli, but the 10-column transcript contains only Antigrav. The detector therefore returns no ready prompt even though the fixture ground truth is ready. Add a bounded clipped-banner check and retain the bare > plus composer-rule checks to avoid matching unrelated panes.
| const rule = lastNonBlankLineBefore(normalized, caret.start) | ||
| return rule !== null && isAntigravityComposerRule(normalized, rule.start, rule.end) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Do not require a composer repaint after a completed turn.
When agy ends on its spinner-erase touch-up frame, the retained tail no longer contains the composer rule. Line 158 then returns null although the turn is complete. This makes tui-idle time out for a nondeterministic subset of finished turns.
Use an idle signal that survives this repaint pattern before rejecting the completed pane. The committed antigravity-busy-turn-ended case currently pins this failure as a known defect.
| // Why the rule above it: `>` alone also marks a dialog's selected row and can end a model's | ||
| // own prose mid-turn; only the composer prints it directly under the box rule. | ||
| const rule = lastNonBlankLineBefore(normalized, caret.start) | ||
| return rule !== null && isAntigravityComposerRule(normalized, rule.start, rule.end) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Do not classify the residual busy frame as ready.
A live turn can retain the Antigravity banner, composer rule, and bare caret between spinner ticks. Line 158 accepts that exact shape. A hookless or remote fallback can then type the next task into a pane that is still processing the previous task.
Add a reliable active-turn signal for this path. Do not leave the antigravity-busy-residual-window cases inverted as known defects.
⏸️ Paused — draft. This is attempt six, and it has not converged.Recommendation: close this rather than iterate a seventh time. The durable half of the work already merged in #19983. What this attempt actually achievedIt is the first attempt written against real evidence, and it established facts the previous five guessed at:
Why it should not merge
For scale: The deeper reasonThis is the same problem as #19978/#20004: infer semantic state from rendered terminal text. Six attempts have not made it converge. Agents with hook support already publish readiness into the agent-status store. The tail rule is only the hookless/remote fallback — six attempts went into the fallback. Before a seventh, the question worth asking is whether that fallback needs to exist at all, or whether the honest answer for a hookless agent is to require an explicit signal rather than guess from pixels. What is already merged and should be kept#19983 carries the durable artifacts and is on
If someone does attempt sevenTwo captures would settle most of it, and the tooling to take them is already on
And the rule that should not be broken again: no rule without a fixture behind it. Attempt five's failure was that "executing both builds" looked like verification when the input being executed was itself the hand-written fixture. |
|
| Capture | Why a seventh attempt needs it |
|---|---|
antigravity-busy-residual-window.txt |
One of the two "what would settle it" items — already obtained |
antigravity-busy-residual-window-no-spinner.txt |
Kills the braille clause empirically — zero braille while a turn is live |
antigravity-turn-ended-composer-repainted.txt |
The pair without which antigravity-busy-turn-ended.txt reads as "errors only" |
antigravity-composer-multiline-unsent.txt |
The only state separating rule 3 from rule 2 — the mis-send direction |
antigravity-ready-narrow-20-columns.txt, -10-columns.txt, antigravity-composer-typed-caret.txt |
Grid-width and composer-content boundaries |
One of the two open questions listed in the comment above is no longer open. The residual-window capture was obtained — twice. The window is ~116 ms wide, so rediscovering it is not cheap. Either cherry-pick the 14 fixture files to main as a fixtures-only follow-up, or leave this branch undeleted.
These are evidence, not code. They survive any redesign, and they are the difference between a seventh attempt starting from measurement or starting from guesses — which is what the first five did.
Two corrections to the record
Stated precisely, because this comment thread is what a seventh attempt will read.
1. The ~25% wedge rate is pinned only for empty turns. It is 3 of 12 observed turns, and all 12 died before producing output (401 ACCESS_TOKEN_TYPE_UNSUPPORTED on the generation endpoint). The mechanism cannot change — the spinner-erase touch-up is what the TUI emits when a turn stops, not when it fails — but whether a streaming turn that produces real output shifts the rate is unmeasured. Do not quote 25% as if it covers successful turns.
2. The ≥ 8 glyph floor in rule 3 is still mutation-dead. The multi-row composer capture justifies rule 3's existence — without it, Orca appends its prompt to an operator's unsubmitted text. It does not justify that specific constant: mutating 8 → 1 still kills no test. The evidence doc says to delete the floor if it ever gets in the way, and that guidance stands.
|
Review verdict: Keep draft / do not merge as-is; superseded by #21613. The maintained readiness PR uses the current composer signal and has newer transcript coverage; this older fixture-heavy branch should not be promoted independently. |

Replaces
findAntigravityReadyPromptIndexwith three rules read off committed transcripts, and then attacks those rules against a liveagyuntil two of them broke.Stacked on #19983 (now merged); this PR is attempt six's own change plus the evidence that tests it.
Headline: one of the three rules killed zero mutations
This PR's whole thesis is "no rule without a fixture behind it." Mutation-checking each clause by deleting it and re-running the suite found that the third rule did not decide anything:
antigravity cligate>">= 8glyphs to>= 1Every capture that ended on a bare
>also had the composer rule directly above it, and none ended on a bare>without one. So the clause the PR presents as load-bearing was inert against the entire corpus, and deleting it broke nothing.The state that separates them is a multi-row composer. Type
abc, then shift+enter (ESC[13;2u, whichagynegotiates at startup), leaving an empty second composer row. The derived tail is:The last content line is a bare
>; the line above it is> abc, not a rule. Ground truth is not ready — the operator has unsent text in the composer, and a prompt delivered here is appended to it.Without rule 3 this reads ready, and that is the mis-send direction — the one failure mode the whole fail-safe asymmetry exists to prevent, not a wedge.
antigravity-composer-multiline-unsent.txtnow makes rule 3 mutation-live.The
>= 8floor is still mutation-dead (8 → 1 kills nothing) and is documented as unpinned rather than defended.agydraws the rule at the grid width, and the banner gate fails before the grid gets narrow enough for the floor to matter. It is kept as a cheap guard against a stray box-drawing glyph in prose, and it is the one number in the detector that no transcript pins. It is not load-bearing. If it is ever in the way, delete it — nothing here is evidence for it.I edited an existing test assertion. Here is the case for it, and what would falsify it
A reviewer scanning this diff will see a PR that changes detection logic also changing a test that asserts detection behaviour. That pattern deserves an argument up front rather than a defence on request.
What I changed.
src/main/runtime/terminal-wait-detection.test.ts→Antigravity readiness does not absorb its own startup dialog→clears once a Gemini ready screen replaces the dialog. I did not make it pass by loosening the assertion — the assertion is stillisKnownReadyPromptPreview(waitText) === true. I changed the input screen, because the screen was not oneagycan print.The screen, exactly as it was:
Why it is unreal, in one line: there is no
─composer rule above the caret. The idle composer is a framed box; the rule is the top of that box.The evidence: 15 committed captures, across two
agyversions (banner 1.2.0 and 1.2.1), and every single ready-shaped one has the rule directly above the caret. Zero counterexamples. This screen passed before only because the old detector keyed on thegemini-prefixed model line — the exact rule the captures refuted, and the reason this PR exists (a real ready screen paints the model name on the same physical line as the block-glyph logo, so it never starts one).Open a fixture and check it yourself:
src/main/runtime/__fixtures__/antigravity-dialog-dismissed.txtis a real recording of this very scenario — a/modeldialog dismissed with esc, above a redrawn composer. It proves the test's intent independently of the hand-written screen, and it passes.What would falsify this edit: a single real capture of an
agyready screen with no rule above the caret. If one ever appears, this edit was wrong, the detector is refusing a genuinely ready pane, and it needs a fourth clause. That is the specific thing to go looking for if you doubt this.The asymmetry that shows this was not just turning red green: I left every dialog screen untouched. The five-dialog ratchet, the three trust-dialog variants, and the dialog-after-ready case all still have their original hand-written rows and all still refuse. A dialog's caret is its selected row, with dialog text above it rather than a rule — which is precisely what keeps refusing them. If I had been making red go green I would have had to touch those too.
Two comments and one characterization test that had silently become false
Left alone, these would tell the next reader the wrong thing about what is protecting them.
Antigravity readiness does not absorb its own startup dialoggemini-prefixed model line + a lone>caret"SILENT_STARTUP_DIALOGSgeminimodel line" — the model line is not read at all any more>under a ruledoes not yet recognize a non-Gemini ready screen (known wedge)recognizes a non-Gemini ready screen, because no model text is read, assertingtrue. This is the user-visible point of the rewrite and should not sit in the tree as a stale "known wedge"Provenance: why this only surfaced on rebase, and a warning for anyone else in this area
This did not appear when the PR was stacked on #19983. It arrived with the rebase onto current
main.#19749 — attempt five — had its production change reverted, but its tests landed and are still on
main. The old base branch forked before that point, so it never saw them.The general shape, which is worth knowing before rebasing anything old in this area: a branch forked before a revert can inherit assertions written against a detector that no longer exists. The revert removed the rule; it did not remove the fixtures that were tuned to it. Verified here with
git merge-base --is-ancestor b3e0a33fa4c <old-base>(not an ancestor) and by confirming the old base's copy of the file does not contain the test.This fix resolves a CI failure and nothing else. It does not touch the ~25% per-turn wedge or the residual-window false positive, which are what hold the risk rating at MEDIUM.
A finished turn wedges ~25% of the time, and that is a defect, not a curiosity
The previous revision recorded this as a single fixture quirk, refused because that turn ended in an error with the error block below the composer. Both halves are wrong. On the screen the operator sees, the error block is in the transcript region and the composer is drawn beneath it, exactly as any result would be. And the refusal has nothing to do with the error.
agyends a turn on one of two frames:ESC[?25l \n ESC[2A ESC[K \n\n\n\n ? for shortcuts ESC[2A ESC[13D… rule / ? for shortcuts … CR ESC[2A ESC[2C ESC[?25hThe touch-up moves the cursor up past the composer box, erases the spinner row, then walks back down over the box with bare newlines without redrawing it — it relies on the real terminal still holding those rows. Orca's retained tail does not, so the composer rows
agynever re-emitted are lost.Which frame ends a turn is nondeterministic. Twelve real turns:
3 of 12 — roughly a 25% per-turn wedge rate. Neither state is transient: a capture left running ~5 s after the touch-up receives nothing further, so the pane stays refused until something else repaints it.
antigravity-turn-ended-composer-repainted.txtis committed alongsideantigravity-busy-turn-ended.txtbecause either capture alone is misleading — and the first round happened to capture only the rarer one. That is the same six-file coincidence trap §8 of the evidence doc already records, hit a second time on a different fact.The residual window, measured — and the braille clause refuted, not subsumed
Chunk-level timing of a live turn:
CR ESC[2A ⣯ …), which splices the composer awayA ~116 ms window.
antigravity-busy-residual-window.txtis a recording stopped inside it; the detector says ready while a turn is live.The earlier revision called the proposed clause — "a braille glyph means working" — subsumed by the caret rule. That wording was too generous and is corrected in the doc. The clause is not merely redundant, it is insufficient: a turn's first frame draws the spinner row with no glyph at all.
antigravity-busy-residual-window-no-spinner.txtis stopped in that window and contains zero braille codepoints in the entire transcript while the turn is live:So even an unbounded braille scan — the unsafe version, already ruled out by the
⣾ Signing in...row — would call this capture ready. The gap stays pinned and open, now with the capture that was listed as missing and with the proposed fix empirically dead rather than argued dead.Still missing: a successful turn completion
Not obtained, and nothing was fabricated to stand in for it.
agy modelsfetches over the network fine, so the credential is live, but the generation endpoint rejects it:agy modelsAGY_ADC_AUTH=1against the machine's existing ADCsettings.jsonWhat it leaves unknown: whether a turn that streams real output changes the 3-in-12 odds above. It cannot change the mechanism — the touch-up frame is what the TUI emits when a turn stops, not when a turn fails — but the rate is measured only on turns that produced no output before dying. It also leaves the residual window's line bound uncalibrated for a streaming turn: in both captures the spinner row is the third non-blank line from the end, but a streaming turn grows the region between the two rules by an unknown amount, and fitting a predicate to captures of an empty turn is how attempts one through five were built.
Adversarial validation against the live binary
agyself-updated mid-investigation (banner 1.2.0 → 1.2.1), so every rule below is confirmed across a version bump it did not know about. That is the only durability evidence this surface has.antigravity-busy-mid-turn.txtantigravity-busy-residual-window.txt— KNOWN GAP…-no-spinner.txt— and no braille to seeantigravity-turn-ended-composer-repainted.txtantigravity-busy-turn-ended.txt— KNOWN DEFECT/model,/help,/agents,/mcp,/palette open/modeldismissed with esc/add-dirwith no argument (local command, no LLM)antigravity-ready-narrow-20-columns.txtantigravity-ready-narrow-10-columns.txtantigravity cli> …row>>typed into the composerantigravity-composer-typed-caret.txt— row reads> >antigravity-composer-multiline-unsent.txt— the only capture rule 3 decidesLine-wrapping does not split the dash run.
agyredraws the composer rule at the PTY's own width — 80 glyphs on an 80-column grid, 20 on a 20-column one — so it never emits a rule wider than the grid for the terminal to wrap. Below about 17 columns the banner gate fails first, becauseAntigravity CLItruncates before the rule loses its eighth glyph. Both failures point the safe way.Why ship this at all
maintoday wedges every Antigravity session: the shipped detector requires a line starting with the model name, the block-glyph logo shares that physical line, so no real ready screen ever matches — while a live/modelpicker does supply a line-start model row and reads as ready.This PR wedges ~25% per turn and has one open false-positive window of ~116 ms.
That is a large improvement, and it is not yet low-risk. The blast radius is also narrower than the raw rate suggests: hooked panes take idle from the hook store (
Stop+fullyIdle), so the tail rule is the hookless / remote fallback, not the primary path.Residual risk: MEDIUM
What improved: 7 new committed fixtures (15 total), every rule mutation-verified except one documented-dead constant, all rules reconfirmed across an unplanned version bump, and 16 adversarial situations measured rather than argued.
What holds it at MEDIUM:
What keeps it from HIGH: every new failure mode except the residual window points at a wedge, not a mis-send; and the hook store covers the hooked lane.
Unrelated CI: a real flake in
package (windows)someone should fixNot fixed here — it is a Windows-only test this PR does not touch — but recording it so it is not lost.
src/main/agent-hooks/windows-hook-payload-delivery.test.tsfails intermittently withcmd.exe posted exactly one hook: expected [] to have a length of 1.exitCode0 andtimedOutfalse both pass; only the POST is missing.Root cause is at
windows-hook-payload-delivery.test.ts:118: after the child process closes,runHookCommandwaits a fixed 250 ms for the listener to finish reading the POST —— rather than polling
listener.posts.lengthto a deadline. On a loaded Windows runner 250 ms is not enough for the server's request handler to run. The fix is to replace the fixed sleep with a bounded poll for the post to arrive.And a second, separate one:
package→ "Verify Linux CLI launch contract"Also not caused by this PR, and recorded for the same reason.
The
cli-launch-contractDocker buildapt-get installs its dependency set fromarchive.ubuntu.com, and on this run that mirror's throughput collapsed:libglib2.0-0t64(1.5 MB) took ~58 s,
libicu74(10.9 MB) was still in flight 570 s into the build. Both thebuild and its one retry hit
docker build … timed out after 600000ms, the retry dying onlibllvm20(30.6 MB).The driver is
config/scripts/run-linux-cli-launch-contract-docker.mjs, which this PR does nottouch, and whose most recent commit is #18797 — "ci(package): retry apt fetches and docker builds
behind the Ubuntu mirror". So this condition is known and already has one retry against it; that
retry was not enough here. Someone may want a second attempt, a longer build budget, or a cached
base layer that does not re-fetch the apt set on every run.