Skip to content

fix(ai): remove secret-tool/agy binary dependencies from antigravity + vibe credential paths (#1825 remainder) #1964

Closed

Description

@developing-today

Remainder of #1825 — remove the binary dependencies from the antigravity + vibe credential paths

Filed as the routed implementation follow-up of #1825 (re-triage of queue task 10989, 2026-11-08). #1825 stays open as the audit record; this issue owns the implementation.

Status of #1825's slices

"ensure this will be the last time we have to run a binary Command for a provider"

No provider may depend on running a binary command for auth. Amending the doctrine to sanction these exceptions (option d) is ruled out as a standalone answer. Per-provider mechanics are the fleet's, under that constraint.

Gap on current main (684598b, verified x2 2026-11-08)

  • packages/ai/src/providers/antigravity-auth.ts:156-164 — every credential load execFiles secret-tool lookup service gemini username antigravity (15s timeout).
  • packages/ai/src/providers/antigravity-auth.ts:175-270 — findAgyBinary() + binaryIntel() extract OAuth client-secret candidates from the agy binary's bytes; refresh() (:316, :414) depends on them, so an expired token cannot refresh where the binary is absent.
  • packages/ai/src/providers/vibe-auth.ts:118-131 — tier-4 resolution execFiles secret-tool lookup. This is the deployed tier: the fleet config keeps MISTRAL_API_KEY out of the server env (vibe provider: native wire-protocol emulation of the Mistral Vibe binary (no ACP host, no subprocess) #1653).
  • packages/ai/src/quota/providers/antigravity.ts:1,124 — imports execFile from node:child_process and execFiles secret-tool (graceful null).

Chosen no-spawn route (specified in triage)

  1. Keyring reads move in-process at all three sites: read the Secret Service keyring via a D-Bus client binding in-process (session bus, org.freedesktop.secrets), deleting every child_process/execFile use. If a D-Bus client proves infeasible in the Bun runtime, the fallback route is a provisioned credential-file tier read in place (the claude-code/commandcode pattern — file read only, zero spawns) made the deployed default, with the subprocess keyring tier removed. Either way: no child process is spawned.
  2. Antigravity refresh without the agy binary: the OAuth client secret is provisioned at sign-in time into the provider's own credential store (credential-file field or env ANTIGRAVITY_OAUTH_CLIENT_SECRET); findAgyBinary/binaryIntel byte extraction is removed from the refresh path.
  3. Deployed-tier behavior preserved: the vibe door still resolves its keyring sign-in key in the fleet configuration where MISTRAL_API_KEY is absent from the server env.

Acceptance

  • Grep for child_process / Bun.spawn / execa over packages/ai/src/{providers,protocols,route} returns zero files.
  • Credential resolution for both doors works (or fails with the documented naming error) with secret-tool and agy absent from PATH, and spawns no child process.
  • Antigravity refresh succeeds with no agy binary present, given a provisioned client secret.
  • Regression tests cover the no-binary path for both doors; existing antigravity-auth / vibe-auth tests keep passing; packages/ai typecheck clean.
  • No credential value is logged, copied, or persisted anywhere new (read-in-place discipline).

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    on Nov 8, 2026
  2. dezren39 commented on Nov 8, 2026

    @dezren39

    🤖 Agent note · queued by triage task 10989 (resume, attempt 2)

  3. dezren39 commented on Nov 8, 2026

    @dezren39

    Intake review

    Fleet monitor intake pass (2026-11-07 run).

  4. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    effort/mMedium: expected under 1 day of work
    app/aiPackage: ai (pkgs/ or apps/ in this repo)
    work/assignedAn agent holds this item via the queue (claimed task)
    queue/claimedA queue worker has claimed the task for this item
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 8, 2026
  5. dezren39 commented on Nov 8, 2026

    @dezren39

    agent-note:v1
    state: picked-up
    queue: repo-health-opencode-pilot
    task: 11785 (small_fix, worker repo-worker-opencode, lane 3fe37e8a-c61b-419c-9e97-769ecd264d5d)
    by: openchamber-scheduled-lane
    at: 2026-11-08T17:43:02Z

    Claimed and revalidated against fresh GitHub state: #1964 and parent audit #1825 are OPEN; no hard-stop labels are present; no matching open PR was found. Related PR #1844 is MERGED. I am starting local investigation of the no-spawn credential route; no credentials will be read or logged.

  6. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedA queue worker has claimed the task for this item
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/aiPackage: ai (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)queue/parkedQueue task is parked (waiting on CI, time, or an event)status/parkedDeliberately paused with a recorded resume conditionwork/assignedAn agent holds this item via the queue (claimed task)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions