Skip to content

feat(dispatch): reapply Antigravity quota preflight before spawn - #1445

Open
Ospeto wants to merge 1 commit into
kunchenguid:mainfrom
Ospeto:fm/fm-reapply-quota-track
Open

feat(dispatch): reapply Antigravity quota preflight before spawn#1445
Ospeto wants to merge 1 commit into
kunchenguid:mainfrom
Ospeto:fm/fm-reapply-quota-track

Conversation

@Ospeto

@Ospeto Ospeto commented Aug 1, 2026

Copy link
Copy Markdown

Summary

Reapplies the Antigravity quota-preflight track onto upstream firstmate (origin/main), restoring the deterministic preflight check before task worktree, backend endpoint, or task metadata creation.

Upstream Comparison & Changes

  • bin/fm-spawn.sh:
    • Added header documentation detailing the Antigravity quota preflight contract.
    • Tracked raw launch command invocations (RAW_LAUNCH=1).
    • Implemented process-group bounded antigravity_preflight() using native Perl process-group supervision (setpgrp(0,0), pipe streaming, byte limits, and alarm cancellation).
    • Exit 0 preserves requested model/effort. Exit 1 (exhausted accounts) updates model to cockpit/gpt-5.6-luna at high effort (and replaces or appends raw launch flags on raw launch). Unrecognized exit codes or timeout exit 124 refuse spawn with secret-safe diagnostics.
  • docs/architecture.md & docs/configuration.md:
    • Added authoritative specification for Antigravity quota preflight under Dispatch Profiles.
  • tests/fm-spawn-dispatch-profile.test.sh:
    • Added targeted tests (totaling 43 tests) covering exit 0, scout profiles, exit 1 Luna fallback, raw launch embedded replacement, secret-safe errors, missing/non-executable checker, process-group timeouts, forked checkers, large output (>8KB), space-containing state paths, and non-Antigravity bypass.

Review & Verification

  • Obtained read-only @oracle review of the diff and test evidence (Oracle approved).
  • All 43 tests in tests/fm-spawn-dispatch-profile.test.sh passed cleanly.
  • tests/fm-lint.test.sh passed clean.
  • git diff --check clean.

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.

1 participant