Skip to content

fix(opencode): anchor checkGaGraph path check to /src/ so antigravity checkout dirs build - #47

Open
mv2sa wants to merge 1 commit into
cortexkit:mainfrom
mv2sa:fix/ga-graph-checkout-path
Open

mv2sa wants to merge 1 commit into
cortexkit:mainfrom
mv2sa:fix/ga-graph-checkout-path

Conversation

@mv2sa

@mv2sa mv2sa commented Oct 25, 2026

Copy link
Copy Markdown

Fixes #46

Summary

checkGaGraph in packages/opencode/scripts/build-tui.ts tests each audited file path against GA_FORBIDDEN_SOURCE (/\/(?:rpc|plugin|antigravity|hooks)\/|.../). Because graph.files contains absolute paths, cloning the repository into a directory named antigravity causes every file in the package to match /antigravity/ on the checkout folder name and fail bun run build.

Changes

  • Slice audited paths from the last /src/ segment before testing GA_FORBIDDEN_SOURCE, so directory names above src/ do not collide with package-internal forbidden directories.
  • Add regression coverage in packages/opencode/scripts/build-tui.test.ts (graph.ga_policy_refusals).

Verification

  • bun run build inside a checkout directory named antigravity/ (0 errors)
  • bun test --isolate packages/opencode/scripts/build-tui.test.ts -t "graph.ga_policy_refusals"
  • bun x @biomejs/biome check packages/opencode/scripts/build-tui.ts packages/opencode/scripts/build-tui.test.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Re-trigger cubic

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.

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

1 participant