Skip to content

fix(source-control): fix Antigravity commit message generation args and prompt delivery - #18138

Closed
veryluckyguy wants to merge 3 commits into
stablyai:mainfrom
veryluckyguy:fix/antigravity-commit-message-args
Closed

veryluckyguy wants to merge 3 commits into
stablyai:mainfrom
veryluckyguy:fix/antigravity-commit-message-args

Conversation

@veryluckyguy

@veryluckyguy veryluckyguy commented Sep 2, 2026 •

Copy link
Copy Markdown

ELI5

Fix Antigravity (agy) commit message generation so prompts are correctly passed on the command line, dynamic models from agy models are properly parsed, and the default fallback model is updated to Gemini 3.8 Flash.

What Changed

  • Changed Antigravity spec promptDelivery from 'stdin' to 'argv'.
  • Updated buildArgs to pass ['--print', prompt, '--sandbox', '--model', model].
  • Added singletonOptions: [['--model', '-m']] to avoid duplicate model flags when recipe or user args are provided.
  • Updated parseAntigravityModels to parse tab-separated <slug>\t<Display Name> output and skip status/header lines such as Fetching available models.... Added TSDoc comments.
  • Updated static fallback models to Gemini 3.8 Flash (gemini-3.8-flash-medium as default).
  • Added and updated unit tests covering spec, model parser, and commit-message planning.

Why

  1. agy's text print mode strictly expects the prompt via --print <prompt> on argv. The CLI's flag parser requires an explicit argument for --print and does not accept prompts via stdin in text mode (streaming stdin is only supported for NDJSON via --input-format stream-json). Passing --print without an inline prompt caused agy to consume the subsequent --sandbox flag as its prompt value and exit code 2.
  2. agy models outputs Fetching available models... followed by tab-separated model entries (<slug>\t<Display Name>). The previous line parser did not handle headers or tab separation.
  3. Fallback Gemini 3.5 models are deprecated and rejected by current Antigravity CLI releases.

Linked Issue

Fixes #

Visual Proof

N/A (Backend argument construction and CLI stdout parsing logic; no UI layout changes)

Testing

  • I manually tested these changes locally (verified agy 1.1.x flag parsing, --print <prompt> behavior, and agy models output parsing)
  • Automated tests added/updated (commit-message-agent-spec.test.ts, commit-message-plan.test.ts)

AI Disclosure

Developed with the assistance of an AI coding assistant.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Antigravity prompt delivery on argv mirrors existing secondary agents (Cursor, Kimi, Copilot) in src/shared/commit-message-agent-specs-secondary.ts.
  • Text mode in agy requires --print <prompt> on argv because agy's CLI flag parser requires a prompt argument and fails with exit code 2 if omitted.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 2aaf185c-9fc8-42c9-9c43-75bc3b3cc01e

📥 Commits

Reviewing files that changed from the base of the PR and between e97aaf5 and 49d0075.

📒 Files selected for processing (2)
  • src/shared/commit-message-agent-specs-secondary.ts
  • src/shared/commit-message-model-parsers.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/shared/commit-message-model-parsers.ts
  • src/shared/commit-message-agent-specs-secondary.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Antigravity specification now passes prompts through argv with --print <prompt>, adds model-option aliases, and uses Gemini 3.8 Flash High, Medium, and Low entries. The model parser supports tab-separated listings and skips blank or fetching lines. Tests verify model parsing, argument construction, the default model, and commit-message planning with binary agy and no stdin payload.

Merge Risk: ⚪ Minimal · up to 49d00

This updates Antigravity commit-message invocation to pass prompts through argv and refreshes model parsing and defaults. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary Antigravity commit-message argument and prompt-delivery fix.
Description check ✅ Passed The description is complete and aligned with the template. It explains the change, rationale, testing, scope, and checklist status. The Linked Issue field remains incomplete because it contains only `…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 0767c994-6b1a-40a2-9e70-cca9b844f61b

📥 Commits

Reviewing files that changed from the base of the PR and between f37d2fe and 04f4905.

📒 Files selected for processing (3)
  • src/shared/commit-message-agent-spec.test.ts
  • src/shared/commit-message-agent-specs-secondary.ts
  • src/shared/commit-message-plan.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

promptDelivery: 'argv',
buildArgs: ({ prompt, model }) => [
'--print',
prompt,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

printf '%s\n' '--- applicable repository guidance ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -type f -name '*.md' -maxdepth 3 -print | sort
printf '%s\n' '--- changed file structure ---'
ast-grep outline src/shared/commit-message-agent-specs-secondary.ts
printf '%s\n' '--- changed hunk and nearby definitions ---'
sed -n '180,245p' src/shared/commit-message-agent-specs-secondary.ts
printf '%s\n' '--- direct process-runner references ---'
rg -n -C 3 'buildArgs|spawn|exec|Command|args' src/shared/commit-message-agent-specs-secondary.ts src/shared/commit-message-agent-spec.ts src/shared/tui-agent.ts

Repository: stablyai/orca

Length of output: 13906


🏁 Script executed:

printf '%s\n' '--- repository-wide conventions ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions/repo-wide.md
printf '%s\n' '--- direct consumers of the agent spec contract ---'
rg -n -C 5 'promptDelivery|buildArgs|buildSecondaryCommitMessageAgentSpecs|SecondaryAgentSpecDeps' src

Repository: stablyai/orca

Length of output: 50370


🏁 Script executed:

printf '%s\n' '--- files that consume commit-message specs or select prompt delivery ---'
rg -l 'CommitMessageAgentSpec|promptDelivery === .stdin|promptDelivery === .argv|spec\.buildArgs|buildArgs\(' src --glob '*.ts' --glob '*.tsx' | sort
printf '%s\n' '--- exact delivery and process-launch branches ---'
rg -n -C 8 'CommitMessageAgentSpec|promptDelivery === .stdin|promptDelivery === .argv|spec\.buildArgs|buildArgs\(' src/shared src/main src/renderer/src/lib --glob '*.ts' --glob '*.tsx' | head -500

Repository: stablyai/orca

Length of output: 38428


🏁 Script executed:

printf '%s\n' '--- planner contract and returned command ---'
sed -n '1,245p' src/shared/commit-message-plan.ts
sed -n '245,345p' src/shared/commit-message-plan.ts
printf '%s\n' '--- execution-path references ---'
rg -n -C 6 'stdinPayload|planCommitMessage|CommitMessagePlan|commit.message.*plan|commitMessage.*plan|runCommitMessage|commit-message' src --glob '*.ts' --glob '*.tsx' | grep -E 'stdinPayload|planCommitMessage|CommitMessagePlan|spawn|exec|command|args|binary|commit-message' | head -350

Repository: stablyai/orca

Length of output: 50369


🏁 Script executed:

printf '%s\n' '--- command-label construction and consumers ---'
sed -n '55,105p' src/renderer/src/lib/source-control-generation-plan.ts
rg -n -C 5 'commandLabel' src --glob '*.ts' --glob '*.tsx'
printf '%s\n' '--- local execution of the planned argv ---'
sed -n '1,225p' src/main/text-generation/source-control-local-process.ts
printf '%s\n' '--- process launcher contract ---'
sed -n '1,130p' src/main/text-generation/source-control-agent-launch.ts

Repository: stablyai/orca

Length of output: 35246


🏁 Script executed:

printf '%s\n' '--- shared spawn wrapper ---'
fd -t f -a 'run-process*' src
sed -n '1,220p' src/shared/child-process/run-process.ts
printf '%s\n' '--- commit prompt source ---'
sed -n '1,55p' src/shared/commit-message-prompt.ts
printf '%s\n' '--- remote execution boundary ---'
sed -n '1,130p' src/main/text-generation/source-control-remote-generation.ts

Repository: stablyai/orca

Length of output: 14013


Sensitive Data Exposure (CWE-200): Exposure of Sensitive Information to an Unauthorized Actor

Reachability: External · Exploitability: Moderate

Document Antigravity prompt exposure.

agy receives the complete commit-message prompt through argv. The operating system can expose argv to local process inspection, even though Orca does not log the arguments. Use stdin if agy supports it; otherwise document this limitation in the provider threat model.


🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

printf '%s\n' '--- applicable repository conventions ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- changed hunk ---'
git diff -- src/shared/commit-message-agent-specs-secondary.ts
printf '%s\n' '--- surrounding source ---'
sed -n '180,245p' src/shared/commit-message-agent-specs-secondary.ts
printf '%s\n' '--- directly bound definitions and callers ---'
rg -n -C 3 'singletonOptions|commit-message-agent-specs-secondary|prompt' src/shared/commit-message-agent-specs-secondary.ts src 2>/dev/null | head -240

Repository: stablyai/orca

Length of output: 50371


🏁 Script executed:

printf '%s\n' '--- repository conventions and learnings ---'
for f in /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/*/*.md; do
  printf '\n--- %s ---\n' "$f"
  head -80 "$f"
done
printf '%s\n' '--- diff ---'
git diff -- src/shared/commit-message-agent-specs-secondary.ts
printf '%s\n' '--- source context ---'
sed -n '190,240p' src/shared/commit-message-agent-specs-secondary.ts

Repository: stablyai/orca

Length of output: 50369


🏁 Script executed:

git diff -- src/shared/commit-message-agent-specs-secondary.ts
sed -n '200,235p' src/shared/commit-message-agent-specs-secondary.ts
rg -n -C 4 'singletonOptions|execFile|spawn|agy|commit-message-agent-specs-secondary' src

Repository: stablyai/orca

Length of output: 50370


🏁 Script executed:

set -eu
printf '%s\n' '--- files defining prompt delivery and agent launch ---'
rg -l 'promptDelivery|buildArgs|singletonOptions' src/shared src/main src/cli | head -80
printf '%s\n' '--- exact prompt-delivery references ---'
rg -n -C 5 'promptDelivery|buildArgs\(' src/shared src/main src/cli --glob '*.ts' --glob '*.tsx' | head -320
printf '%s\n' '--- command-process API references near agent launch ---'
rg -n -C 6 'spawn\(|execFile\(|Command|argv|args' src/main src/shared --glob '*.ts' --glob '*.tsx' | rg -n -C 2 'agent|prompt|buildArgs|spawn|execFile|argv|args' | head -360

Repository: stablyai/orca

Length of output: 50369


🏁 Script executed:

set -eu
printf '%s\n' '--- commit-message plan types and construction ---'
sed -n '1,360p' src/shared/commit-message-plan.ts
printf '%s\n' '--- commit-message agent spec contract ---'
sed -n '1,220p' src/shared/commit-message-agent-spec.ts
printf '%s\n' '--- consumers of the generated plan ---'
rg -n -C 8 'stdinPayload|plan\.args|commitMessage|buildCommit|build.*Plan|CommitMessagePlan' src/main src/shared src/renderer src/cli --glob '*.ts' --glob '*.tsx' | head -500

Repository: stablyai/orca

Length of output: 50369


🏁 Script executed:

set -eu
printf '%s\n' '--- text-generation files ---'
find src/main/text-generation -maxdepth 1 -type f -print
printf '%s\n' '--- executor symbols ---'
rg -n -C 8 'execute.*Plan|execute.*plan|stdinPayload|plan\.args|spawn|execFile|child_process' src/main/text-generation --glob '*.ts'
printf '%s\n' '--- relevant executor source ---'
for f in src/main/text-generation/*.ts; do
  if rg -q 'stdinPayload|plan\.args|spawn|execFile' "$f"; then
    printf '\n--- %s ---\n' "$f"
    sed -n '1,280p' "$f"
  fi
done

Repository: stablyai/orca

Length of output: 50369


🏁 Script executed:

set -eu
printf '%s\n' '--- local execution call ---'
rg -n 'spawn|stdinPayload|executeLocal|executeRemote|CommitMessagePlan' src/main/text-generation/commit-message-text-generation.ts
sed -n '1,220p' src/main/text-generation/commit-message-text-generation.ts
printf '%s\n' '--- remote non-interactive execution contract ---'
rg -n -C 10 'agent\.execNonInteractive|execNonInteractive|stdinPayload|plan\.args' src/main src/relay src/shared --glob '*.ts' | head -420

Repository: stablyai/orca

Length of output: 41766


🏁 Script executed:

set -eu
printf '%s\n' '--- spawnSourceControlAgent ---'
sed -n '1,320p' src/main/text-generation/source-control-agent-launch.ts
printf '%s\n' '--- prompt construction and size limits ---'
rg -n -C 8 'truncate|MAX|limit|stagedPatch|basePrompt|prompt' src/main/text-generation/source-control-text-generation-requests.ts src/shared/commit-message-prompt.ts src/shared/commit-message-generation.ts src/shared/pull-request-generation.ts --glob '*.ts'
printf '%s\n' '--- relay spawn implementation ---'
sed -n '130,300p' src/relay/agent-exec-handler.ts

Repository: stablyai/orca

Length of output: 43485


🏁 Script executed:

set -eu
printf '%s\n' '--- Windows spawn adapter ---'
rg -n -C 12 'function getSpawnArgsForWindows|export .*getSpawnArgsForWindows|getSpawnArgsForWindows' src/main/win32-utils.ts src/shared/child-process src/main --glob '*.ts' | head -240
printf '%s\n' '--- shared process launcher ---'
rg -n -C 12 'export function spawnProcess|function spawnProcess|spawn\(' src/shared/child-process/run-process.ts
sed -n '1,220p' src/shared/child-process/run-process.ts

Repository: stablyai/orca

Length of output: 31870


🌐 Web query:

Microsoft CreateProcess command line maximum length 32767 characters official documentation

💡 Result:

The official Microsoft documentation for the CreateProcess function confirms that the maximum length of the lpCommandLine string is 32,767 characters, including the Unicode terminating null character [1][2][3]. This limitation originates from the underlying UNICODE_STRING structure, which uses a 16-bit unsigned short (USHORT) to store the buffer length, resulting in a maximum value of 65,535 bytes, or 32,767 Unicode characters [4][5]. It is important to note that while the CreateProcess API itself supports this 32,767-character limit, other components or methods of executing processes may impose stricter constraints: - CMD.EXE: Command processors are often limited to 8,192 characters [4]. - ShellExecute/Ex: These functions are subject to significantly lower limits, such as INTERNET_MAX_URL_LENGTH (approximately 2,048 characters) [4]. If you need to pass data exceeding this 32,767-character limit to a process, you must use an alternative mechanism, such as a file, pipe, or shared memory, rather than the command line [4].

Citations:


Guard oversized agy prompts before spawning.

When the prompt exceeds Windows CreateProcess’s 32,767-character command-line limit, planCommitMessageGeneration passes it in plan.args, and spawnSourceControlAgent forwards it to node:child_process.spawn; process creation can fail before agy starts. The prompt builder permits a 200,000-character staged diff. Add an agy-supported non-argv fallback or reject oversized prompts before spawning.

Comment on lines +230 to +234
{ id: 'Gemini 3.7 Flash (High)', label: 'Gemini 3.7 Flash (High)' },
{ id: 'Gemini 3.7 Flash (Medium)', label: 'Gemini 3.7 Flash (Medium)' },
{ id: 'Gemini 3.7 Flash (Low)', label: 'Gemini 3.7 Flash (Low)' }
],
defaultModelId: 'Gemini 3.5 Flash (Medium)'
defaultModelId: 'Gemini 3.7 Flash (Medium)'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- repository conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target diff ---'
git diff -- src/shared/commit-message-agent-specs-secondary.ts
printf '%s\n' '--- parser implementation ---'
cat -n src/shared/commit-message-model-parsers.ts | sed -n '210,265p'
printf '%s\n' '--- target definitions ---'
cat -n src/shared/commit-message-agent-specs-secondary.ts | sed -n '205,242p'

Repository: stablyai/orca

Length of output: 6070


🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- agy references and declared version ---'
rg -n -i --glob '!node_modules' --glob '!dist' --glob '!build' '(^|[^[:alnum:]])agy([^[:alnum:]]|$)|antigravity|Gemini 3\.7|modelDiscovery' .
printf '%s\n' '--- package and lockfile references ---'
rg -n -i 'antigravity|agy|Gemini 3\.7' package.json package-lock.json pnpm-lock.yaml yarn.lock bun.lockb 2>/dev/null || true

Repository: stablyai/orca

Length of output: 50370


🌐 Web query:

What exact model IDs does the Antigravity CLI agy models command emit for Gemini 3.7 Flash High Medium Low?

💡 Result:

The Antigravity CLI (agy) command agy models lists the available models using technical model IDs (slugs) [1][2]. For the Gemini 3.7 Flash series, the exact model IDs emitted by the command are [1][3]: gemini-3.7-flash-high gemini-3.7-flash-medium gemini-3.7-flash-low These technical slugs are used to specify models in headless environments (e.g., using the --model flag) [1]. Note that while the CLI also displays these models with human-readable names (e.g., "Gemini 3.7 Flash (High)") in some contexts, the actual machine-readable identifiers required for programmatic use are the slugs listed above [1][2][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- model discovery, merging, and selection ---'
rg -n -C 5 'modelDiscovery|defaultModelId|parseAntigravityModels|models:' src/shared src/main src/renderer/src --glob '*commit-message*' --glob '*.ts' | head -300
printf '%s\n' '--- relevant repository conventions ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions/repo-wide.md

Repository: stablyai/orca

Length of output: 24314


🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- discovery result and fallback flow ---'
rg -n -C 8 'modelDiscovery|modelSource|defaultModelId|discoveredModels|discovery' src/shared src/main src/renderer/src --glob '*.ts' \
  | rg -B 8 -A 8 'commit|modelDiscovery|defaultModelId|discoveredModels|discovery' \
  | head -240
printf '%s\n' '--- selection implementation ---'
cat -n src/shared/source-control-ai-model-selection.ts | sed -n '1,190p'

Repository: stablyai/orca

Length of output: 27394


Use Antigravity model slugs for the seed and default

agy models emits gemini-3.7-flash-high, gemini-3.7-flash-medium, and gemini-3.7-flash-low. Since parseAntigravityModels preserves each line as the model ID and buildArgs passes the selected ID to --model, the current display names can make the default invocation fail. Replace the three seeded IDs and defaultModelId with the emitted slugs, while keeping the display names as labels.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ The args fix is correct and well-tested, but two things are worth confirming before merge: the argv delivery tradeoff for large diffs, and the unrelated model-version bump.

Reviewed changes

  • Prompt delivery stdin → argv — the correct fix: agy's --print consumes the next token, so the old ['--print', '--sandbox', ...] swallowed --sandbox as the prompt and exited code 2. The prompt is now attached inline, matching the CLI contract.
  • singletonOptions: [['--model', '-m']] — mirrors the Codex/OpenCode pattern so recipe/user args override the generated model flag instead of stacking it.
  • Gemini 3.5 → 3.7 Flash — static fallback models list and defaultModelId bumped, and the list reordered to High/Medium/Low.
  • Tests — updated spec assertions plus a new exact-args plan test; both suites pass locally (70 tests).

ℹ️ Nitpicks

  • The Gemini 3.5 → 3.7 bump and list reorder are unrelated to the args/prompt fix and fold a user-visible default change into a bugfix PR. Also unverified here: that -m is actually a valid agy alias for --model, and that Gemini 3.7 Flash (Medium) matches current agy models output (the dynamic list is what the UI actually shows).

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ The new parser changes are correct and well-tested, but the argv-length concern raised in the prior review is still unaddressed, so I'm not approving yet.

Reviewed changes

  • Tab-separated agy models parsing — parseAntigravityModels now skips Fetching available models... lines and splits <slug>\t<Display Name> output, using the display name as the model id/label (with a slug fallback for empty display names).
  • Model fallback bump — static models and defaultModelId moved from Gemini 3.7 Flash to 3.8 Flash.
  • Tests — added tab-separated and legacy single-column parser cases, and updated plan/spec assertions to 3.8.

⚠️ argv delivery still embeds the staged patch

Switching promptDelivery to argv means the full commit prompt — which embeds the staged diff, truncated only at a 200 KB budget — sits on the command line. On Windows the command line is capped at ~32 KB (and some SSH/POSIX paths are tighter), so large commits that previously flowed via stdin can now fail to spawn. The Codex/OpenCode specs keep stdin for exactly this reason, and promptDelivery's field comment still reads "Large diffs go via stdin to avoid argv limits." This was flagged in the prior review and the new commits don't touch it.

Technical details
# argv length limits for Antigravity prompt delivery

## Affected sites
- src/shared/commit-message-agent-specs-secondary.ts:218 — `promptDelivery: 'argv'`
- src/shared/commit-message-agent-specs-secondary.ts:219-225 — `buildArgs` embeds `prompt` inline

## Required outcome
- Confirm whether `agy --print` can read the prompt from stdin (the old form was `--print --sandbox ...` with stdin, which failed for an unrelated arg-parsing reason).
- If argv is the only delivery, confirm large-diff behavior on Windows/SSH is acceptable, or add a tighter truncation budget for argv delivery.

## Open questions for the human (optional)
- Does `agy --print` read stdin when no prompt argument follows the flag?

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@veryluckyguy

Copy link
Copy Markdown
Author

@pullfrog Regarding the argv delivery concern and your question ("Does agy --print read stdin when no prompt argument follows the flag?"):

I directly verified the agy CLI behavior:

  1. echo "..." | agy --print exits code 2 with flag needs an argument: -print (Go flag parser strictly requires an argument for --print).
  2. echo "..." | agy --print "" exits code 1 with Error: empty prompt. Usage: agy --print "your prompt here".
  3. echo "..." | agy --print - treats "-" as a literal text prompt rather than reading from stdin.
  4. Stdin is only supported in --input-format stream-json mode for NDJSON streaming, not for text print mode.

Therefore, promptDelivery: 'argv' via --print <prompt> is the only viable delivery mechanism for Antigravity, matching how Orca handles Cursor, Kimi, and Copilot in src/shared/commit-message-agent-specs-secondary.ts.

I have documented these constraints in the code comments and added JSDoc to parseAntigravityModels in commit 49d0075.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Verified — the argv delivery question is resolved.

The author's direct CLI verification confirms agy --print strictly requires an inline prompt argument in text mode and has no stdin fallback (stdin is NDJSON-only via --input-format stream-json). So promptDelivery: 'argv' with ['--print', prompt, '--sandbox', '--model', model] is the correct — and only — delivery mechanism, now consistent with Cursor, Kimi, and Copilot.

The earlier argv-length concern (large staged diffs on the command line) is a pre-existing limitation shared by the other argv-delivery secondary agents, not something introduced by this fix, and the constraint is now documented in the code comments. The docstrings added in 49d0075 also address the flagged docstring-coverage gap.

Non-blocking follow-up for a later PR: confirm agy --model accepts the display-name form the parser now prefers (Gemini 3.8 Flash (Medium)) rather than the <slug> — both are available in agy models output, and the parser currently favors the display name for --model.

No new issues found.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@nwparker

Copy link
Copy Markdown
Contributor

Review verdict: Do not merge as-is; superseded by #21606. The current source-control migration owns Antigravity model discovery, configured defaults, prompt delivery, and recipe overrides with newer authenticated macOS/Windows generation evidence.

@veryluckyguy

Copy link
Copy Markdown
Author

Closing as this change has been superseded and merged via #21606. Thank you!

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.

3 participants