fix(setup): Empty Antigravity responses and profile cross-talk - #84
Merged
Merged
Conversation
profile save <name> snapshotted the active profile instead of the target, and setup --profile for a new name inherited root agents as atual while blanking sandbox/autocompact screens. New profiles now start from base with an empty agent map, save resolves the explicit target, and the role pin respects loaded.defaultAgent.
A successful result with an empty response skipped the message event and still emitted session.completed, surfacing as an empty string. The parser now accumulates text deltas per session and falls back to them, emits session.failed when nothing usable arrived, and resets state on start/stop/attach with bounded replay of consumed output on reattach.
Extract resultLine and deltaLine helpers for the repeated stream-json fixtures. No behavior change; same 43 tests, 75 fewer lines.
Merge the empty/whitespace failure cases into it.each and share a contentAfterEmptyResult helper between the replay tests.
|
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.



Two independent fixes from one autonomous run.
Antigravity sessions that streamed their answer and ended with an empty result.response surfaced as a blank string: the parser skipped the message event and still emitted session.completed. The parser now accumulates text deltas per session, reconstructs the message from them, and emits session.failed when nothing usable arrived. Lifecycle resets on start/stop/attach plus bounded replay of consumed output keep daemon restarts from misclassifying runs.
Separately, profile save snapshotted the active profile into any target name, and setup --profile for a new name inherited root agents as atual while blanking the sandbox/autocompact screens. New profiles now start from the base setup with an empty agent map, save resolves the explicit target, and the role pin respects the configured defaultAgent.
Alternative for the empty result was keeping session.completed with an empty message; rejected because a ghost completion lets agents proceed on missing work while a failure costs one retry (matches the terminal synthesis contract).
Reviewers need care around src/drivers/antigravity/driver.ts replay bounds and the parser accumulator cap. Verified with 172 scoped tests green, tsc clean, diff-check clean, and a bounded mutation probe with 2 kills and 0 survivors. Follow-ups: possible extra polish landing from the still-open fix session e80c, no live agy turn was ever spent, and nested --role reviewer runs unexpectedly resolved to the root Claude binding instead of the low-cost Antigravity one.