Skip to content

feat: add verified Antigravity CLI worker adapter - #4327

Closed
Adityarajkishan wants to merge 81 commits into
kunchenguid:mainfrom
Adityarajkishan:feat/agy-adapter
Closed

Adityarajkishan wants to merge 81 commits into
kunchenguid:mainfrom
Adityarajkishan:feat/agy-adapter

Conversation

@Adityarajkishan

Copy link
Copy Markdown

Intent

Add a verified Antigravity CLI (agy) harness adapter for crewmate and scout use only, so firstmate can dispatch and supervise agy workers: detect a running agy session through its measured ANTIGRAVITY_AGENT=1 child marker, launch with --prompt-interactive and --dangerously-skip-permissions, read busy state from agy's native Stop and tool-use hooks loaded from a firstmate-owned settings path (never the worktree's own config), recognise the composer including real unsent and multiline drafts so steering never merges with or overwrites a draft, keep unconfirmed interrupts as unknown rather than idle, retire every generated hook artifact on teardown and on fresh-spawn rollback without widening deletion for any other harness, refuse --secondmate exactly as muse and gemini do, and prove all harness-dependent behaviour with both a portable regression and an fm_live_gate live guard against the real binary, with dated measurements owned by docs/verification/agy.md. Antigravity's quota windows are unreadable by quota-axi, so an agy candidate in a dispatch profile must remain eligible with disclosed uncertainty and never fail as an unknown harness, without adding any quota model for it.

What Changed

  • Added a verified Antigravity CLI (agy) adapter for crewmate and scout workers, including marker-based detection, interactive launch flags, firstmate-owned hooks, draft-safe composer handling, conservative interrupts, and scoped teardown cleanup.
  • Extended backend, spawn, send, control, inbox, composer, and quota dispatch plumbing for agy, keeping unreadable agy quota headroom eligible with an explicit warning.
  • Added portable regressions, live guards, harness guidance, and dated verification evidence for agy behavior.

Risk Assessment

⚠️ Medium: The change spans complex adapter, composer, lifecycle, and cleanup paths, but this review found no additional concrete source defect beyond previously adjudicated concerns.

Testing

The live AGY 1.2.2 composer, liveness/marker, and lifecycle surfaces passed. The portable regression scenarios remain untested under the live-validation contract.

  • Live validation: ⚠️ inconclusive - 3 of 6 scenarios driven live against the product
Scenario Result Live Evidence
AGY hook wiring, rollback, teardown isolation, raw-launch handling, and secondmate refusal behave correctly ⏸️ untested no The prior payload identified a targeted portable runner but explicitly marked this scenario live=false, so it did not establish a live product result.
AGY composer and control paths preserve multiline drafts, unknown interrupts, and safe exit clearing ⏸️ untested no The prior payload identified a targeted portable runner but explicitly marked this scenario live=false, so it did not establish a live product result.
AGY quota candidates remain eligible with disclosed unmeasurable headroom ⏸️ untested no The prior payload identified a targeted portable runner but explicitly marked this scenario live=false, so it did not establish a live product result.
An end user runs a complete AGY worker lifecycle; spawn, doorbell, interrupts, Stop, exit, and teardown all succeed ✅ pass live Lifecycle evidence at widths 80, 120, and 220
An end user leaves an unsent AGY draft and encounters an ambiguous blank shell pane; drafts remain pending and unknown input defers injection ✅ pass live agy-composer-matrix-2026-09-12.txt
A real AGY 1.2.2 process is supervised as alive and its ANTIGRAVITY_AGENT=1 child marker is detected ✅ pass live agy-liveness-marker-2026-09-12.txt
Evidence: AGY lifecycle width 80

ok - agy (1.2.2): canonical spawn, hooks, doorbell, control/data interrupts, Stop, exit, and teardown passed

ok - agy (1.2.2): canonical spawn, hooks, doorbell, control/data interrupts, Stop, exit, and teardown passed
Evidence: AGY composer matrix

ok - agy (1.2.2): real unsent draft stays pending with styled and cursorless signals

# harness absent, not verified here: claude
# harness absent, not verified here: codex
# harness absent, not verified here: opencode
# harness absent, not verified here: pi
# harness absent, not verified here: grok
# harness absent, not verified here: kimi
# harness absent, not verified here: muse
ok - agy (1.2.2): real idle > composer plus shortcuts footer classifies empty
ok - agy (1.2.2): real unsent draft stays pending with styled and cursorless signals
ok - strict posture live: a blank shell row classifies unknown and injection defers
# harness absent, not verified here: zellij (false-positive regression not exercised)
ok - live composer-matrix guard verified 2 live surface(s)
Evidence: AGY liveness and marker

ok - harness marker: agy 1.2.2 exports ANTIGRAVITY_AGENT=1 and detects as agy from a tool process

# skip: claude is not installed on this machine, so its classification is unverified here
# skip: codex is not installed on this machine, so its classification is unverified here
# skip: opencode is not installed on this machine, so its classification is unverified here
# skip: pi is not installed on this machine, so its classification is unverified here
# skip: pi-signed is not installed on this machine, so its classification is unverified here
# skip: grok is not installed on this machine, so its classification is unverified here
# skip: kimi is not installed on this machine, so its classification is unverified here
# skip: cursor is not installed on this machine, so its classification is unverified here
# skip: muse is not installed on this machine, so its classification is unverified here
# agy 1.2.2: title='agy' foreground=[agy ]
ok - harness liveness: agy 1.2.2 classifies alive
ok - harness marker: agy 1.2.2 exports ANTIGRAVITY_AGENT=1 and detects as agy from a tool process
# unverified on this machine (not installed): claude codex opencode pi pi-signed grok kimi cursor muse
# checked 1 installed harness(es)
Evidence: AGY lifecycle widths 120 and 220

Lifecycle also passed at widths 120 and 220.

ok - agy (1.2.2): canonical spawn, hooks, doorbell, control/data interrupts, Stop, exit, and teardown passed
- Outcome: ⚠️ 1 warning across 2 runs (41m19s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 4 issues found → auto-fixed (20) ✅
  • 🚨 bin/fm-control.sh:502 - When AGY has an unsent draft, the preflight returns agy-preflight:pending and do_exit immediately refuses at lines 502-507, without recording the draft, clearing the composer, reclassifying it, or sending /quit. This leaves the worker alive; implement the approved clear-and-note exit sequence while retaining refusal for unknown or uncleared states.
  • 🚨 bin/fm-composer-lib.sh:173 - The final AGY composer check collapses repeated spaces and converts newlines to spaces before comparing. Thus distinct literal content such as foo bar versus foo bar, or multiline text versus a space-separated draft, compares equal and can send Enter for content different from the requested text. Preserve significant whitespace in the verification contract.
  • 🚨 docs/verification/agy.md:275 - The required criterion is to prove all harness-dependent behavior with portable regressions and passing live guards. The committed record still shows the composer guard exiting 1 at line 275, the doorbell guard exiting 1 at line 288, and the lifecycle guard failing at line 300; the portable command at line 118 pipes through tail -1, masking the test process's exit status. Complete and record passing post-fix evidence, or explicitly authorize containment.
  • ⚠️ docs/verification/agy.md:53 - The current AGY 1.2.2 verification section repeats a version command whose recorded output is 1.2.0, contradicting the section heading and current-version statement. Move this block into clearly labeled historical evidence or update it to the current measurement.

🔧 Fix applied.
4 issues (2 errors, 2 warnings) still open:

  • 🚨 bin/fm-composer-lib.sh:1433 - AGY composer extraction collapses significant whitespace via awk '{$1=$1; ...}'. A pending draft such as foo bar is logged as foo bar before C-u clears the original, losing user data and causing valid comparisons to mismatch. Preserve AGY content exactly, apart from wrapping normalization.
  • 🚨 docs/verification/agy.md:280 - The required criterion is to prove all harness-dependent behavior with portable regressions and an fm_live_gate guard against the real binary. The committed AGY doorbell guard explicitly fails (acted=no acked=no) and the canonical lifecycle guard never launches because the Treehouse pool rejects stale origin metadata. These records do not establish the required current live proof.
  • ⚠️ docs/verification/agy.md:305 - The new C-u evidence is not reproducible from its recorded command: lines 305–308 only run tmux commands and fm_tmux_composer_state, which cannot emit the labeled version=, before_clear=, clear_key=, and after_clear= output shown below. Re-record this measurement with a self-contained command and exact output.
  • ⚠️ bin/fm-pending-reply-lib.sh:796 - Simplification: fm_pending_reply_backend_observation is explicitly a secondmate-only path, but AGY is explicitly refused for --secondmate. The new AGY-specific deep-capture branch is therefore outside the stated intent and its test adds an unneeded parallel rule; remove both rather than expanding secondmate behavior.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 docs/verification/agy.md:280 - The intent requires live proof against the real binary, but the current 1.2.2 record still shows the AGY doorbell guard failing (acted=no acked=no) and the lifecycle guard failing before spawn; the composer matrix also exits 1 for recorded Claude/Codex failures. Replace these with current passing evidence or explicitly record the environment blocker.
  • ⚠️ bin/backends/zellij.sh:560 - The fixer broadened zellij's comparison normalization to every harness. A long unbroken non-AGY message wraps into rows that extraction joins with spaces, so after no longer equals the unbroken expected text; submission reports send-failed before Enter and leaves the typed text in the composer. Revert this prior-round broadening to the minimal AGY-only comparison change.

🔧 Fix applied.
1 warning still open:

  • ⚠️ bin/fm-spawn.sh:1800 - The raw-launch guard misses append assignments such as export ANTIGRAVITY_AGENT+=1; the marker is then restored after the outer scrub and can misidentify an unverified child as AGY. Reject += variants for the reserved-marker assignment forms.

🔧 Fix applied.
1 error still open:

  • 🚨 bin/fm-composer-lib.sh:1429 - AGY submit verification treats visual line wrapping as a literal space. fm_composer_extract_selected_content joins every extracted composer row with a space, while fm_backend_agy_composer_matches preserves interior whitespace and compares exactly with the original text. On a narrow pane, long doorbells or steering commands therefore return agy-draft-conflict before Enter and are deferred instead of delivered. Make comparison aware of renderer-inserted wrapping without collapsing intentional spaces in real multiline drafts.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 docs/verification/agy.md:294 - The intent requires a live guard proving all harness-dependent behavior, including the inbox doorbell. When FM_AGY_LIFECYCLE_LIVE_E2E=1, the test skips check_harness_doorbell, and the canonical lifecycle contains no inbox record, fm_task_inbox_ring, acted-file, or handled-file assertion; therefore the documented pass does not prove AGY doorbell behavior. Add that operation/assertion or record a passing standalone AGY doorbell run.
  • ⚠️ docs/verification/runtime-backends.md:1808 - This maintainer summary says the current AGY doorbell and lifecycle guards remain unresolved, contradicting the current verification record's documented 1.2.2 lifecycle pass. Update it to reflect the lifecycle result and separately state that the standalone doorbell guard was not rerun.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 docs/verification/agy.md:272 - The intent requires portable and live proof of all harness behavior. The record says the lifecycle output predates the new doorbell assertion and post-fix live runs were not executed, so AGY doorbell behavior lacks required live evidence. Re-run both documented widths or approve the missing proof.
  • ⚠️ tests/fm-send-inbox-doorbell-live-e2e.test.sh:298 - fm-send.sh already rings the inbox, then this guard rings the same record again. If the first ring acts and moves the record to handled/, the second ring may fail while lines 299-310 still pass on the pre-existing acted/handled files. Ensure the assertion only observes effects from the explicit ring.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 docs/verification/agy.md:292 - The required criterion is to “prove all harness-dependent behaviour with both a portable regression and an fm_live_gate live guard against the real binary, with dated measurements owned by docs/verification/agy.md.” The current record still contains a placeholder for the post-fix lifecycle runs and only documents pre-doorbell-assertion output, so the new exactly-one-doorbell and pending-composer exit behavior is not live-proven.
  • ⚠️ bin/fm-composer-lib.sh:745 - The AGY scanner accepts any two U+2500 boundary rows without requiring equal widths. A real screen containing a 72-column composer boundary followed by an unrelated 16-column rule can therefore be classified as a valid empty AGY composer, allowing input to be sent into an unproven region. Require the paired boundaries to have matching widths.

🔧 Fix applied.
3 issues (1 error, 2 warnings) still open:

  • 🚨 docs/verification/agy.md:292 - The intent requires “prove all harness-dependent behaviour with both a portable regression and an fm_live_gate live guard against the real binary, with dated measurements owned by docs/verification/agy.md.” The current record says the post-fix AGY 1.2.2 run failed at the doorbell step, and lines 295-299 still contain placeholders; the only passing lifecycle output is explicitly pre-doorbell. This required acceptance proof is still missing.
  • ⚠️ bin/fm-composer-lib.sh:1115 - _fm_composer_agy_busy_scope accepts any two U+2500 rows without checking equal widths, unlike the main AGY composer scanner. A capture containing a 72-column composer boundary, its busy footer, and a later 16-column rule is treated as a valid pair; the busy footer is excluded from the returned scope, so tmux or Herdr rendered-state checks can report idle while AGY is busy. Require equal-width boundaries here as well and fail closed on mismatch.
  • ⚠️ bin/fm-spawn.sh:1800 - The raw-launch guard only rejects ANTIGRAVITY_AGENT assignments containing =, so a command such as sh -c '. /operator/sets-marker; export ANTIGRAVITY_AGENT; exec custom-agent' is accepted. The outer env -u ANTIGRAVITY_AGENT scrub is bypassed when the raw shell sources a value and then exports it, allowing the child to be detected as verified AGY. Reject the documented bare export ANTIGRAVITY_AGENT form while continuing to allow marker-name arguments.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 docs/verification/agy.md:271 - The authoritative intent requires proof of all harness-dependent behavior with both a portable regression and an fm_live_gate run against the real binary, with dated measurements in this document. The current record says the doorbell guard was not rerun, the lifecycle run predates the assertion, the post-fix live output is absent, and the latest narrow-pane run failed; the required current lifecycle/doorbell proof is therefore missing.
  • ⚠️ bin/fm-composer-lib.sh:1487 - AGY wrap comparison derives a terminal content width, but ${#content} counts locale characters or bytes rather than terminal display cells. In a 72-column composer, a visually full row containing 66 ASCII characters plus one width-2 CJK character has length 67, while a following full 68-ASCII row has length 68; the first row is not recognized as full, so a space is inserted and an exact multiline draft is incorrectly returned as agy-draft-conflict. Compare display-cell widths when deciding whether rows were wrapped mid-token.

🔧 Fix applied.
2 errors still open:

  • 🚨 bin/fm-composer-lib.sh:1360 - With no cursor, _fm_composer_select_agy_cursorless ignores FM_COMPOSER_SCAN_AGY_AMBIGUOUS. A capture with three U+2500 boundary rows can select the first pair and classify an unproven composer as empty or pending, allowing a ring or steer to touch it. Reject ambiguous captures before selecting the AGY pair.
  • 🚨 docs/verification/agy.md:298 - Required real-binary proof is still absent: the document records no post-fix lifecycle output and leaves the default-width and 80-column results as a placeholder at lines 298-302. Current 1.2.2 lifecycle evidence is therefore insufficient to prove the fixed AGY doorbell behavior.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 docs/verification/agy.md:298 - The authoritative intent requires proof of all harness-dependent behavior with both a portable regression and an fm_live_gate live guard against the real binary, with dated measurements in docs/verification/agy.md. The document explicitly says no post-fix live output is recorded and leaves the 220/120/80 results as a placeholder; the recorded 220 and 80 results predate the boundary-filtering fix.
  • ⚠️ bin/fm-teardown.sh:2941 - Simplification: teardown adds a second implementation of the AGY ownership-proof and cleanup rule already implemented in bin/fm-spawn.sh. The intent requires teardown cleanup, but not parallel definitions; remove this duplicate component and retain one shared implementation so the safety invariant cannot drift.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 bin/fm-backend.sh:806 - The intent requires “recognise the composer including real unsent and multiline drafts so steering never merges with or overwrites a draft.” The shared AGY preflight checks for an empty composer at bin/fm-backend.sh:806-812, but the tmux path then types at bin/fm-tmux-lib.sh:300 and only afterward compares the composer at lines 301-308. If a human types a draft between those operations, firstmate's text is appended to that draft before the conflict is detected. Establish an atomic/exclusive pre-send invariant; the synchronization remedy needs explicit authorization.
  • ⚠️ bin/fm-backend.sh:941 - Simplification: fm_backend_agy_composer_matches is newly introduced but has no call sites; all current callers use fm_backend_agy_composer_content or inline comparisons. The intent requires composer protection, not this unused parallel helper. Remove the unrequired component.

🔧 Fix applied.
1 error still open:

  • 🚨 bin/backends/zellij.sh:548 - The AGY Zellij submit path does not reuse the supported plain-screen fallback. Composer state falls back when ANSI capture is unavailable, but composer content always calls ANSI-only capture. On such a Zellij version, AGY preflight may accept an empty composer, then the send path fails before Enter, so steering and inbox delivery never submit. Reuse the plain fallback and preserve its styled capability flag.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • ⚠️ bin/fm-control.sh:335 - A multiline AGY draft is appended directly to the line-oriented status log, so a draft such as first\nsecond creates a valid note followed by an unstructured second wake event. Serialize embedded newlines while preserving the draft text before appending.
  • 🚨 docs/verification/agy.md:297 - The required criterion is to “prove all harness-dependent behaviour with both a portable regression and an fm_live_gate live guard against the real binary, with dated measurements owned by docs/verification/agy.md.” The recorded live evidence is explicitly from gate tip 30f3d426, but the final target adds later cleanup-helper and Zellij fallback changes (7e10435, 26ab875, d4f081c), so it does not prove the final implementation. Re-run or clearly qualify the evidence against the final tip.

🔧 Fix applied.
1 error still open:

  • 🚨 docs/verification/agy.md:394 - The required criterion is to “prove all harness-dependent behaviour with both a portable regression and an fm_live_gate live guard against the real binary, with dated measurements owned by docs/verification/agy.md.” The document says its live evidence is from older tip 30f3d426 while the reviewed target is 451cce13, and leaves final-tip live re-run: <pending> at this line. Add final-tip evidence or explicitly authorize accepting the older proof.

🔧 Fix applied.
1 error still open:

  • 🚨 docs/verification/agy.md:394 - The target changes the lifecycle guard by adding a pre-doorbell completion wait and extending the acted/acknowledged timeout, but the recorded “final-tip” evidence is explicitly from gate tip 451cce1, not the reviewed target 13ad48d. Re-run the required live guards against the final target and update both verification documents, or explicitly authorize accepting the older evidence.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 docs/verification/agy.md:394 - The authoritative intent requires proving all harness-dependent behavior with a portable regression and an fm_live_gate run against the real binary. The target changes the lifecycle guard ordering in tests/fm-send-inbox-doorbell-live-e2e.test.sh, but docs/verification/agy.md:394-412 explicitly records evidence from the pre-change tip and leaves the final-tip rerun pending. Re-run the lifecycle guard against this target and record its dated output, or explicitly authorize the older evidence.
  • ⚠️ tests/fm-send-inbox-doorbell-live-e2e.test.sh:278 - The reworked lifecycle guard initializes busy=0 and only sets it after observing the transient state=busy record. A valid fast READY response can trigger the Stop hook and replace the seeded busy record with state=idle before the first poll, leaving busy=0 forever and causing a false failure at the idle/empty check. Treat the fresh spawn seed as sufficient or accept the observed idle/empty state directly.

🔧 Fix applied.
2 errors still open:

  • 🚨 bin/fm-composer-lib.sh:1478 - The AGY compare path drops empty composer rows at line 1452 and skips blank rows again at line 1478. A draft containing first, a blank line, and second is reduced to the same rows as first\nsecond, so the expected-match check succeeds and Enter can submit an altered multiline draft. Preserve empty row structure in AGY comparisons, including trailing blank rows.
  • 🚨 docs/verification/agy.md:412 - The intent requires dated live proof against the real binary. The document states at line 412 that its evidence predates the lifecycle-guard ordering change in this target and that the final-tip rerun is pending, so the reviewed lifecycle guard has no recorded final-tip proof. Record the final-target live result or explicitly authorize accepting the older evidence.

🔧 Fix applied.
5 issues (4 errors, 1 warning) still open:

  • 🚨 docs/verification/agy.md:412 - The required live-proof criterion is not met: docs/verification/agy.md:394-412 records evidence from gate tip 13ad48d before the lifecycle-guard changes and explicitly leaves the final-tip rerun pending. Record current-target passing evidence or authorize the older evidence.
  • 🚨 bin/fm-composer-lib.sh:1561 - With harness=agy, a valid AGY pair whose cursor is outside the pair can fall through at line 1561 to generic boxed/other composer candidates. This can classify an unrelated composer as empty or pending, contrary to the exact AGY-only proof requirement. Return unknown whenever the cursor is outside the AGY pair.
  • 🚨 bin/fm-composer-lib.sh:748 - The scanner resets its boundary count when it sees a wider rule, so a valid 72-row pair followed by a valid 80-row pair is reduced to the widest pair and accepted instead of becoming ambiguous. The required contract says exactly two measured boundary rows are valid and three-plus must be unknown; clarify or enforce that contract.
  • 🚨 bin/fm-backend.sh:806 - The shared AGY preflight checks for empty input, then releases control before backend literal typing. If a human types between those operations, firstmate's text can be inserted into or appended to the draft; the later comparison only withholds Enter and cannot undo the merge. This contradicts the requirement that steering never merge with a draft, and fixing it requires authorizing input reservation/serialization.
  • ⚠️ bin/fm-spawn.sh:956 - When fresh AGY hook cleanup fails, the elif skips the independent backlog/busy rollback, leaving the provisional task metadata and busy generation behind. Always attempt both cleanup operations and combine their failure status.

🔧 Fix applied.
✅ Re-checked - no issues remain.

⚠️ **Test** - 1 warning
  • 🚨 tests/fm-send-inbox-doorbell-live-e2e.test.sh:342 - The real AGY 1.2.2 canonical lifecycle guard fails reproducibly at widths 80 and 220 after the control interrupt because the composer does not return to a proven empty state within the guard’s bound; width 120 passes. This blocks demonstrating the required interrupt/composer safety contract across tested pane geometries.
  • ⚠️ tests/fm-composer-matrix-live-e2e.test.sh:280 - The aggregate composer guard also exited 1 because installed Claude and Codex sessions were blocked by unrelated trust/review dialogs; the AGY-specific composer cases passed.
  • 🚨 live validation verdict: no-go (5 of 9 scenarios were driven live against the product); failed: Repeat the canonical AGY lifecycle at supported pane widths 80 and 220 and observe the composer return to proven empty after interruption.
  • Live validation: ❌ no-go - 5 of 9 scenarios driven live against the product
Scenario Result Live Evidence
Dispatch an AGY crewmate or scout with the verified launch profile and reject unsupported secondmate use. ⏸️ untested no The prior payload cited only non-live test commands for this scenario and did not establish a live result against the real product.
Start a real AGY 1.2.2 session and identify it through the ANTIGRAVITY_AGENT=1 child marker. ✅ pass live AGY liveness and marker live output
Generate firstmate-owned AGY hooks, observe busy/idle transitions, and retire hook artifacts safely. ⏸️ untested no The prior payload cited only non-live test commands for this scenario and did not establish a live result against the real product.
Leave real single-line and multiline AGY drafts unsent and observe pending classification without submission or overwrite. ✅ pass live AGY composer live output; bin/fm-test-run.sh tests/fm-composer-lib.test.sh; bin/fm-test-run.sh tests/fm-send-inbox.test.sh
Send a real AGY inbox doorbell and observe the worker act on the instruction and acknowledge it. ✅ pass live AGY doorbell live output; env -u ANTIGRAVITY_AGENT FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=120 bin/fm-test-run.sh tests/fm-send-inbox-doorbell-live-e2e.test.sh
Interrupt a busy AGY session with unconfirmed cancellation, then clear a pending draft and exit safely. ✅ pass live AGY lifecycle width-120 output; bin/fm-test-run.sh tests/fm-control.test.sh
Repeat the canonical AGY lifecycle at supported pane widths 80 and 220 and observe the composer return to proven empty after interruption. ❌ fail live env -u ANTIGRAVITY_AGENT FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=80 bin/fm-test-run.sh tests/fm-send-inbox-doorbell-live-e2e.test.sh; same command at width 220, twice
Force fresh AGY hook cleanup to fail and observe provisional metadata and busy state still roll back. ⏸️ untested no The prior payload cited only a non-live test command for this scenario and did not establish a live result against the real product.
Dispatch an AGY candidate with unreadable quota windows and observe eligibility with disclosed uncertainty. ⏸️ untested no The prior payload cited only a non-live test command for this scenario and did not establish a live result against the real product.
  • bin/fm-test-run.sh tests/fm-composer-lib.test.sh
  • bin/fm-test-run.sh tests/fm-backlog-atomicity.test.sh
  • bin/fm-test-run.sh tests/fm-spawn-dispatch-profile.test.sh
  • bin/fm-test-run.sh tests/fm-control.test.sh
  • bin/fm-test-run.sh tests/fm-teardown.test.sh
  • bin/fm-test-run.sh tests/fm-quota-choose.test.sh
  • bin/fm-test-run.sh tests/fm-busy-adapter-wiring.test.sh
  • bin/fm-test-run.sh tests/fm-send-inbox.test.sh
  • env -u ANTIGRAVITY_AGENT FM_HARNESS_LIVENESS_DRIFT=1 FM_HARNESS_LIVENESS_DRIFT_AGY_MARKER=1 bin/fm-test-run.sh tests/fm-harness-liveness-drift-live-e2e.test.sh
  • env -u ANTIGRAVITY_AGENT FM_COMPOSER_MATRIX_LIVE=1 bin/fm-test-run.sh tests/fm-composer-matrix-live-e2e.test.sh
  • env -u ANTIGRAVITY_AGENT FM_SEND_INBOX_LIVE_E2E=1 FM_SEND_INBOX_LIVE_HARNESSES=agy FM_SEND_INBOX_LIVE_TIMEOUT=240 bin/fm-test-run.sh tests/fm-send-inbox-doorbell-live-e2e.test.sh
  • env -u ANTIGRAVITY_AGENT FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=120 bin/fm-test-run.sh tests/fm-send-inbox-doorbell-live-e2e.test.sh
  • env -u ANTIGRAVITY_AGENT FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=80 bin/fm-test-run.sh tests/fm-send-inbox-doorbell-live-e2e.test.sh
  • env -u ANTIGRAVITY_AGENT FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=220 bin/fm-test-run.sh tests/fm-send-inbox-doorbell-live-e2e.test.sh twice
  • git status --short --branch

🔧 Fix applied.
1 warning still open:

  • ⚠️ live validation verdict: inconclusive (3 of 6 scenarios were driven live against the product); untested: AGY hook wiring, rollback, teardown isolation, raw-launch handling, and secondmate refusal behave correctly, AGY composer and control paths preserve multiline drafts, unknown interrupts, and safe exit clearing, AGY quota candidates remain eligible with disclosed unmeasurable headroom
  • Live validation: ⚠️ inconclusive - 3 of 6 scenarios driven live against the product
Scenario Result Live Evidence
AGY hook wiring, rollback, teardown isolation, raw-launch handling, and secondmate refusal behave correctly ⏸️ untested no The prior payload identified a targeted portable runner but explicitly marked this scenario live=false, so it did not establish a live product result.
AGY composer and control paths preserve multiline drafts, unknown interrupts, and safe exit clearing ⏸️ untested no The prior payload identified a targeted portable runner but explicitly marked this scenario live=false, so it did not establish a live product result.
AGY quota candidates remain eligible with disclosed unmeasurable headroom ⏸️ untested no The prior payload identified a targeted portable runner but explicitly marked this scenario live=false, so it did not establish a live product result.
An end user runs a complete AGY worker lifecycle; spawn, doorbell, interrupts, Stop, exit, and teardown all succeed ✅ pass live Lifecycle evidence at widths 80, 120, and 220
An end user leaves an unsent AGY draft and encounters an ambiguous blank shell pane; drafts remain pending and unknown input defers injection ✅ pass live agy-composer-matrix-2026-09-12.txt
A real AGY 1.2.2 process is supervised as alive and its ANTIGRAVITY_AGENT=1 child marker is detected ✅ pass live agy-liveness-marker-2026-09-12.txt
  • bin/fm-test-run.sh --per-script-timeout-secs 180 tests/fm-composer-lib.test.sh tests/fm-busy-adapter-wiring.test.sh tests/fm-control.test.sh tests/fm-tmux-agent-liveness.test.sh tests/fm-quota-choose.test.sh tests/fm-send-inbox.test.sh tests/fm-teardown.test.sh
  • FM_COMPOSER_MATRIX_LIVE=1 bash tests/fm-composer-matrix-live-e2e.test.sh
  • FM_HARNESS_LIVENESS_DRIFT=1 FM_HARNESS_LIVENESS_DRIFT_AGY_MARKER=1 FM_LIVE=1 bash tests/fm-harness-liveness-drift-live-e2e.test.sh
  • FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=80 bash tests/fm-send-inbox-doorbell-live-e2e.test.sh
  • FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=120 bash tests/fm-send-inbox-doorbell-live-e2e.test.sh
  • FM_AGY_LIFECYCLE_LIVE_E2E=1 FM_AGY_LIFECYCLE_TMUX_WIDTH=220 bash tests/fm-send-inbox-doorbell-live-e2e.test.sh
🔧 **Document** - 1 issue found → auto-fixed ✅
  • 🚨 docs/verification/agy.md:413 - Final-tip live evidence for the new post-doorbell idle-and-empty settle assertion is still unavailable; recorded AGY 1.2.2 runs predate this guard change.

🔧 Fix applied.
✅ Re-checked - no issues remain.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ linter found issues (exit code 1)

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: first look on fork PR #4327 (Adityarajkishan).

Head f33546d6727c570e89661ac9167074a907cd7de2 vs main 76d44055d81060. MERGEABLE / UNSTABLE. Author not blocked. Large verified agy crewmate/scout adapter (spawn/send/control/composer/busy/hooks/backends wiring, quota eligibility-with-warning, portable + live guards, verification docs). workflow-zero.

Attestation: MATCH (body head_sha = tip f33546d6…).

Contract-class: opt-in — harness=agy selected explicitly; stock unconfigured path unchanged; secondmate refused; quota path only affects agy when present as a dispatch-profile candidate (remains eligible with disclosed unmeasurable headroom).

VISION.md per-rule

  • One captain, one interface — aligns (another verified worker option).
  • Authority is explicit and never inferred — aligns (opt-in harness; secondmate refused).
  • Scripts own the mechanics, agents own the judgment — aligns (adapter scripts + measured verification docs).
  • A restart is a non-event — aligns (scoped hook teardown/rollback; no new captain authority).
  • Delegation with a spine — aligns (draft-safe composer; conservative interrupts; refuse unsafe markers).
  • The fleet outlives any vendor — aligns (agy as another harness; contracts to measured signals).
  • Scope — aligns.

Overlaps: open agy adapters #4200 (this pass), #4086 (CONFLICTING), #3858 (MERGEABLE/CLEAN; older sibling) — leave siblings; no competing port from triage.

CI/NM: First-time fork tip runs approved this pass after diff review: CI 34720394528, Require no-mistakes 34720394507 (were action_required). Merge-eligible N until tip CI/NM green. waiting-ci. Firstmate flag: no.

Security FYI (tip only, not waiting-captain): launch uses --dangerously-skip-permissions (same class as other unattended adapters); firstmate-owned hook roots outside the worktree with scoped rollback; raw-launch reserved-marker refusals present.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: closing as leftover after overlapping agy adapter #4200 landed (squash 35761484). Thank you @Adityarajkishan — really appreciate the thorough verification work on this surface; the competing adapter path is what closed it, not the quality of the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants