fix(opencode): anchor checkGaGraph path check to /src/ so antigravity checkout dirs build
MV
19h ago+14+14+01234567890123456789-3-3-0123456789
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 testingGA_FORBIDDEN_SOURCE, so directory names abovesrc/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 buildinside a checkout directory namedantigravity/(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