Repository navigation
Conversation
a4f4227 to
67449a7
Compare
Recover scoped transcript, terminal approvals, and WSL support on current main. Keep hook-server authority, captured-grid rules, quiescence, and current journals. Negotiate Antigravity reads and subscriptions on desktop, web, and mobile. Credits #15773, #21660, #21776, and #24141. Co-authored-by: haoliangli <haoliangli@users.noreply.github.com> Co-authored-by: sojiro-o <53679703+sojiro-o@users.noreply.github.com>
1d40ab2 to
e3c4ff7
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (21)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe changes add Antigravity transcript discovery, decoding, and journal import for native chat, including WSL namespace checks and transcript ordering. Runtime capability checks gate desktop and mobile chat reads and subscriptions. The runtime also recognizes terminal approval screens and publishes validated permission updates. Renderer changes integrate Antigravity into chat view selection, live status, and local cancellation handling. Documentation and fixtures describe transcript formats, terminal captures, readiness results, and verification limits. Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to The new screen tests are likely to block the PR lint job. Address the anti-slop violations and confirm CI passes before merging. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Session, terminal identity, and freshness checks limit exposure. However, command approval cards now depend on recognized terminal text rather than independently authenticated requests, and the final approval action’s freshness guarantees remain unverified. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 32.31% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 65 functions across 62 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
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.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- Antigravity transcript decoder and readers — a new JSONL decoder (user, planner, tool-step records) wired into full reads, tails, and legacy journal import;
transcriptPosition(fromstep_index) breaks timestamp ties in projection; no turn lifecycle is emitted, so host hook status stays authoritative. - Execution-namespace isolation — the canonical provider-session store derives each session's owning WSL distro, and id-based resolution is confined to that guest; guest hook paths stay authoritative and never fall through to a native id match.
- Command approvals — a runtime publisher recognizes the captured agy menu and publishes Allow/Deny into the canonical agent-status store, fenced by revision, incarnation, terminal handle, and restored-row state; the idle-composer clear is held to three seconds.
- Chat view, transport, and Stop — capability-negotiated
native-chat.antigravity.v1gating on desktop/web/mobile, guarded local interrupt inference after acknowledged delivery, and initial-view gating that keeps unassociated sessions in Terminal. - Docs and recorded fixtures — reference docs plus sanitized macOS 1.2.14 and historical Windows 1.2.7 approval recordings.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: fec2d46c-e94b-4899-879a-ce3d5bae2d0d
📒 Files selected for processing (81)
docs/reference/antigravity-native-chat.mddocs/reference/antigravity-readiness-evidence.mdmobile/src/session/mobile-antigravity-chat-capability.test.tsmobile/src/session/mobile-antigravity-chat-capability.tsmobile/src/session/use-mobile-native-chat-session.tssrc/main/agent-hooks/server-ingest-antigravity-screen.test.tssrc/main/agent-hooks/server/server-ingest-antigravity-screen.tssrc/main/agent-hooks/server/server-ingest-terminal.tssrc/main/ai-vault/session-scanner-antigravity-parser.tssrc/main/ai-vault/session-scanner-antigravity-paths.tssrc/main/daemon/serialize-grid-transcript-replay.test.tssrc/main/native-chat/__fixtures__/antigravity/README.mdsrc/main/native-chat/__fixtures__/antigravity/live-timestamp-tie.jsonlsrc/main/native-chat/__fixtures__/antigravity/tool-turn.jsonlsrc/main/native-chat/agent-session-journal/journal-legacy-import-antigravity.test.tssrc/main/native-chat/agent-session-journal/journal-legacy-import.tssrc/main/native-chat/antigravity-session-file-resolution.tssrc/main/native-chat/host-readable-transcript-path.tssrc/main/native-chat/native-chat-execution-namespace.test.tssrc/main/native-chat/native-chat-execution-namespace.tssrc/main/native-chat/session-file-resolver-antigravity-wsl.test.tssrc/main/native-chat/session-file-resolver.tssrc/main/native-chat/transcript-line-decoders-antigravity.tssrc/main/native-chat/transcript-line-decoders.antigravity.test.tssrc/main/native-chat/transcript-line-decoders.tssrc/main/native-chat/transcript-reader-antigravity.test.tssrc/main/native-chat/transcript-reader.tssrc/main/native-chat/transcript-tail-reader.tssrc/main/orcad/orcad-entry.tssrc/main/runtime/__fixtures__/antigravity-macos-1-2-14-command-approval.meta.jsonsrc/main/runtime/__fixtures__/antigravity-macos-1-2-14-command-approval.txtsrc/main/runtime/__fixtures__/antigravity-windows-approved-command-running.meta.jsonsrc/main/runtime/__fixtures__/antigravity-windows-approved-command-running.txtsrc/main/runtime/__fixtures__/antigravity-windows-command-allow-key.meta.jsonsrc/main/runtime/__fixtures__/antigravity-windows-command-allow-key.txtsrc/main/runtime/__fixtures__/antigravity-windows-command-approval.meta.jsonsrc/main/runtime/__fixtures__/antigravity-windows-command-approval.txtsrc/main/runtime/__fixtures__/antigravity-windows-command-cancelled.meta.jsonsrc/main/runtime/__fixtures__/antigravity-windows-command-cancelled.txtsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-macos-1-2-14-command-approval@agent.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-macos-1-2-14-command-approval@unknown.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-approved-command-running@agent.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-approved-command-running@unknown.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-allow-key@agent.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-allow-key@unknown.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-approval@agent.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-approval@unknown.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-cancelled@agent.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-cancelled@unknown.jsonsrc/main/runtime/agent-status-store-wiring.test-fixture.tssrc/main/runtime/antigravity-command-approval-screen.tssrc/main/runtime/antigravity-command-approval-transcript.test.tssrc/main/runtime/antigravity-screen-permission-publisher.test.tssrc/main/runtime/antigravity-screen-permission-publisher.tssrc/main/runtime/orca-runtime-on-pty-data.tssrc/main/runtime/orca-runtime-on-pty-exit.tssrc/main/runtime/orca-runtime-preserved-branch-cleanup.tssrc/main/runtime/orca-runtime-state-fields.tssrc/main/runtime/orca-runtime-visible-snapshot-preview.tssrc/main/startup/main-process-runtime-service.tssrc/renderer/src/components/native-chat/native-chat-antigravity-capability.test.tssrc/renderer/src/components/native-chat/native-chat-antigravity-capability.tssrc/renderer/src/components/native-chat/native-chat-antigravity-interrupt.test.tssrc/renderer/src/components/native-chat/native-chat-antigravity-interrupt.tssrc/renderer/src/components/native-chat/native-chat-availability.test.tssrc/renderer/src/components/native-chat/native-chat-live-status.test.tssrc/renderer/src/components/native-chat/native-chat-live-status.tssrc/renderer/src/components/native-chat/native-chat-runtime-contract.tssrc/renderer/src/components/native-chat/native-chat-session-transport.tssrc/renderer/src/components/native-chat/use-native-chat-interactive-send.tssrc/renderer/src/components/settings/NativeChatSupportedAgents.test.tsxsrc/renderer/src/lib/native-chat-initial-view-mode.test.tssrc/renderer/src/lib/native-chat-initial-view-mode.tssrc/shared/agent-session-resume.test.tssrc/shared/agent-session-resume.tssrc/shared/native-chat-agent-support.test.tssrc/shared/native-chat-agent-support.tssrc/shared/native-chat-transcript-projection.test.tssrc/shared/native-chat-transcript-projection.tssrc/shared/native-chat-types.tssrc/shared/protocol-version.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The only delta since the prior pullfrog review is commit 09169edd, which is test-only CI integration (11 files, +144/−0, no production code):
- Readiness-census baselines — added the ten missing baselines for the five new Antigravity recordings across the agent and unknown panes, satisfying the catalog's one-baseline-per-pane invariant.
- Serialize round-trip expectation — recorded
antigravity-windows-command-approvalin the pre-existing-failure allowlist and pinned its four exactshrink-growfailure signatures, so the tolerated count cannot hide an extra regression.
The four prior review threads (all minor, non-blocking) are anchored to production lines this commit does not touch, so they remain open.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Honor Chat preferences when a CLI conversation becomes associated, refuse transcript reads for other hosts, and preserve approval and quiet-timer liveness across terminal replacement and exit.
Check the tab's supplied connection against the existing namespace resolver before transcript reads, including when no canonical owner row is available. Keep WSL reads in their guest and reject conflicting ownership constraints.
There was a problem hiding this comment.
Important
The three review-repair commits land cleanly — all four prior findings are resolved — but two of the new Antigravity approval tests call Reflect.get to reach private publisher fields, which fails the repo's required audit:anti-slop lint step.
Reviewed changes
The delta since pullfrog's prior review (09169edd, commits fea561e1d0 → 6057c2a39b → merge 907b75fce5 → bebdb53d64) repairs the earlier findings and adapts the approval reader to current main:
- Refused remote-owned transcript reads — a new
antigravityConnectionNamespacethrows for any non-WSL, non-null connection id, and the ungatednativeChatTranscriptIncludesPathprovenance read now forwards the tab's connection and derived WSL distro, so an SSH/paired-owned id can no longer resolve a same-named native transcript. - Fixed the quiet-timer lifecycle —
cancelQuietTimerclears an already-armed timer before arming a new one, and pending-read identity guards prevent a forgotten PTY incarnation from publishing or rescheduling for its replacement. - Removed the dead
screen.headlessWriteChainclause from the approval publisher'sisCurrentfence. - Made the opt-in Chat preference reachable —
providerSessionIdis threaded through the AI Vault resume and sleeping-session resume paths, plus a newantigravityInitialChatViewPatchstore slice that opens Chat when the host first supplies a CLI conversation id while preserving explicit, unconfirmed-restored, and IDE-reference cases. - Reused the ruled-screen reader —
readScreenRuledLineswas renamed toreadRuledScreen(now returningalternateScreen), with captured approval publication and liveness tests.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
| const publisher: unknown = Reflect.get(runtime, 'antigravityScreenPermissions') | ||
| const deps: unknown = | ||
| publisher && typeof publisher === 'object' ? Reflect.get(publisher, 'deps') : null |
There was a problem hiding this comment.
The new tests reach into private publisher fields with Reflect.get, which the repo's anti-slop/no-reflect-get rule rejects (config/oxlint-anti-slop.json), so pnpm run audit:anti-slop — the step the lint job runs in .github/workflows/pr.yml — fails with three errors (here at lines 24 and 26). The same rule fires on src/main/runtime/antigravity-approval-screen-liveness.test.ts:31.
The idiomatic fix in this repo is a line-specific // oxlint-disable-next-line anti-slop/no-reflect-get -- <reason> (see e.g. src/renderer/src/components/tab-bar/terminal-tab-activity-status.test.ts:414), or exposing a typed test accessor on the runtime/publisher instead of reading deps off the instance.
Technical details
# `no-reflect-get` fires on the new approval tests
## Affected sites
- `src/main/runtime/antigravity-ruled-screen-publication.test.ts:24` — `Reflect.get(runtime, 'antigravityScreenPermissions')`
- `src/main/runtime/antigravity-ruled-screen-publication.test.ts:26` — `Reflect.get(publisher, 'deps')`
- `src/main/runtime/antigravity-approval-screen-liveness.test.ts:31` — `Reflect.get(this.antigravityScreenPermissions, 'deps')`
## Evidence
- `oxlint --config config/oxlint-anti-slop.json <files> --deny-warnings` → `Found 0 warnings and 3 errors`.
- The anti-slop test-file override only turns off `no-module-mocking`; `no-reflect-get` stays `error` for `*.test.ts`.
- `audit:anti-slop` scans all of `src config tests mobile` (not changed lines only), so this reds the lint job on the PR head.
## Required outcome
- `pnpm run audit:anti-slop` passes on the PR head, with the test still exercising the production publisher closure.|
Tested #24627 on Windows + WSL2 (Ubuntu 26.04) at head Works on WSL
Bug: the first message sent from Chat in a new session shows twice Likely cause: with no prior messages, Possible fix: when the boundary is the local send time, allow tolerance for second-granular transcript clocks (e.g. compare against |
Preserves accepted Antigravity Chat source from @haoliangli (#15773) and @sojiro-o (#24141). Carries runtime-owned Chat association and authoritative ruled-screen publication onto fixed main 752871b.
Antigravity records first turns at whole seconds, leaving a millisecond composer echo visible below later turns. Publish optional source precision and use it when matching local sends and seeded launch prompts; retain strict transcript boundaries and exact matching when precision is absent. Credits @sojiro-o/#25117 for the first-send diagnosis and proposed regression. Retains the Antigravity Chat contributions from @haoliangli/#15773 and @sojiro-o/#24141 without changing accepted readiness or capture assets. Co-authored-by: sojiro-o <53679703+sojiro-o@users.noreply.github.com>
Compose main 2b3b692 with the complete Chat feature and ed05 source-clock repair. Preserve provider step order and incoming split-reasoning order; remove a duplicated import introduced by the automatic merge and test the combined ordering contract. Retains credits for @sojiro-o/#25117 and #24141 and @haoliangli/#15773; original author objects and measured coauthor trailers remain unchanged.
|
Closing as superseded: Antigravity Chat shipped on the ACP server path (#28595) instead of this terminal-transcript design. |



ELI5
Antigravity can show its conversation in Orca’s experimental Chat view while continuing in its terminal. The first sent prompt and a seeded launch prompt now stop showing a duplicate echo when the recorded conversation uses whole-second timestamps. The shared native launcher also stops scheduling descendant cleanup once a compiler has closed, and its regression test waits for the output producer to exit before deciding how many bytes should arrive.
What Changed
Preserve the complete terminal-backed Chat feature: transcript reads and live tails, Chat/Terminal switching, command approval cards, and guarded local Stop. New launches stay in Terminal until the host supplies a real conversation identity. WSL lookup stays in the canonical session’s distro; paired/web/mobile transcript transport checks
native-chat.antigravity.v1.The first-send repair marks observed Antigravity
created_atrows with optional source-clock precision. Pending sends and launch prompts use that declaration; precise Claude/Codex clocks and existing authoritative ID/time boundaries remain exact. One additive main merge preserves both recorded step order and main’s split-reasoning order, with a regression for their combination. Repeated sends, pagination, cancellation, rejected writes, approval revisions, and host ownership remain on existing paths.The native-build change repairs both the shared test oracle and a launcher cleanup defect exposed by the stricter checks. The launcher uses its existing child-ownership map to refuse new reap timers after a compiler closes; a late output-drain resume can no longer restart cleanup for a closed process group. The test counts bytes accepted by synchronous pipe writes, verifies actual producer exit with ESRCH, and checks exact text and ordering after a consumer stall longer than the unchanged reap timeout. Delayed-completion and closed-stream-resume regressions cover both boundaries.
Why
Extend existing transcript, delivery, and canonical status machinery instead of adding a provider or guessing that every timestamp ending in
.000is coarse. Credit @sojiro-o’s #25117 diagnosis and #24141 Chat contribution, and @haoliangli’s original #15773 work. Original objects and credit trailers are retained; the measured sojiro-o email is53679703+sojiro-o@users.noreply.github.com. No haoliangli email was inferred.The hosted native job received 1,590 lines while its test expected a premature snapshot of 1,444. The same controlled failure reproduces on this feature head and CI main
58bd15fa3ffa65942d94aee8137e35c27f4368c8; waiting for the output producer fixes it there. Correct the producer-owned byte oracle rather than changing launcher timeouts, discarding output, or accepting a retry. A subsequent stricter run exposed late stream resumes rearming descendant reaping after the compiler had closed. That separate production defect reproduces on both feature and CI main, and the existing ownership-map guard fixes it there. The launcher continues to own compiler groups and cancellation; deadlines and compiler output are unchanged.Linked Issue
Refs #20157 and #25116. Original #25117 remains open; this draft is not merge approval or a closure request.
Visual Proof
Historical actual authenticated agy 1.2.14 macOS screenshots/video from the earlier accepted builds remain below. Those observations used the separately reviewed POSIX hook companion #24596; they are not new-head native or rendered acceptance. Earlier Allow/Deny used
272a263f6a1514089df064ecaee5b43962216cf5; later Chat/Stop evidence used source8ce5899dc0e82993027c2d2b352e0900c5db185bcomposed with that companion asaaa1a949dec67532eba938a290996705f330bba7. No new Electron/CDP before/after comparison was produced for this publication.https://github.com/user-attachments/assets/2bb0b535-aea2-436a-88a9-4875162c984f
https://github.com/user-attachments/assets/252b2f31-3869-49df-9ac1-d64ee24af451
https://github.com/user-attachments/assets/4f99be7f-283c-441e-905a-99ca8c9db989
https://github.com/user-attachments/assets/b8d4a362-b222-41f3-84e3-aafd14f1f9ce
antigravity-chat-stop-fixed-short.webm
Testing
Published head:
36304d58bd346967b243403d97033da0153b965d. Two-file shared native launcher/test repair above0ac1783fc216945aedf7ddc876adcdd90b9fe107, through initial checked test commitb7d38d5d8880cfc9e58e891cedfb45eecaeaba9b; the feature source and 104 accepted assets are unchanged. Prior head:0ac1783fc216945aedf7ddc876adcdd90b9fe107. Test-only anti-slop correction above2c64a3289aca39df6b49c075397b8a0d2d863833. Composed once with main2b3b692d29102b87389042a5614d80b93956d5e0(fetched 2026-10-04 07:39:43 UTC).Historical 2c64 macOS source checks: 50 files / 730 tests plus 10 additional files / 150 tests pass, including captured first-send/seeded-launch precision, live and retained sessions, repeated occurrences, PTY queue/cancel/rejection, host routing, approvals, OpenCode reasoning/paging, and full captured transcript serialization. The three-case independent reviewer scaffold was exercised but remains unchanged and uncommitted. Full
pnpm tc, changed-code quality, intended-file formatting, andgit diff --checkpass; normal Husky commit hooks ran. The initial composition failed on a duplicate prompt-registry import; removing only the duplicate fixed typecheck and the affected suite. Raw failure logs are retained locally.The hosted static-analysis job 111391661369 in PR Checks run 37186900167 failed
audit:anti-slopon three reflective test-property reads (synthetic merge sourcec2d51275aabcb81e422cfa224c9493954dfa456b, merging 2c64 into main 2b3); ordinary lint passed. The same three errors were reproduced locally before correction. Checked object/property narrowing now reads the original production screen reader and validator, preserving callback identity, terminal ownership, timers, stale permission and screen-generation assertions without casts, stubs, suppressions or production changes. On this repair: six focused publication/approval suites / 47 tests, fullpnpm tc, normalaudit:anti-slop, changed-quality, intended formatting and diff checks pass; normal commit hooks ran and tested/committed patch bytes match. Fresh hosted CI and independent acceptance of this new head remain pending; earlier failed logs remain retained.Native-build CI causal repair
On macOS / Node 24.20.0 / physical pnpm 12.8.1 with
ORCA_BACKGROUND_LAUNCH=1:pnpm test config/scripts/build-native-for-platform.test.mjs config/scripts/macos-computer-helper-owner-loss-processes.test.mjs config/scripts/macos-computer-helper-owner-loss-group-recovery.test.mjs config/scripts/pnpm-cli-invocation.test.mjs: four files / 69 tests pass, including 23 native-launcher cases and the existing 25 owner-loss controls. Counts overlap prior runs.pnpm tc,pnpm run check:code-quality:changed, targeted oxlint/format, diff checks, and normal Husky lint-staged hooks pass. Both tested files match the committed bytes.58bd15fa3ffa65942d94aee8137e35c27f4368c8; their respective repairs pass on that main comparator. Restoring old early-snapshot ordering fails the final exact-byte oracle. Temporarily disabling pause-aware descendant reaping also fails by losing accepted bytes.No assertions, production deadlines, output volume, existing tests, or platform skips were weakened. The simulated Linux/Windows entry checks run on macOS and do not establish native execution on those platforms. The controlled compiler schedule models the causal ordering, not the hosted machine's exact scheduler. Fresh hosted CI, independent new-head review, actual Swift/native packaging, provider authentication, and rendered acceptance remain pending.
Review
Accepted ed05 author and independent source reviews remain historical evidence. The prior 2c64 review additionally checked the four overlapping files, combined ordering, metadata preservation, strict pending boundaries, live/retained ownership fences, approval incarnation/revision checks, and capability routing. All 104 named accepted capture/census/sidecar assets retain their hashes; they are not 104 raw PTYs. Historical accounting remains 291 paths / 495 fixtures / 162 unique curated paths including that 104 subset.
Agent skill upstream boundary
Notes
Protocol 3 / minimum 2 remains unchanged; precision is an optional field on existing JSON messages, with no new opcode. New clients against older hosts retain exact matching and the known coarse-clock limitation. A future producer using precise aligned ISO
created_atneeds a decoder-contract update; same-second identity without an earlier authoritative boundary still depends on the established session/source association.Fresh Electron rendering, authenticated provider/native acceptance, Windows, WSL, Linux/glibc or musl, direct SSH, paired runtimes, and mobile devices remain unverified on this head. Direct SSH stays Terminal; paired Stop inference remains unsupported. No real provider credentials, keychain/global profiles, paid calls, or visible/focused apps were used. Full lint/build/packaging and hosted CI remain for ROOT’s review; no workflow rerun, approval, ready transition, auto-merge, merge, or predecessor closure is authorized.
Checklist