Antigravity campaign argv isolation and doctor readiness capability check (#721) - #724
Conversation
…heck (#721) - Every maintained Antigravity campaign invocation now includes --new-project and excludes continue/resume semantics (--continue, -c, --conversation, --resume, -i, --prompt-interactive) for project boundary isolation. - The adapter checks installed agy capability via check_antigravity_readiness before writing prompt input or invoking provider work, failing closed if --new-project is unsupported. - Doctor campaign readiness invokes the same bounded capability check and excludes Antigravity from ready_providers when unsupported, surfacing actionable metadata without claiming an unverified minimum agy version. - Remediation directs users to upgrade to an agy CLI whose --help exposes --new-project. - Strict evidence privacy preserves help output, paths, prompts, stdout/stderr, auth, and secrets out of evidence and doctor details. - Add focused adapter and doctor readiness unit tests and update documentation. Closes #721 CODE_MOWER_BUILDER:antigravity
| output = (completed.stdout or "") + (completed.stderr or "") | ||
| has_new_project = (completed.returncode == 0) and ("--new-project" in output) | ||
| except (subprocess.TimeoutExpired, OSError): | ||
| has_new_project = False |
There was a problem hiding this comment.
💡 Edge Case: Readiness check fails closed if agy --help exits nonzero
check_antigravity_readiness requires completed.returncode == 0 before scanning for --new-project, so any agy build whose --help exits with a nonzero status (some CLIs print help then exit nonzero) is reported as missing_new_project_capability even when the flag is present. This would falsely exclude a capable Antigravity CLI from campaigns and doctor readiness. If the flag's presence in output is the real signal, consider not gating on returncode (or accepting a broader set of return codes) for the help probe.
Detect the flag from help output regardless of --help exit status.:
output = (completed.stdout or "") + (completed.stderr or "")
has_new_project = "--new-project" in output
Was this helpful? React with 👍 / 👎
Codex audit (merge-authority lane)Head SHA: Codex Audit: PASS Summary: No actionable correctness regressions or blocking issues were identified. Findings: none. |
Claude audit (merge-authority lane)Head SHA: Claude Audit: BLOCKED Summary: Antigravity Findings:
|
|
Claude’s exact-head P2 is fixed at
Verification: 86 focused adapter/doctor tests passed; Ruff, compileall, and diff checks passed. Remote Python/package checks will run on this head. Re-requesting both peer audits because the builder is Antigravity. |
| env=probe_env, | ||
| ) | ||
| output = (completed.stdout or "") + (completed.stderr or "") | ||
| has_new_project = (completed.returncode == 0) and ("--new-project" in output.split()) |
There was a problem hiding this comment.
💡 Edge Case: output.split() token match may reject valued flag help
Changing the probe from substring match to "--new-project" in output.split() correctly rejects substrings like --new-project-template, but it also requires --new-project to appear as a whitespace-delimited token. If agy's --help renders the option with an attached value (e.g. --new-project=<name>), split() yields the token --new-project=<name>, no match is found, and readiness fails closed even though the flag is supported — blocking Antigravity campaigns. Verify agy renders the flag bare (as the argv builder assumes); if valued forms are possible, match the token prefix (e.g. check for a token equal to --new-project or starting with --new-project=).
Was this helpful? React with 👍 / 👎
Codex audit (merge-authority lane)Head SHA: Codex Audit: BLOCKED Summary: The capability check fails closed but misclassifies probe failures as unsupported capability, producing incorrect diagnostics and remediation. Findings:
|
Claude audit (merge-authority lane)Head SHA: Claude Audit: PASS Summary: PR adds a bounded, offline-safe Findings:
|
|
Pushed exact-head fix
Re-requesting both required peer audits for this new head. |
Code Review 👍 Approved with suggestions 0 resolved / 2 findingsAdds Antigravity campaign argv isolation with Two minor edge cases to verify: 💡 Edge Case: Readiness check fails closed if
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
Codex audit (merge-authority lane)Head SHA: Codex Audit: PASS Summary: No blocking issues were found. Findings: none. |
Claude audit (merge-authority lane)Head SHA: Claude Audit: PASS Summary: PR adds --new-project argv isolation for Antigravity campaign runs plus a bounded agy --help capability probe (check_antigravity_readiness) used by both the adapter (before writing any prompt or invoking the provider) and doctor readiness (before declaring the provider ready). Logic is fail-closed on missing/failed/timed-out probes, strips secrets from the probe environment, and matches the documented contract in release-qualification.md. Test coverage is thorough (argv shape, isolation flags absent, capability pass/fail/timeout/OSError paths, privacy of evidence, doctor integration for enabled/disabled/optional providers). No P0/P1/P2 correctness, security, or contract-violation issues found. Findings:
|
Closes #721 (child of #709).
CODE_MOWER_BUILDER:antigravity
Summary of Changes
Antigravity Campaign Argv Isolation (
--new-project):--new-projecttobuild_antigravity_argvinsrc/code_mower/campaign_adapters.py.--sandbox,--dangerously-skip-permissions,--add-dir, prompt-file transport, and--print-timeout.--continue,-c,--conversation,--resume,-i,--prompt-interactive).tests/test_campaign_adapters.pyasserting presence of--new-projectand absence of continue/resume flags.Adapter Capability Check:
check_antigravity_readiness(agy_bin, *, runner, timeout_seconds)andcheck_antigravity_new_project_capability(...)insrc/code_mower/campaign_adapters.py.run_campaign_adapterinvokescheck_antigravity_readinessbefore writing the prompt file (campaign.prompt-input.txt) or executing provider work, failing closed if--new-projectis unsupported.Doctor Campaign Readiness Integration:
src/code_mower/doctor_checks/adoption.py,check_adoption_campaign_readinesscallscheck_antigravity_readinessfor maintained Antigravity adapters (or whencapability_runneris provided).ready_providersand emitsdoctor.campaign.adapterwithstatus=STATUS_WARNand actionable metadata (capability: "new_project",required_flag: "--new-project",error: "missing_new_project_capability").Upgrade agy CLI to a version whose --help exposes --new-project.without claiming an unverified minimum version.Strict Evidence Privacy Preservation:
"agy"is recorded in detail, not full binary path), auth tokens, and secrets are strictly excluded from check details, error messages, and returned readiness dictionaries.Documentation:
docs/release-qualification.mdprovider matrix and isolation section with--new-projectguarantee, capability pre-check behavior, and privacy boundaries.Verification
python3 -m unittest tests.test_campaign_adapters)python3 -m unittest tests.test_doctor_campaign_readiness)ruff check src testspassed with 0 errorspython3 scripts/privacy_scan.pypassed