diff --git a/lib/github/install-tracker.ts b/lib/github/install-tracker.ts index efb6ba2b..b9401c56 100644 --- a/lib/github/install-tracker.ts +++ b/lib/github/install-tracker.ts @@ -71,6 +71,12 @@ const COMMON_MONOREPO_CANDIDATES: string[] = [ "apps/web/app/layout.jsx", "apps/web/src/app/layout.tsx", "apps/web/src/app/layout.jsx", + // Static-HTML sites under apps/web (no framework — e.g. a hand-written + // public/index.html served by a static host). The code-search fallback + // is flaky for freshly-pushed repos, so probe these explicitly. + "apps/web/index.html", + "apps/web/public/index.html", + "apps/web/src/index.html", ]; const BRANCH_PREFIX = "crawlproof/install-stats-tracker"; diff --git a/supabase/migrations/20260625120000_engine_fugu.sql b/supabase/migrations/20260625120000_engine_fugu.sql new file mode 100644 index 00000000..f8d88091 --- /dev/null +++ b/supabase/migrations/20260625120000_engine_fugu.sql @@ -0,0 +1,10 @@ +-- Add Sakana Fugu as a paid OpenAI-compatible audit engine. +-- The engine landed in code (lib/credits.ts, app/actions/runAudit.ts, +-- worker/index.ts) but no migration extended audits_engine_check, so any scan +-- that ran 'fugu' failed with "new row for relation \"audits\" violates check +-- constraint \"audits_engine_check\"". + +alter table public.audits drop constraint if exists audits_engine_check; +alter table public.audits + add constraint audits_engine_check + check (engine in ('rule', 'spec', 'dns', 'links', 'vu1nz', 'claude', 'openai', 'gemini', 'qwen', 'kimi', 'deepseek', 'perplexity', 'fugu')); diff --git a/tests/contract/install-tracker.test.ts b/tests/contract/install-tracker.test.ts index 6919430a..140a70fa 100644 --- a/tests/contract/install-tracker.test.ts +++ b/tests/contract/install-tracker.test.ts @@ -73,6 +73,23 @@ describe("install tracker candidate discovery", () => { expect(github.searchRepoCode).toHaveBeenCalledOnce(); }); + it("finds a static apps/web/public/index.html without code search", async () => { + github.files.set( + "apps/web/public/index.html", + "\n\n

Hi

\n\n", + ); + + const candidates = await findInstallCandidates({ + token: "token", + owner: "owner", + repo: "repo", + }); + + expect(candidates.map((c) => c.path)).toContain( + "apps/web/public/index.html", + ); + }); + it("does not double-prefix common monorepo candidates when rootPath is set", async () => { github.files.set( "apps/web/src/app/layout.tsx",