Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/github/install-tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
10 changes: 10 additions & 0 deletions supabase/migrations/20260625120000_engine_fugu.sql
Original file line number Diff line number Diff line change
@@ -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'));
17 changes: 17 additions & 0 deletions tests/contract/install-tracker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"<!doctype html>\n<html><head></head><body>\n<h1>Hi</h1>\n</body></html>\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",
Expand Down
Loading