Skip to content

Fix #1079: pass prompts as agy --print values - #1081

Merged
waleedkadous merged 10 commits into
cluesmith:mainfrom
mohidmakhdoomi:builder/bugfix-1079
Jun 20, 2026
Merged

Fix #1079: pass prompts as agy --print values#1081
waleedkadous merged 10 commits into
cluesmith:mainfrom
mohidmakhdoomi:builder/bugfix-1079

Conversation

@mohidmakhdoomi

Copy link
Copy Markdown
Collaborator

Summary

Correct Antigravity CLI argument ordering so Gemini consultations and the doctor probe deliver their intended prompts instead of option names.

Fixes #1079

Root Cause

agy 1.0.10 treats --print as a string-valued option. Codev placed --sandbox or --print-timeout immediately after it, so those option tokens became the prompt while the real consultation/probe text was left as a trailing positional argument.

Fix

  • Place all agy options first and append the final --print <prompt> pair in both consultation and doctor paths.
  • Assert prompt adjacency for direct prompts, pro, prompt files, folded structured content, large-prompt indirection, and the doctor probe.
  • Add a guarded real-agy 1.0.10 contract test.

Test Plan

  • Regression tests fail with the old ordering and pass with the fix
  • pnpm build
  • pnpm test -- --run (3339 passed, 48 skipped)
  • Guarded real-agy inline prompt and file-access tests
  • Built gemini, pro, and --prompt-file front doors return exact markers

@mohidmakhdoomi

Copy link
Copy Markdown
Collaborator Author

CMAP review

  • Gemini: APPROVE (HIGH) — no key issues.
  • Codex: APPROVE (HIGH) — no key issues.
  • Claude: unavailable because the Claude Code session limit was reached. The architect explicitly authorized proceeding without this lane and requested that the exception be documented.

All required GitHub CI checks pass on the current head.

@mohidmakhdoomi

Copy link
Copy Markdown
Collaborator Author

Architect Integration Review

Risk: Medium — 135 additions across 7 files, including shared consult and doctor command paths.

Result: No blocking integration issues found.

  • The implementation matches the agy 1.0.10 contract: options are assembled first and the prompt immediately follows --print.
  • Regression coverage verifies direct prompts, pro, prompt files, folded structured prompts, large-prompt indirection, and the doctor probe.
  • The doctor probe retains its 20-second print timeout.
  • A guarded real-agy test covers the argument contract.
  • Gemini and Codex returned APPROVE; the unavailable Claude lane was explicitly waived by the human due to the session limit.
  • All six checks passed on commit af60cb6. The final gate-status-only commit retriggered CI and those checks are currently running.

Architect review is approved, conditional on the current-head CI rerun remaining green and explicit human approval of the pr gate.


Architect integration review

@mohidmakhdoomi

Copy link
Copy Markdown
Collaborator Author

PR gate is human-approved and CI is green. The contributor account lacks merge permission; a repository maintainer is requested to merge this PR.

@waleedkadous waleedkadous 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.

Thank you for an excellent submission, Mohid. 🙏

Precise root cause, a minimal correct-by-construction fix at both call sites, and exactly the right test shape — asserting --print adjacency (the old tests were complicit in the bug) plus a guarded real-agy 1.0.10 contract test. This very likely revives the structured Gemini consult lane we've been routing around. Approved.

@waleedkadous
waleedkadous merged commit 16f4f83 into cluesmith:main Jun 20, 2026
6 checks passed
amrmelsayed added a commit that referenced this pull request Jun 20, 2026
…1081, by @mohidmakhdoomi)

Other-fixes bullet covering the argv-ordering bug that made every gemini
consult silently deliver --sandbox as the prompt. Substantial resolution
of the #1032 umbrella. External contributor (Mohid Makhdoomi, second
contribution after PR #953 in v3.2.0).

CHANGELOG.md (VSCode-specific) intentionally not updated: this is a CLI fix,
the VSCode extension does not bundle the consult code.
amrmelsayed added a commit that referenced this pull request Jun 20, 2026
Brings the post-v3.2.0 PRs (#1067, #1071, #1075, #1076, #1082, #1084, #1081)
into the accumulator branch so the cross-merge back into main is conflict-free.
amrmelsayed added a commit that referenced this pull request Jun 20, 2026
Brings the architect-curated release notes for v3.2.1 (4 substantive
sections + 1 Polish + 1 Other-fixes entry) into main:
- #1060 cross-file diff nav (PR #1067)
- #1053 typography tokens (PR #1071)
- #1066 sidebar auto-reveal (PR #1075)
- #1074 backlog issue-preview placement, Polish (PR #1076)
- #841 Add Architect UI, Cmd+K A picker (PR #1082)
- #1079 agy --print prompt-delivery fix, Other fixes (PR #1081 by @mohidmakhdoomi)

PR #1084 (issue #1072 refactor) intentionally omitted from changelog
per feedback_skip_changelog_for_pure_refactor.
amrmelsayed added a commit that referenced this pull request Jun 20, 2026
…s section

Two corrections to v3.2.1 release notes:
1. Mohid Makhdoomi has 5 prior PRs to Codev (#741, #904, #923, #953, #1081),
   not 2. Was incorrectly cited as 'second contribution' in v3.2.1 release
   summary and projectlist entry; now corrected to 'fifth contribution'.
2. The Contributors section was inadvertently left as the template
   placeholder during Step 2 of the v3.2.1 release. Now populated with
   the topic-first format matching v3.2.0 precedent, crediting
   @amrmelsayed for VS Code extension features across 6 PRs and
   @mohidmakhdoomi for the agy --print argv fix.
amustafa pushed a commit to amustafa/codev that referenced this pull request Jul 3, 2026
Two complementary fixes for the agy/Gemini consult lane, recovered from
in-progress work and rebased on top of the cluesmith#1081 argv-ordering fix:

- consult: prepend a read-only headless-mode constraint preamble to the
  agy prompt so it stops exploring dirs/git, activating local skills
  (e.g. google-antigravity-sdk), and wandering off-task — and is told to
  end with a parseable VERDICT line. Delivered on both the inline and
  large-prompt temp-file paths. (cluesmith#1032)
- porch: a consult that ran but produced no parseable VERDICT now defaults
  to COMMENT (non-blocking) instead of REQUEST_CHANGES, so a missing
  verdict no longer churns the porch review loop. (cluesmith#1033)
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.

consult: agy consumes --sandbox as the --print prompt due to invalid argv ordering

2 participants