Skip to content

bun run build fails in checkGaGraph when repository is cloned into a directory named antigravity #46

Closed

Description

@mv2sa

Problem

In packages/opencode/scripts/build-tui.ts, checkGaGraph tests each file in graph.files against GA_FORBIDDEN_SOURCE:

const GA_FORBIDDEN_SOURCE =
  /\/(?:rpc|plugin|antigravity|hooks)\/|\/ga\/(?:server|rpc)\/|.../

Because graph.files holds absolute filesystem paths and GA_FORBIDDEN_SOURCE is unanchored, cloning the repository into a directory named antigravity (for example /workspace/antigravity) causes every file path to match /\/antigravity\// on the checkout directory segment.

Reproduction

  1. Clone the repository into a folder named antigravity:
    git clone https://github.com/cortexkit/antigravity-auth.git antigravity
    cd antigravity
    bun run build
  2. packages/opencode build fails immediately in checkGaGraph:
    error: graph.ga: forbidden GA source /.../antigravity/packages/opencode/src/common-auth-embedded/quota/codec.js
        at checkGaGraph (packages/opencode/scripts/build-tui.ts:165:17)
    

Fix

Slice audited file paths from the last /src/ segment before testing GA_FORBIDDEN_SOURCE so parent checkout directory names above src/ cannot trigger false positives while forbidden paths under src/ (/src/antigravity/, /src/rpc/, /src/plugin/, etc.) remain blocked.

Activity

  1. agauth-alfonso commented on Oct 26, 2026

    @agauth-alfonso

    Thanks for the clear report and the fix PR. We're reproducing it against the current code and will reply here with the result.

  2. agauth-alfonso commented on Oct 26, 2026

    @agauth-alfonso

    Thanks for the clear report and reproduction. Confirmed: building from a checkout directory named antigravity fails in checkGaGraph, because the forbidden-path pattern is matched against the absolute path. The same happens for parent directories named plugin, hooks or rpc, and a separate check in the same script has the same problem with a parent directory named tools. We'll follow up in #47.

  3. agauth-alfonso commented on Oct 27, 2026

    @agauth-alfonso

    Fixed in 3.0.14 (https://github.com/cortexkit/antigravity-auth/releases/tag/v3.0.14) by #47: the build's checks now compare paths relative to the package root, so a checkout under a folder named antigravity, plugin, hooks or rpc builds. Thanks again for the report and the fix.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions