From 65ea8b19bcd09495ace707117b01a39601c3a984 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Thu, 25 Jun 2026 01:00:48 +0000 Subject: [PATCH 1/2] fix(db): add 'fugu' to audits_engine_check constraint The Sakana Fugu engine (f341c77) was wired into the code (lib/credits.ts, app/actions/runAudit.ts, worker/index.ts) but shipped no migration to extend audits_engine_check, so any scan running 'fugu' failed with "new row for relation \"audits\" violates check constraint \"audits_engine_check\"". Already applied to prod (ywcizjsgrcmhgyplldac); this checks the migration in. Co-Authored-By: Claude Opus 4.8 --- supabase/migrations/20260625120000_engine_fugu.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 supabase/migrations/20260625120000_engine_fugu.sql 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')); From 1454be5cb70cba340b59d56c5ad494cd9a44c9ce Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Thu, 25 Jun 2026 01:00:53 +0000 Subject: [PATCH 2/2] fix(stats): install tracker into static apps/web/public/index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Static-HTML sites in a monorepo (no framework — e.g. a hand-written apps/web/public/index.html) were only discoverable via the code-search fallback, which is flaky for freshly-pushed repos. Probe the static index.html paths under apps/web explicitly so the GitHub installer opens the PR reliably (e.g. tronbrowser.dev). Co-Authored-By: Claude Opus 4.8 --- lib/github/install-tracker.ts | 6 ++++++ tests/contract/install-tracker.test.ts | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) 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/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",