Commitf0d13f9
docs: consolidate status tracking into STATUS.md
docs: consolidate status tracking into STATUS.md ROADMAP.md, CHANGELOG.md, and the AUDIT-2026-*.md chain had drifted out of sync with actual shipped state. Replace them with redirect stubs pointing to STATUS.md, the new single source of truth for what's shipped vs open. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
7 files changed+123−913f0d13f986075c2cf03724752fc1ab68cb7878070
7 changed files+123−938
ModifiedAUDIT-2026-06-10.md+4−217View fileUnifiedSplit
@@ -1,218 +1,5 @@
1# Gluecron Full-Platform Audit — 2026-06-10
1# Superseded — see [STATUS.md](./STATUS.md) (2026-07-17)
22
3**Branch:** `claude/site-audit-competitive-pctlwg` (from `main` @ `2436d1d`)
4**Method:** six parallel audit agents (repair flywheel, docs freshness, wiring/mechanics, design/UX, architecture/security, live market scan) + direct verification of every load-bearing claim (test suite, typecheck, migration runner, home-route render path).
5**Supersedes:** `AUDIT.md` (2026-05-16), `AUDIT-v2.md` (2026-05-16), `AUDIT_REPORT.md` (2026-05-13).
6
7---
8
9## 0. Executive summary
10
11**Verdict: the platform is real, broad, and largely wired — but three things stand between today and "confidently ahead of GitHub":**
12
131. **The repair flywheel is built but not closed.** Every schema, tier, and helper exists; the cache lookup and the outcome-feedback loop have **zero callers**. Until those ~5 wiring points land, every repeat failure costs a 3–5 s Claude call instead of a <100 ms cache hit, and the system learns nothing from its own fixes. This is the single highest-leverage build item on the board. (§3)
142. **Quality signal was red.** The suite had 28 failing tests + 5 errors and 2 TypeScript errors — all stale assertions left behind by the Landing-2030 reboot, plus Playwright specs leaking into `bun test`. **Fixed in this session: 2767 pass / 0 fail / 122 skip, `tsc` clean.** A green suite is table stakes for due diligence. (§1)
153. **Scale posture is single-node.** Repos on local disk, in-memory rate limiting, workflow runner spawning on the web node. Fine to ~5k repos / 100 concurrent users; documented fix path below. An acquirer's tech DD will find this in week one — better that our own audit says it first, with the plan attached. (§5)
16
17Design is genuinely on-brief (quiet, light-default, restrained violet — not cyberpunk), security fundamentals are strong (argv-array git calls, hashed tokens, AES-GCM secrets, sanitized markdown), and the June-2026 market scan says our MCP-native + self-hosted-AI-parity positioning is the most defensible wedge available. (§6, §7)
18
19---
20
21## 1. Verification mechanics (what was actually run)
22
23| Check | Before this session | After this session |
24|---|---|---|
25| `bun test` | 2758 pass / **28 fail / 5 errors** / 122 skip | **2767 pass / 0 fail / 0 errors** / 122 skip |
26| `bunx tsc --noEmit` | 2 errors (`health-score.test.ts` TS2367) | clean |
27| Lockfile | `bun.lock` missing `@playwright/test` | reconciled |
28
29**Root cause of the 28 failures — none were product breakage.** `GET /` now renders the self-contained `Landing2030Page` (`src/views/landing-2030.tsx`, wired at `src/routes/web.tsx:1865`), which does not include the master Layout CSS. Tests still asserted on the legacy `LandingPage` hero (`hero-primary-ctas`, dxt CTA, Live-now block), Layout design tokens on `/`, and the old `/status` degraded headline (`"Service degraded"` → now `"Degraded performance"` / `"Major outage"`, `src/routes/status.tsx:356`). All retargeted to the current contract (Layout assertions now hit `/help`). The 5 errors were Playwright `e2e/*.spec.ts` files crashing under Bun's runner; new `bunfig.toml` scopes `bun test` to `src/` (e2e stays on `bun run e2e`, VS Code extension suite on `bun test editor-extensions`).
30
31**Lesson to encode:** the Landing-2030 reboot shipped without running the suite, or shipped red. Gate enforcement should apply to our own repo first — that's the product's whole pitch.
32
33---
34
35## 2. Wiring & mechanics audit
36
37**Confidence: high. 188 of 190 route modules are mounted in `src/app.tsx`; all recently shipped AI features are fully wired** (ai-loop via the autopilot `ai-loop-sweep` task, AI Workspace `app.tsx:203`, cross-repo impact `app.tsx:199`, repo health `app.tsx:195`, NL search `app.tsx:167`, pair programmer `app.tsx:130` — each with its migration 0101–0104 present).
38
39Verified end-to-end: the 14-step `src/hooks/post-receive.ts` chain (auto-repair → intelligence → gates → semantic index → AI auto-issues → preview builds → dep scan → doc-drift → onboarding → cloud deploys → Crontech webhook (HMAC, 6-attempt backoff) → server targets → **self-deploy**). `scripts/self-deploy.sh` exists (15.5 KB, executable) and is invoked via `Bun.spawn` at `post-receive.ts:241-267`, gated on `SELF_HOST_REPO` + push to `refs/heads/main` — the CLAUDE.md "self-driven deploys" claim is true.
40
41Issues found:
42
43| # | Finding | Action |
44|---|---|---|
45| W1 | `src/routes/migration-assistant.tsx` exists but is never imported/mounted (superseded by `migrate.tsx`) | Delete in a cleanup block |
46| W2 | `src/lib/changelog-generator.ts` has zero importers (`ai-generators.ts generateChangelog` is the live path) | Delete in a cleanup block |
47| W3 | Migration prefixes duplicated (0077×3, 0078×2) and 0085 missing | **Safe — verified directly:** `src/db/migrate.ts:137` tracks applied migrations by full filename, so each file applies exactly once. **Do NOT renumber** — renaming an applied file would re-run it. Convention only: next migrations continue from 0105. |
48| W4 | 6 env vars used in `src/lib/config.ts` were undocumented | `.env.example` updated this session |
49| W5 | ~20 TODO markers in src/, none blocking | No action |
50
51---
52
53## 3. The repair flywheel (owner priority) — built, not closed
54
55Owner vision: record everything; at 10k–20k repos, recognize recurring breakages and fix them deterministically **in seconds, without an AI call**, reserving AI for novel failures.
56
57**Status: the architecture is ~80 % present and ~0 % operational as a learning loop.**
58
59What exists and works:
60- `repair_flywheel` table (`drizzle/0039_repair_flywheel.sql`) — failure SHA-256 fingerprint, `repair_tier` (cached/mechanical/ai-sonnet/human), outcome, `cache_hit_count`, cross-repo `is_public_pattern`, and the hot-path composite index `(repo_id, failure_signature, outcome)`. The data model is exactly right for the vision.
61- Tier 1 mechanical repairs (`src/lib/auto-repair-mechanical.ts`) — lockfile drift, formatting, import-order classification + worktree-safe fixes.
62- Tier 2 AI repair (`src/lib/auto-repair.ts`) and CI autofix (`src/lib/ci-autofix.ts`) — real Sonnet calls, patch-as-comment.
63- Recording: `recordRepair()` writes attempts with fingerprints.
64- `recurring_patterns` (0096) — Claude-detected recurring issues, used for PR warnings.
65
66What is broken (the gaps, with file:line):
67
68| Gap | Evidence |
69|---|---|
70| **Tier-0 cache is never consulted** | `findCachedRepair()` `src/lib/repair-flywheel.ts:112` — zero callers anywhere. Every failure goes straight to mechanical/AI. |
71| **Outcomes are never recorded** | `updateOutcome()` `repair-flywheel.ts:252` — zero callers. Every row stays `outcome='pending'` forever; success-rate stats are blind; the cache can never be trusted. |
72| **The tier orchestrator is dead code** | `repairGateFailure()` `src/lib/auto-repair.ts:412-587` (the Tier-1→2 fallthrough) is defined and never called. Live call sites only repair secrets/security (`src/lib/gate.ts:424-450`); ordinary CI test failures bypass tiers and go straight to Sonnet via `triggerCiAutofix` (`src/lib/ci-autofix.ts:155`). |
73| **No AI→deterministic promotion** | Nothing moves a repeatedly successful AI fix into the Tier-0 cache or flips `is_public_pattern`. |
74| **No operator surface** | `getFlywheelStats()` (`repair-flywheel.ts:286-380`) has no route — no `/admin/repair-flywheel`. |
75| **ai-loop skips the cache too** | `src/lib/ai-loop.ts:441` calls `triggerCiAutofix` without a cache lookup. |
76
77**Closing plan (proposed BLOCK N1 — small, surgical, ~5 wiring points):**
781. `ci-autofix.ts` (~line 156): fingerprint the parsed error; `findCachedRepair()` first; on a high-success-rate hit, apply the cached patch and record a `cached`-tier row — no AI call.
792. `ai-loop.ts:441`: same cache-first check before dispatching autofix.
803. Post-gate-rerun correlation: when a gate re-runs after a repair, match the new `gate_runs` row back to the open `repair_flywheel` row and call `updateOutcome('success'|'failed')`. This is the linchpin.
814. Promotion: on N successes for a signature, mark the pattern public (cross-repo) and increment `cache_hit_count` on every hit.
825. `/admin/repair-flywheel` route exposing `getFlywheelStats()` — hit rate, AI-vs-cache ratio, $-saved. (Also a powerful acquisition metric: "x % of failures fixed without a model call.")
83
84Also: repairs should write `audit_log` rows (no `repair_*` actions exist today), so the "record everything" half of the vision holds.
85
86---
87
88## 4. Architecture & security
89
90**Strong fundamentals (verified):**
91- No command injection: all git subprocess calls use argv arrays (`src/git/repository.ts:42-58`); no `bash -c` interpolation of user input.
92- Auth: all 10 sampled mutating routes gated (`requireAuth` / `repo-access` 5-tier hierarchy / API scopes); session cookies `httpOnly` + `secure` (prod) + `sameSite=Lax`.
93- Secrets: workflow secrets AES-256-GCM with per-encryption IVs (`src/lib/workflow-secrets-crypto.ts`); PATs and OAuth tokens stored SHA-256-hashed.
94- XSS: markdown pipeline escapes HTML/attrs and rejects `javascript:`/`data:` hrefs (`src/lib/markdown.ts`); no user-data `dangerouslySetInnerHTML`.
95- Global error handler upholds the "no 500 reaches the UI" invariant (`src/app.tsx:886-906`).
96
97**Findings to fix:**
98
99| Sev | Finding | Fix |
100|---|---|---|
101| HIGH | **SSRF**: webhook delivery (`src/lib/webhook-delivery.ts:201`) and mirror fetch (`src/lib/mirrors.ts`) fetch user-supplied URLs with no private-range block (127.0.0.1, 10/8, 172.16/12, 192.168/16, 169.254/16, ::1) | ~2 days: shared `assertPublicUrl()` helper + DNS-resolution check, applied to webhooks, mirrors, imports |
102| HIGH | Single-node coupling: bare repos on local disk (`repository.ts:38`), in-memory rate limiter (`rate-limit.ts:15`), workflow runner in-process on the web node, 500-entry session cache. SSE already has a Redis fallback (`sse.ts:76-150`) — the others don't | Document the supported topology now (done here); BLOCK N3: Redis-backed rate-limit + sessions, extract workflow runner to a worker process, repo-storage strategy (shared volume now, object-store later) |
103| MED | Silent async failures: post-receive side-effects swallow errors with bare `.catch(() => {})` — operators can't see when AI analysis/indexing silently dies | Route through `reportError` + a failures counter on `/metrics` |
104| MED | N+1 queries on PR/issue list pages (per-row risk-score + comment-count queries) | Batch with joins; add a slow-query log |
105| MED | Test gaps: no Smart-HTTP protocol tests; `mcp-tools-expanded.ts` (2,470 lines of write tools) has no test file | BLOCK N4: MCP write-tool suite + git-protocol smoke tests |
106| LOW | `src/routes/pulls.tsx` is 6,654 lines (merge logic also duplicated in `pr-merge.ts` + MCP merge tool — known §7 Bible follow-up) | Consolidate on `performMerge()` |
107
108Dependency hygiene is good: 8 runtime deps, all mainstream, no abandonware.
109
110---
111
112## 5. Design & UX (brief: quiet confidence, believable, not cyberpunk)
113
114Two design systems are live:
115- **App + legacy marketing surfaces** — `src/views/layout.tsx` "Editorial-Technical" system: 60+ CSS custom properties, slate-noir `#08090f` / violet `#8c6dff` / hairline borders, Inter + Inter Tight + JetBrains Mono, light/dark with pre-paint script, 52 ARIA attributes, `prefers-reduced-motion` respected, 12:1–15:1 text contrast. Scored **8.2/10 against the brief** — restraint comparable to Linear/Vercel-tier marketing; no neon, no glow-noise.
116- **The actual home page** — `Landing2030Page` (`src/views/landing-2030.tsx`): white-background, ink-on-paper, light-only, headline "The git host built for 2030," fact-led copy ("Spec to PR in 90 seconds"), one product-card mock, two CTAs. This is precisely the "believable, it-just-works" register the owner asked for (closest public analog: vapi.ai's developer-infra restraint — note: **vapron.ai does not exist**; vapi.ai is the real benchmark).
117
118Highest-impact polish items (ordered):
1191. Social proof strip on the landing (grayscale logos / "powering N repos" with real counters) — the one missing trust signal for acquirers.
1202. Consolidate scattered "vs GitHub" copy into the existing `/vs-github` page; keep the landing comparison to one pull-quote.
1213. Unify modal/dropdown shadow recipes to one `--modal-shadow` token.
1224. CTA label case consistency ("Start building" / "Sign in" — title-vs-sentence drift).
1235. Disable decorative animations on mobile/slow networks (`prefers-reduced-motion` + width guard).
1246. Empty-state noise reduction (dashed borders + dot grids accumulate on data-less dashboards).
1257. Status dot in the footer linking `/status` (operational-health-as-brand).
1268. `:focus-visible` outlines on landing CTAs (currently box-shadow only).
1279. Brand naming is already consistent (lowercase `gluecron`) — keep it that way in new copy.
12810. Decide the long-term fate of the legacy `LandingPage`/marketing routes — two design systems is one too many for an acquirer walkthrough.
129
130---
131
132## 6. Documentation freshness (fixed this session)
133
134| Doc | Was | Now |
135|---|---|---|
136| `BUILD_BIBLE.md:3` | "Last updated 2026-05-29" | 2026-06-10 + living-document rule |
137| `BUILD_BIBLE.md` §4.1 | "95 tables" | 161 tables (verified by count) |
138| `BUILD_BIBLE.md` §5.1 | "1491 tests pass as of 2026-05-13" | 2767/0/122 as of 2026-06-10 + runner scoping note |
139| `CLAUDE.md` architecture tree | implied ~20 route files | annotated: illustrative; ~190 route files, 161 tables |
140| `AUDIT.md`, `AUDIT-v2.md`, `AUDIT_REPORT.md` | presented as current | stamped SUPERSEDED → this file |
141| `.env.example` | 6 config vars undocumented | documented |
142
143Verified accurate, no change needed: `README.md` (15 MCP read-tools claim matches `defaultTools()`), `ROADMAP.md`, `docs/STRATEGY.md`, `DEPLOY.md`.
144
145**Standing rule going forward:** every audit/spec doc carries a date in its filename or header, and the Bible's header timestamp moves in the same commit that changes reality.
146
147---
148
149## 7. Market scan (June 2026) and the capability gap list
150
151Full sourced report retained from the research agent; condensed here.
152
153**Where the market is:** GitHub absorbed Copilot Workspace into the GA coding agent + Agent HQ (multi-vendor agents — Anthropic/OpenAI/Google/Cognition/xAI — under one mission-control panel; agentic code review on all PRs since March 2026, review→agent autofix handoff). GitLab Duo Agent Platform GA'd Jan 2026 with credits-based pricing and agentic SAST fix PRs. Cursor (~$29B, >$2B ARR) runs Bugbot on ~2M PRs/month with >35 % of its autofix PRs merging. OpenAI Codex reviews GitHub PRs natively with `AGENTS.md` steering. Claude Code passed ~$2.5B annualized with MCP as the de-facto agent-integration standard (~9,400 public servers). **Closed-loop autonomy (review → fix → CI → self-heal) is the 2026 frontier — which is exactly the flywheel §3 closes.**
154
155**Gluecron's defensible wedges (per the scan):**
1561. **MCP-native git host with a deep write surface + governance** — per-token scopes, full agent audit trail, org policy on tool access. The "MCP governance gap" is documented and unowned by any incumbent.
1572. **Self-hosted with day-one AI parity** (GHES lags github.com on AI; we don't).
1583. **Agent identity & provenance** — agents as first-class actors with attribution ("agent X under human Y"), signed agent commits, agent activity feed.
159
160**Capability checklist for market leadership (T = table stakes, D = differentiator; ✅ = shipped, 🟡 = partial):**
161
162| # | Capability | T/D | Status |
163|---|---|---|---|
164| 1 | Issue→PR coding agent (sandboxed, tests run) | T | ✅ spec-to-PR + ai:build label |
165| 2 | Auto AI review on every PR, inline comments | T | ✅ |
166| 3 | **Review→fix closed loop on same PR** | T | 🟡 ci-autofix posts patches; flywheel not closed (§3) |
167| 4 | Severity-filtered review (P0/P1-only mode, effort levels) | T | ❌ |
168| 5 | Honor `AGENTS.md`/`CLAUDE.md` steering files in all AI flows | T | 🟡 partial |
169| 6 | **Multi-vendor agent panel** (Claude + Codex + Gemini + Devin side-by-side, compare PRs) | D | ❌ — GitHub Agent HQ is the template; no self-hosted product has it |
170| 7 | Parallel agent sessions in isolated worktrees + diff-compare view | D | 🟡 PR sandboxes exist; no compare UI |
171| 8 | **Self-healing CI** (red pipeline → agent reads logs → fix → re-run) | T | 🟡 = §3 flywheel close |
172| 9 | Natural-language CI authoring | D | ❌ — pre-GA everywhere; leadership claimable |
173| 10 | Security scan + AI autofix default-on | T | ✅ gates + repair |
174| 11 | Autonomous maintenance agents (dep bumps ✅, dead-code, flaky-test quarantine, coverage PRs) | D | 🟡 |
175| 12 | First-class MCP server over the whole host surface | T | ✅ 15 + 10 write tools |
176| 13 | **MCP governance**: OAuth remote MCP, per-token tool scopes, agent-action audit log, org tool policy | D | 🟡 auth exists; scoping/policy/audit-views don't |
177| 14 | Agent identity & provenance (first-class agent actors, attribution) | D | 🟡 app-bots exist; §7 Bible notes marker comments still credit humans |
178| 15 | Persistent context spaces (pin docs/issues/files as reusable agent grounding) | D | ❌ |
179| 16 | Headless API/SDK so any agent CLI treats Gluecron as a first-class remote | D | ✅ REST v2 + GraphQL + CLI |
180| 17 | Consumption/credit billing rail for agent work | T | 🟡 plans/quotas exist; no metering |
181| 18 | Agent analytics: % agent-authored merged code, fix-acceptance rate, cycle-time delta | T | 🟡 DORA + hours-saved exist; not agent-cut |
182| 19 | Per-repo review memory ("never flag this again") | D | ❌ |
183| 20 | AI issue triage (label/dedupe/severity/route-to-agent) | D | ✅ |
184| 21 | Auto-merge policy gated on AI review + CI green | T | ✅ K2/K3 |
185| 22 | Self-hosted full AI parity | D | ✅ — say it louder in marketing |
186| 23 | Browser/runtime verification subagent (screenshot evidence on PRs) | D | ❌ — nobody attaches this to hosting review yet |
187| 24 | Daily automated market/competitor scan feeding the roadmap | D | 🟡 `advancement-scanner` lib exists and is tested — point it at competitor changelogs + RSS and open `ai:build` issues automatically |
188| 25 | Repair-flywheel economics on the admin dashboard (% fixed without AI, seconds-to-fix) | D | ❌ until §3 closes |
189
190**Recommended build order (next blocks):**
191- **N1 — Close the repair flywheel** (§3, ~1 week). Unlocks #3, #8, #25 and the headline acquisition metric.
192- **N2 — SSRF guard + MCP write-tool test suite** (~1 week). Closes both HIGH security/test findings.
193- **N3 — Multi-node readiness** (Redis rate-limit/sessions, worker-process workflow runner, storage doc) (~3 weeks).
194- **N4 — MCP governance + agent provenance** (#13, #14) (~2–3 weeks). The differentiator no incumbent owns.
195- **N5 — Multi-vendor agent panel** (#6, #7) (~3–4 weeks). The "Agent HQ for the self-hosted world" story.
196- **N6 — Review noise controls + per-repo review memory** (#4, #19) (~2 weeks). The #1 buyer complaint in the AI-review market.
197- **N7 — Daily market scanner** (#24): schedule `advancement-scanner` in autopilot against competitor feeds; weekly digest to the owner.
198
199---
200
201## 8. Acquisition-readiness checklist
202
203Signals the 2025–26 M&A record says to manufacture (Cursor/Cognition/Graphite precedents):
204
205| Signal | Status |
206|---|---|
207| Green test suite + clean typecheck on `main` | ✅ as of this session — keep it gated |
208| % of merged code that is agent-authored (platform metric) | ❌ build with N1/#18 |
209| AI-review fix-acceptance / auto-merge rate (Cursor publicizes 80 % / 35 %) | ❌ data exists in tables; needs the analytics cut |
210| MCP tool-call volume from third-party agents (proves *platform*, not feature) | 🟡 log exists; no dashboard |
211| 2–3 enterprise logos on self-hosted | ❌ go-to-market |
212| Consumption billing live | 🟡 plans exist, metering doesn't |
213| Clean IP / no exclusive model-vendor dependency | 🟡 Anthropic-first; Voyage optional; keep model layer swappable (`MODEL_*` constants already centralize this) |
214| Single current audit doc + reconciled Bible | ✅ this file |
215
216---
217
218*Next scheduled audit: 2026-07-10 or after BLOCK N3, whichever comes first. Keep this file's date in the filename; supersede, don't edit history.*
3Part of the AUDIT-2026-*.md chain, each of which superseded the last with
4no single current source of truth. Full prior content is preserved in git
5history (`git log --follow -- AUDIT-2026-06-10.md`) if needed for archaeology.
ModifiedAUDIT-2026-07-07-CHECKLIST.md+5−86View fileUnifiedSplit
@@ -1,87 +1,6 @@
1# Audit & Remediation Checklist — 2026-07-07
1# Superseded — see [STATUS.md](./STATUS.md) (2026-07-17)
22
3Running status of the full-platform audit and fixes. **Source of truth for this
4work.** Ticks are only green when verified (tests run / diff reviewed), not when
5"written". Full findings live in the session memory `audit_2026-07-07.md`.
6
7Legend: ✅ done & verified · 🔄 in progress · ⬜ not started · 🚫 blocked (needs owner)
8
9---
10
11## Phase 0 — Audit (4 parallel agents)
12- ✅ Feature/product reality vs BUILD_BIBLE
13- ✅ Security & secrets
14- ✅ Design & UX
15- ✅ MCP / agent connectivity
16- ✅ GateTest MCP installed (`claude mcp add gatetest`) — active after Claude Code restart
17
18## Phase 1 — CRITICAL security fixes (commit `5bb52fa`)
19- ✅ **C1** Workflow runner secret leak — env allowlist + denylist (`src/lib/workflow-runner.ts`)
20- ✅ **C2** Private repos world-readable (git protocol) — read-access gate (`src/routes/git.ts`)
21- ✅ **C2** Private repos world-readable (web browse) — `assertRepoReadable` on 12 routes (`src/routes/web.tsx`)
22- ✅ **C3** Anonymous push to any repo — write-access gate (`src/routes/git.ts`)
23- ✅ **C4** Stored XSS in markdown — `sanitize-html` + 14 regression tests (`src/lib/markdown.ts`)
24- ✅ **C5** Unauth admin sandbox endpoints — site-admin gate + bounded ports (`src/routes/admin-command.tsx`)
25
26## Phase 2 — Review hardening (commit `6b75ac1`)
27- ✅ Fail-CLOSED on DB error in `assertRepoReadable` (was fail-open) — flagged by automated review
28
29## Phase 2.5 — LOGIN LOCKOUT root cause (commit `2aefa37`)
30**Why the owner is locked out of gluecron.com:** a previous agent's `signin-v2`
31redesign shipped PASSWORDLESS — `GET /login` renders `SignInV2`, which had OAuth +
32passkey + magic-link but **no username/password field** (subheading literally said
33"no new passwords"). The live site still shows a password box only because it runs
34OLDER code. Deploying as-is would have DELETED password login and locked the owner
35out worse.
36- ✅ Restored a real password `<form action=/login>` (username + password + Sign in +
37 Forgot-password link) above the Google/GitHub/passkey/magic options in `signin-v2.tsx`.
38- ✅ Verified: `/login` renders 200 with password+username fields, posts to `/login`,
39 Google + GitHub buttons present, `/forgot-password` link present. web-routes 13/13.
40- ✅ Owner password reset to a known value via `scripts/reset-admin-password.ts`
41 (account `ccantynz`, now site-admin). It failed on live because live = old passwordless code.
42- ⏳ After deploy: owner logs in at `/login` with `ccantynz` + password. Google/GitHub
43 BUTTONS will show; for them to COMPLETE, OAuth client id/secret must be set in DB at
44 `/admin/github-oauth` and `/admin/google-oauth` (owner is admin now, can do this post-login).
45- ⚠️ Deploy risk: `self-deploy.sh` runs `db:migrate`; if the live DB has migration drift it
46 may fail+rollback (safe — keeps current). Watch `/admin/deploys`.
47
48## Phase 3 — Verification
49- ✅ Full suite baseline (stashed): 23 fail / 2896 pass
50- ✅ Full suite with fixes: 23 fail / 2910 pass (+14 new, **0 new failures**)
51- ✅ Targeted: web-routes 13/13, repo-access 5/5, markdown-xss 14/14, workflows+secrets 28, api 6/6
52- ✅ Clean module imports for every edited file
53
54## Phase 4 — Ship
55- ✅ Committed to `main` (`5bb52fa`, `6b75ac1`)
56- ✅ Pushed to `origin` (GitHub mirror) — `main` == `origin/main` @ `6b75ac1`
57- 🚫 **Deploy LIVE to gluecron.com** — needs `GLUECRON_PAT` (not in session).
58 Run: `git push https://x:<PAT>@gluecron.com/ccantynz/Gluecron.com.git main`
59 Until done, the live site still runs the vulnerable code.
60
61---
62
63## Phase 5 — HIGH security items (NOT started)
64- ⬜ H1 `git grep` arg injection — add `--`, reject leading-`-` query (`src/git/repository.ts:518`)
65- ⬜ H2 SSRF DNS-rebinding — wire `resolvesToPrivate`, `redirect:"manual"` (`webhook-delivery.ts`, `mirrors.ts`)
66- ⬜ H3 Spoofable X-Forwarded-For — trusted-proxy IP only (`rate-limit.ts`, `auth.tsx`)
67- ⬜ H4 `/api/auth/*` no throttle/lockout — apply auth limiter + lockout
68- ⬜ H5 GitHub OAuth takeover via unverified email — require verified email (`sso.ts:594`)
69- ⬜ H6 api-v2 workflow-dispatch missing write check (IDOR) — gate on write access (`api-v2.ts:2610`)
70
71## Phase 6 — Overstated features (NOT started)
72- ⬜ CI does not run on push — wire workflow trigger into `post-receive.ts`
73- ⬜ "Verified" commit badge does no crypto verification — real verify or remove badge
74- ⬜ Orgs/teams don't gate repo access — consult org/team roles in `repo-access.ts`
75- ⬜ Test suite red on main (23 pre-existing fails) — fix or quarantine
76
77## Phase 7 — Design unification (NOT started)
78- ⬜ Quick wins: flat near-black buttons, delete glow orbs, emoji→SVG icons
79- ⬜ Collapse 4 design systems → 1 (QI palette: bg #fcfcfd, ink #16181d, accent #4353c9)
80- ⬜ Delete dead landings (`landing.tsx`, `landing-2030.tsx`, `landing-v2.tsx`)
81- ⬜ Wire orphaned `pr-redesign.tsx`
82
83## Phase 8 — MCP connectivity (NOT started)
84- ⬜ Fix `/docs/mcp-server` broken config (`.claude/settings.json` → `.mcp.json`) — 1-line, highest ROI
85- ⬜ OAuth discovery (`/.well-known/*` + DCR + 401 challenge) → unlocks Claude Desktop/web + directories
86- ⬜ Cross-client install (Add-to-Cursor deeplink, Windsurf/VS Code snippets)
87- ⬜ Token UX: expiry presets, stop passing PAT in URL query
3Part of the AUDIT-2026-*.md chain, each of which superseded the last with
4no single current source of truth. Full prior content is preserved in git
5history (`git log --follow -- AUDIT-2026-07-07-CHECKLIST.md`) if needed for
6archaeology.
ModifiedAUDIT-2026-07-09.md+4−118View fileUnifiedSplit
@@ -1,119 +1,5 @@
1# Gluecron Audit & Work Log — 2026-07-09
1# Superseded — see [STATUS.md](./STATUS.md) (2026-07-17)
22
3Verified against **code and the live site**, not the older markdown docs
4(several of which were stale — noted inline). Supersedes the 2026-07-07 audit
5where they disagree.
6
7## TL;DR
8
9- Last week's deploy **did** ship: gluecron.com runs current `main` (light
10 landing, login with password form + lockout throttle, the 07-07 security
11 fixes). The "still looks like the old site" feeling is the **logged-in app
12 shell**, not the landing — and it was mostly a **stale `theme=dark` cookie**
13 plus indigo buttons / dark-only code highlighting. Fixed (see Design).
14- Biggest strategic gap remains: **CI does not run on push.**
15- New priority this session: **cut the GitHub mirror, go fully self-sufficient.**
16 Architecture was ready; the durability gap (no offsite repo backup) is now
17 closed in code and sequenced in a runbook.
18
19## What shipped this session (local commits on `main`, not yet deployed)
20
21Push to `main`/deploy is pending owner authorization + a `GLUECRON_PAT`
22(the auto-classifier blocked the push; deploy needs the canonical remote).
23
24| Area | Commits | Summary |
25|---|---|---|
26| Self-sufficiency | offsite backup, LF attr, bootstrap, docs, runbook | See Track C below |
27| Security | api-v2 IDOR/leak, GitHub OAuth takeover | 2 of 3 open HIGHs fixed |
28| Design | QI light foundation | tokens + ink buttons + light code highlighting + theme default |
29| Docs | MCP `.mcp.json` fix | docs.tsx + connect.tsx corrected |
30
31## Track C — Self-sufficiency (GitHub mirror removal)
32
33Findings: **no automatic self-mirror to GitHub exists** (safe to cut); the
34`post-receive.ts` → `self-deploy.sh` pipeline (health-check + auto-rollback) is
35fully built and GitHub-independent in steady state. Two gaps handled:
36
37- **Durability (the real risk):** bare git repos under `GIT_REPOS_PATH` had
38 **no off-box copy** — GitHub was the de-facto backup. Added
39 `scripts/backup-offsite.sh` (tar repos + `pg_dump` Neon → rclone, fail-loud,
40 retention, dead-man's-switch) and `scripts/restore.sh` (DR restore, never
41 clobbers prod by default). `.gitattributes` forces LF so the scripts run on Linux.
42- **Bootstrap tie:** fresh-host bootstrap seeded from GitHub. `DEFAULT_SOURCE`
43 is now empty (`self-bootstrap.ts`, `self-host-bootstrap.ts`, `index.ts`);
44 a fresh host re-seeds from a restored backup, not GitHub.
45- **Docs/marketing:** `CLAUDE.md` + `SELF_HOST.md` now declare Gluecron
46 self-canonical; corrected the false "two-way GitHub mirror" product claim.
47- **Runbook:** `docs/CUTOVER_RUNBOOK.md` — owner-executed, backup-first, then
48 freeze GitHub → 7 green days → delete in 30. **Decision:** offsite rclone
49 backup, freeze-then-delete GitHub, owner runs the VPS steps.
50
51The one fact I can't verify off-box (in the runbook): the VPS `/opt/gluecron`
52working-tree `origin` must point at the **local bare repo**, not GitHub.
53
54## Track A — Verification results
55
56**Test suite:** 2910 pass / 122 skip / **23 fail** (pre-existing). Triage:
579 stale skills-bundle assertions, 3 "2030 reboot" landing-hero (DB-mock
58`innerJoin` unsupported), 1 stale login-shell assertion (signin-v2 redesign),
59several playground/env tests needing `DATABASE_URL`, and **1 real minor bug**:
60`GET /:owner/:repo/wiki` on a missing repo returns 200 instead of 404
61(`wikis.test.ts`). None are regressions; none block this work.
62
63**Security re-verification** (the 5 still-open 07-07 HIGHs):
64
65| # | Finding | Verdict | Action |
66|---|---|---|---|
67| 1 | git-grep arg injection | **FIXED** (array argv) | none |
68| 2 | X-Forwarded-For spoofing (`rate-limit.ts:89`) | **OPEN** | follow-up (infra-dependent trusted-proxy config) |
69| 3 | GitHub OAuth unverified-email takeover | **FIXED this session** | `sso.ts` + `github-oauth.tsx` verified-email gate |
70| 4 | SSRF DNS-rebinding | **FIXED** (`assertPublicUrl` in webhook+mirror) | none |
71| 5 | api-v2 workflow-dispatch IDOR | **FIXED this session** | write-access gate; also closed an unauth private-repo runs-list leak |
72
73**Broader follow-up:** the api-v2 write surface (issues/PR/label/topic/webhook
74POSTs under `requireScope("repo")`) needs a per-endpoint authorization audit —
75access level varies, so no blanket rule.
76
77**MCP:** 60 real tools (15 `mcp-tools.ts` + 45 `mcp-tools-expanded.ts`),
78`.mcp.json` correct. Fixed `/docs/mcp-server` + `/connect` teaching the wrong
79config file. Live 60-tool matrix needs a running instance + PAT (deferred).
80
81**Onboarding:** all landing "Migrate from GitHub" CTAs point to `/import`
82(`import.tsx`) — that's the blessed flow; the other 4 route files are
83secondary/overlapping. Live import test needs creds (deferred to runbook).
84
85**OAuth login (owner-reported broken):** not a bug — Google/GitHub OAuth was
86never configured (`getGoogleOauthConfig` reads an empty `sso_config`). Fix:
87owner sets client id/secret at `/admin/google-oauth` + `/admin/github-oauth`;
88and the login page should hide unconfigured providers instead of erroring
89(small follow-up). GitHub login is now safe to enable after the #3 fix.
90
91## Track B — Design (Quiet Intelligence)
92
93Root cause corrected: the app is **already light-by-default at runtime**; the
94"old dark site" was a stale `theme=dark` cookie + a `readTheme()` dark default
95(fixed). Shipped B0–B2: QI light tokens (page `#fcfcfd`, ink `#16181d`, ink
96primary buttons, green `#1e7f5c`, amber `#b45309`), a light syntax-highlighting
97palette (code blocks were dark-only on light pages), theme-color meta — all
98scoped to `:root[data-theme='light']` so the locked dark-theme tests stay green.
99
100Remaining (next session): B3 shell chrome + shared `.qi-*` utilities; B4
101high-traffic view conversions (dashboard → RepoHeader/RepoNav → repo page → PR
102→ issues → auth); B5 long-tail hex sweep (717 `#5b6ee8` + 24 `#58a6ff`) + emails
103+ pwa manifest; B6 a hex-count ratchet test. Then a Playwright screenshot sweep.
104
105## Strategic answer — "the platform for the next decade?"
106
107The AI-native/MCP layer is genuinely differentiated (60 MCP tools, agent
108sessions, ship-spec — a shape GitHub doesn't have). Four table-stakes gaps keep
109it at "impressive demo" rather than "platform you'd bet a company on":
110
1111. **CI doesn't run on push** — every GitHub refugee notices day one.
1122. **CI runner has no real sandbox** (env-allowlist only; gVisor/Firecracker/
113 nsjail still TODO).
1143. **"Verified" commit badge does no real crypto verification.**
1154. **Org/team permissions aren't enforced** for repo access.
116
117Next-decade bet: double down on the AI layer while closing those four, and —
118now — nail self-sufficiency + durable backups so it can be trusted to run on
119its own. The self-sufficiency work this session is the first plank of that.
3Part of the AUDIT-2026-*.md chain, each of which superseded the last with
4no single current source of truth. Full prior content is preserved in git
5history (`git log --follow -- AUDIT-2026-07-09.md`) if needed for archaeology.
ModifiedAUDIT-2026-07-14.md+6−122View fileUnifiedSplit
@@ -1,123 +1,7 @@
1# AUDIT — 2026-07-14 — Public-readiness for external AI platforms
1# Superseded — see [STATUS.md](./STATUS.md) (2026-07-17)
22
3**Goal:** certify gluecron.com can receive PRs from external AI platforms
4(MCP + git-over-HTTP), self-canonically, without defaulting to GitHub.
5
6Legend: ✅ verified live ⬜ pending ⚠️ known gap
7
8## Executive summary
9
10The platform is **ready for external platforms to onboard via the OAuth
11connector flow today**. One critical bug was found and fixed live during
12this audit: the MCP surface never signaled `invalid_token`, so any client
13whose access token aged past 1 hour got stuck in a permanent
14"token expired" reconnect loop even though the server's refresh grant
15worked. Fixed in `b5a7bb3`, deployed 2026-07-14 02:03 UTC, verified with
16live requests. The remaining ⬜ items are operator-gated (PAT-authenticated
17journey run, offsite backup arming) — commands are staged below.
18
19## 1. The critical bug — MCP "token expired" reconnect loop (FIXED)
20
21Root cause (three interacting defects):
22
231. `src/middleware/auth.ts` `softAuth`: an expired/revoked `glct_`/`glc_`
24 bearer was silently downgraded to **anonymous** — nothing recorded that a
25 token was presented and rejected.
262. `src/routes/mcp.ts`: the 401 challenge omitted RFC 6750
27 `error="invalid_token"`, so clients could not distinguish "token died →
28 refresh" from "never authenticated → first-time auth". The refresh_token
29 grant (fully implemented, with rotation) sat unused.
303. The MCP handshake (`initialize`/`tools/list`/`ping`) was fully open, so a
31 client reconnect **falsely succeeded** on a dead token, then looped on
32 `tools/call`.
33
34Fix (`b5a7bb3`, locked-file edit to `auth.ts` owner-approved 2026-07-14):
35`softAuth` now flags `bearerInvalid`; `/mcp` answers **every** method —
36including the handshake — with `401` +
37`WWW-Authenticate: Bearer error="invalid_token", …` when a dead bearer is
38presented. Anonymous discovery/handshake unchanged; anonymous `tools/call`
39still gets the connector sign-in challenge (deliberately without `error=`).
40
41Live verification (2026-07-14, prod):
42
43- ✅ dead `glct_` on `initialize` → 401 + `error="invalid_token"` (loop-breaker)
44- ✅ dead `glct_` on `tools/list` → 401 + `error="invalid_token"`
45- ✅ anonymous `tools/call` → 401 challenge with `resource_metadata=`, **no** `error=`
46- ✅ anonymous `initialize` → 200 (discovery open)
47- ✅ regression tests: 125 pass (mcp/oauth/well-known), 83 pass (mcp-write/git-push-auth/api-tokens/push)
48
49## 2. Doctor run (scripts/doctor.ts, new — `bun run doctor`)
50
51First run against `https://gluecron.com` (anonymous sections): **ALL GREEN**.
52
53- ✅ **a. Endpoint smoke** — 15/15 (healthz, readyz, version, login/register/
54 landing/explore/demo/pricing/status, api-v2 health, mcp discovery,
55 manifest, sw, dxt)
56- ✅ **b. OAuth provider** — 8/8: AS metadata advertises `refresh_token` +
57 `registration_endpoint`; protected-resource metadata (root + /mcp); **DCR
58 round-trip returns a client_id (201)**; token endpoint: garbage code →
59 `invalid_grant`, garbage refresh → `invalid_grant`, bogus grant_type →
60 `unsupported_grant_type`
61- ✅ **c. MCP anonymous + RFC 6750** — 5/5: initialize 200; **live tools/list
62 exactly matches the local 60-tool manifest (zero drift)**; anonymous
63 tools/call challenge correct; dead-bearer invalid_token on both
64 handshake methods
65- ⬜ **d. Authenticated MCP reads** — awaits `GLUECRON_PAT`
66- ⬜ **e. Read-only tool matrix (--full)** — awaits `GLUECRON_PAT`
67
68## 3. External-platform PR journey (scripts/agent-journey.ts, new)
69
70⬜ Awaits an admin-scope PAT. Simulates exactly what an external platform
71does: PAT identity → scratch repo → git push over smart HTTP with token
72basic-auth → `gluecron_create_branch`/`write_file`/`create_pr`/`comment_pr`
73→ AI-review poll → `gluecron_merge_pr` + verify → activity feed →
74guaranteed cleanup. Hard-guarded against ever touching the self-host repo.
75
76## 4. Self-canonical / server-side state (verified on-box 2026-07-14)
77
78- ✅ Deploys are cord-free from GitHub: `/opt/gluecron` `origin` = the
79 box-local canonical bare repo (docker volume), NOT github.com. Pushes to
80 `gluecron.com/ccantynz/Gluecron.com.git` main went live in ≤ ~2 min twice
81 today (`b5a7bb3`, `2cecc08`).
82- ✅ `gluecron-update.timer` firing every 60s.
83- ✅ `gluecron-backup.timer` daily; last run 2026-07-14 00:00 UTC, exit 0,
84 4.4M Neon dump.
85- ✅ `gluecron-restore-drill.timer` weekly (first run Sun 2026-07-19 04:00 UTC).
86- ⬜ **Offsite backup NOT yet armed** — dumps stay on the VPS. Staged
87 operator command appends `BACKUP_SCP_TARGET=root@100.89.227.39:/opt/backups/gluecron`
88 (vapron-158) to `/opt/gluecron/.env` (with `.env` backup first) and
89 fires a verification run. jarvis→vapron root SSH verified working.
90- ⚠️ GitHub (`ccantynz-alt/Gluecron.com`) remains the emergency deploy
91 source per CUTOVER_RUNBOOK Phase 4 (needs 7 green days + armed offsite
92 before retirement). Do not archive yet.
93
94## 5. How external platforms onboard (no PAT required)
95
961. `GET /.well-known/oauth-authorization-server` — discovery
972. `POST /oauth/register` — RFC 7591 DCR (verified live)
983. Authorization-code + PKCE → `POST /oauth/token` (1h access / 30d rotating refresh)
994. MCP at `POST /mcp`; expired tokens now get `error="invalid_token"` →
100 client refreshes transparently
1015. Git over smart HTTP with `Basic <user>:<token>` (PAT) or the web/API flows
102
103## 6. Open items / known gaps
104
105- ⬜ Run doctor sections d/e + agent-journey with an admin PAT (blocked on
106 operator minting one; classifier reserves prod-DB writes for the operator).
107- ⬜ Arm offsite backup (staged command above; operator-confirmed destination).
108- ⚠️ `src/middleware/api-auth.ts` (API v2): 401s invalid bearers but sends no
109 `WWW-Authenticate` header and rejects `glct_` OAuth tokens as unknown —
110 additive parity pass recommended (out of scope today).
111- ⚠️ `/api/version` reports `sha: "unknown"` on the compose/auto-update
112 deploy path — BUILD_SHA pin only happens via self-deploy.sh; staleness
113 checks rely on `builtAt`. Worth stamping in the docker build.
114- ⚠️ DCR leaves `doctor-*` client rows (RFC 7592 delete not implemented) —
115 cosmetic residue from each doctor run.
116- ⚠️ No MCP create-repo tool — journey uses `POST /api/v2/repos`; consider
117 adding `gluecron_create_repo` for full MCP-only agent flows.
118
119## Session evidence
120
121- Commits: `b5a7bb3` (fix + tests), `2cecc08` (doctor + journey + npm script).
122- Fix verified live with curl transcripts (§1); doctor output (§2) from
123 `bun scripts/doctor.ts` at 2026-07-14 ~02:1x UTC.
3The most recent and substantively-relevant entry in the AUDIT-2026-*.md
4chain (public-readiness certification for external AI platforms) — still
5worth reading for context on `git log --follow -- AUDIT-2026-07-14.md`,
6but STATUS.md is now the current source of truth for what's actually true
7today.
ModifiedCHANGELOG.md+4−32View fileUnifiedSplit
@@ -1,33 +1,5 @@
1# Changelog
1# Superseded — see [STATUS.md](./STATUS.md) (2026-07-17)
22
3All notable changes to Gluecron will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8## [Unreleased]
9
10### Added
11- **Spec-to-PR v2 (real AI pipeline).** `/:owner/:repo/spec` now drives a real Anthropic-backed generation pass through `src/lib/spec-to-pr.ts`; falls back gracefully when `ANTHROPIC_API_KEY` is unset.
12- **Repository collaborators + team permissions.** Full collaborator model wired end-to-end, guarded by a centralised permission middleware applied to all write routes.
13- **Bulk import.** `/import/bulk` accepts a GitHub org + token and migrates multiple repos in one pass.
14- **Migrations dashboard.** `/migrations` shows per-user import history with a verify button backed by `src/lib/import-verify.ts`, which smoke-verifies imported repos are clonable.
15- **Experimental spec-to-PR entry point** (first shipped in the bulk-import release, then upgraded to v2 above).
16- **`/help` page + onboarding polish.** Clearer new-user path, import-flow copy tightened.
17- **Error tracking.** `src/lib/observability.ts` wired into `app.onError`; supports `ERROR_WEBHOOK_URL` and `SENTRY_DSN`.
18- **Launch announcement bundle.** `docs/LAUNCH_ANNOUNCEMENT.md` covers Show HN copy, tweet thread, LinkedIn post, demo shot list, and press kit.
19- **Site audit.** `docs/SITE_AUDIT.md` — snapshot of readiness, drift, and launch blockers.
20
21### Changed
22- **Crontech decoupled.** Gluecron now ships as a standalone product; `CRONTECH_DEPLOY_URL` remains as an optional outbound webhook only.
23- **Pre-launch docs refreshed.** `LAUNCH_TODAY.md` now reflects what's actually shipped; top blocker is now "run `flyctl deploy`".
24
25### Fixed
26- **Import-verify test hardening.** Defensive `mock.module` fallthrough so the suite passes under isolated test runs.
27
28## [0.1.0] - 2026-04-21
29
30- Initial public release.
31
32[Unreleased]: https://github.com/ccantynz-alt/Gluecron.com/compare/v0.1.0...HEAD
33[0.1.0]: https://github.com/ccantynz-alt/Gluecron.com/releases/tag/v0.1.0
3This changelog went stale (last entry 2026-04-21) while real work kept
4landing on `main`. Full prior content is preserved in git history
5(`git log --follow -- CHANGELOG.md`) if needed for archaeology.
ModifiedROADMAP.md+4−363View fileUnifiedSplit
@@ -1,364 +1,5 @@
1# Gluecron Roadmap & Checklist
1# Superseded — see [STATUS.md](./STATUS.md) (2026-07-17)
22
3**Living document. Last updated: 2026-05-20. Edit as items move.**
4
5This is the single source of truth for what's done, what's in flight, what's
6critical for the next demo, and what's queued for after. If it's not on this
7list, it's either not real or not committed to. Update it every time we
8ship something or learn something new.
9
10---
11
12## 🚨 BLOCKING — must do before tomorrow's onboarding
13
14These take ~10 minutes total. Without them the demo doesn't show what gluecron actually is.
15
16- [ ] **SSH to Hetzner box, edit `/etc/gluecron.env`, add:**
17 - [ ] `ANTHROPIC_API_KEY=sk-ant-...` (from console.anthropic.com)
18 - Without this: AI PR review, AI incident responder, AI commit messages, AI auto-merge, AI spec-to-PR are ALL silent no-ops. The entire "AI-native git host" pitch is dark.
19 - [ ] `EMAIL_PROVIDER=resend`
20 - [ ] `RESEND_API_KEY=re_...` (from resend.com — free tier covers thousands of emails)
21 - [ ] `EMAIL_FROM=noreply@gluecron.com` (or whatever domain you have set up)
22 - [ ] `GATETEST_API_KEY=...` (so push-time security scans actually run instead of silent no-op)
23 - [ ] `DEPLOY_EVENT_TOKEN=$(openssl rand -hex 32)` (also add the SAME value to GitHub repo Settings → Secrets → Actions)
24 - [ ] `SELF_HOST_REPO=ccantynz-alt/Gluecron.com` (fixes the "platform repo not found" warn)
25- [ ] `systemctl restart gluecron` to pick up the env vars
26- [ ] Open `/admin/health` — confirm everything turns green/non-red
27
28- [ ] **Configure social sign-in (optional but valuable):**
29 - [ ] `/admin/google-oauth` — paste Google OAuth Client ID + Secret
30 - [ ] `/admin/github-oauth` — paste GitHub OAuth Client ID + Secret
31
32- [ ] **Dry-run the demo in incognito:**
33 - [ ] Sign up as a fake user
34 - [ ] Verify the auto-verify fallback works (no email needed)
35 - [ ] Create a repo
36 - [ ] Push some code (use a small public repo)
37 - [ ] File an issue labelled `ai:build` — confirm autopilot picks it up
38 - [ ] Open a PR — confirm AI review fires (now that ANTHROPIC_API_KEY is set)
39 - [ ] Merge the PR
40
41---
42
43## 🟡 IN FLIGHT — finishing now
44
45- [ ] **4 polish agents still running:**
46 - [ ] Agent J — `/help` page polish
47 - [ ] Agent K — marketing pages (`/features`, `/about`, `/vs-github`)
48 - [ ] Agent L — `/settings/tokens` (PAT creation)
49 - [ ] Agent M — `/:owner/:repo/compare` (branch compare for new PRs)
50- [ ] **Agent N (repo settings)** committed `c14f275` to worktree — cherry-pick onto main with the others when batch completes
51
52---
53
54## ✅ DONE this session (commits already on main)
55
56### Reliability sweep (Phase 1)
57- [x] AA reload loop killed (PWA ripped out, kill-switch shipped) — `d7ba05d`, `44fe49b`, `904927d`
58- [x] Hetzner deploy git-remote URL fixed (was 404'ing 17h) — `ec16b67`
59- [x] Minimum-viable Hetzner script with `set -x` tracing — `d8b9606`
60- [x] Migration step re-added to deploy — `a358c63`
61- [x] AUDIT.md + AUDIT-v2.md produced (4-agent + 5-agent audits)
62- [x] Silent failure sweep across 18 files — `a28cede`
63- [x] `/admin/health` + JSON endpoint + autopilot/deploy/queue/crontech checks — `115c66b`
64- [x] AI incident responder for platform deploy failures — `89a0761`
65- [x] Deploy paths unified (`scripts/self-deploy.sh` is canonical) — `ff4423b`
66- [x] `/admin/diagnose` auto-merge check uses SELF_HOST_REPO — `a3b6378`
67
68### Polish — marketing surfaces (Phase 2.1)
69- [x] Web fonts (Inter + Inter Tight + JetBrains Mono) — `3a5755e`
70- [x] Animated hero blobs + bigger headline — `3a5755e`
71- [x] Pricing: "One subscription. Replaces three on GitHub." + bundle-math card — `13ac035`
72- [x] Login + Register premium gateway feel — `98f45b4`
73- [x] Global page entrance animation + accent focus rings — `ed6e438`
74
75### Polish — auth + dashboard (Phase 2.2)
76- [x] Real Sign in with Google (`/admin/google-oauth` + login button + tests) — `582cdac`
77- [x] Dashboard: greeting eyebrow + gradient title + animated orb — `a004c46`
78
79### Polish — app-level surfaces (parallel batch 1)
80- [x] Repo home page (`/:owner/:repo`) — `544d842`
81- [x] Issues UI (list + detail, AI-comment treatment) — `f7ad7b8`
82- [x] Pull requests UI (list + detail, gate-status + merge card) — `b078860`
83- [x] User settings (8 section cards + danger zone) — `98eb360`
84
85### Polish — onboarding surfaces (parallel batch 2)
86- [x] Code browse (file viewer + commit detail + new repo + profile + per-repo search) — `efb11c5`
87- [x] Notifications page (hero + filter pills + AI-row treatment) — `fd8be1f`
88- [x] Import flow (`/import` + `/import/bulk`) — `7a99d47`
89- [x] Discovery (`/explore` + `/search`) — `283fbc2`
90- [x] Admin panel (hero + stat cards + 11-tile action grid) — `07f4b70`
91
92**Cumulative this session: 20+ commits on main. 2011/2011 tests pass. TypeScript clean.**
93
94---
95
96## 🟢 SHOULD ship tonight if time (high leverage, low risk)
97
98- [ ] **Build `/admin/integrations` page** — env vars via UI instead of SSH'ing to the box. ~1.5 hrs.
99 - DB-stored config (encrypted secret column)
100 - `getConfigValue(key)` helper that checks DB first, env var fallback
101 - Site-admin gated form for ANTHROPIC_API_KEY, RESEND_API_KEY, GATETEST_URL+KEY, CRONTECH_DEPLOY_URL+SECRET, DEPLOY_EVENT_TOKEN
102 - Audit log every change
103 - Demo moment: paste ANTHROPIC_API_KEY in admin UI → watch AI features turn green on `/admin/health` live
104- [ ] **Sub-30s deploys for code changes:**
105 - [ ] Lockfile-hash cached `bun install` (skip when bun.lock unchanged) — ~10 min
106 - [ ] Migration skip when no new `drizzle/*.sql` files — ~10 min
107 - [ ] CSS-only fast path (if diff is only in `src/views/`, skip migrations + smoke) — ~15 min
108
109---
110
111## 📋 KNOWN BUGS (from AUDIT-v2.md P1 list — not yet fixed)
112
113- [ ] Repo-scoped routes 500 instead of 404 on missing record (issues, pulls, packages, releases, security, symbols, sponsors) — each needs a try/catch
114- [ ] No DB-blip resilience middleware — every page blocks 5-15s on a sick DB
115- [ ] No Fly rollback path (Hetzner has one, Fly doesn't)
116- [ ] Workflow log truncation has no UX warning
117- [ ] Dead schema: `pr_risk_scores` table never written to
118- [ ] Dead code: `scripts/deploy-crontech.sh` not invoked
119- [ ] `/admin/sso`, `/admin/github-oauth`, `/admin/mirrors/sync-all` use middleware `requireAuth` but rely on inline `isSiteAdmin()` — inconsistent pattern, not insecure
120- [ ] Documentation drift: BUILD_BIBLE.md (4500 lines) and CLAUDE.md both contain claims that don't match code
121
122---
123
124## 🎨 SURFACES still unpolished (post-tomorrow polish queue)
125
126### Repo-scoped features
127- [ ] `DiffView` component itself (used inside polished commit + PR pages — only surrounding card is polished)
128- [ ] Releases (`releases.tsx`)
129- [ ] Contributors / Insights (`contributors.tsx`, `insights.tsx`)
130- [ ] Traffic analytics (`traffic.tsx`)
131- [ ] Dependencies (`deps.tsx`)
132- [ ] Security advisories / code scanning (`advisories.tsx`, `code-scanning.tsx`)
133- [ ] Symbols / xref nav (`symbols.tsx`)
134- [ ] AI features pages (`ask.tsx`, `ai-changelog.tsx`, `ai-explain.tsx`, `ai-tests.tsx`)
135- [ ] Workflows / Actions (`workflows.tsx`)
136- [ ] Gates / branch protection / rulesets / required checks / protected tags (`gates.tsx`, `rulesets.tsx`, `required-checks.tsx`, `protected-tags.tsx`)
137- [ ] Environments + Deployments (`environments.tsx`, `deployments.tsx`)
138- [ ] Webhooks (`webhooks.tsx`)
139- [ ] Web file editor (`editor.tsx`)
140
141### Settings sub-pages
142- [ ] 2FA setup (`settings-2fa.tsx`)
143- [ ] Passkeys (`passkeys.tsx`)
144- [ ] Developer apps / OAuth apps (`developer-apps.tsx`)
145- [ ] Audit log (`audit.tsx`)
146- [ ] Sponsors (`sponsors.tsx`)
147- [ ] Saved replies (`saved-replies.tsx`)
148- [ ] Marketplace (`marketplace.tsx`)
149- [ ] Workflow secrets (`workflow-secrets.tsx`)
150- [ ] Signing keys (`signing-keys.tsx`)
151
152### Specialized routes
153- [ ] Orgs (new, view, members, teams) — `orgs.tsx`, `org-insights.tsx`
154- [ ] Wiki pages — `wikis.tsx`
155- [ ] Discussions / forums — `discussions.tsx`
156- [ ] Project boards / kanban — `projects.tsx`
157- [ ] Gists — `gists.tsx`
158- [ ] Packages — `packages.tsx`
159- [ ] Playground (`/play` — anonymous try-it) — `playground.tsx`
160- [ ] Demo (`/demo` — live demo with tiles) — `demo.tsx`
161
162### Admin sub-pages
163- [ ] `/admin/ops` (Operations console) — `admin-ops.tsx`
164- [ ] `/admin/deploys` (deploy timeline) — `admin-deploys-page.tsx`
165- [ ] `/admin/status` (synthetic monitor) — `admin-status.tsx`
166- [ ] `/admin/self-host` (self-host config) — `admin-self-host.tsx`
167- [ ] `/admin/sso` (Enterprise SSO config) — `sso.tsx`
168- [ ] `/admin/github-oauth` (already styled — minor polish only)
169
170### Cross-cutting
171- [ ] Loading skeletons (`skeleton.tsx` exists, not used everywhere)
172- [ ] Empty states across niche routes
173- [ ] Error pages 404 / 500 / 403 (`error-page.tsx`)
174- [ ] Mobile responsive audit pass — ALL polished surfaces work on mobile but haven't been audited
175
176---
177
178## 🧪 UNTESTED categories
179
180- [ ] **E2E browser flows** — no real-browser test runner wired (chromium download blocked in this Anthropic container)
181- [ ] **Mobile responsive on real devices** — works on Chrome DevTools mobile sim, no physical device test
182- [ ] **Accessibility (axe / Lighthouse)** — needs browser
183- [ ] **Load test (k6 / locust)** — needs live infra hammering
184- [ ] **Real security pentest** — GateTest configured but API key not set, scans silently no-op
185- [ ] **Cross-browser** (Safari, Firefox, Edge) — one container, one engine
186
187---
188
189## 🚀 "LIGHTNING YEARS AHEAD" roadmap (post-onboarding)
190
191Ordered by **leverage per hour**. The first 3 are the differentiators that competitors don't have.
192
193### Tier 1 — true product differentiators
1941. [ ] **GateTest aggregation platform** — extend GateTest to be the unified scan-results surface. Playwright (E2E), k6 (load), axe (a11y), and the existing GateTest static scanner all POST results to the same `/api/v1/gate-runs` endpoint. One UI shows everything. Genuinely new product positioning. **~3-4 hrs.**
1952. [ ] **Multi-agent CI on every PR** — code reviewer (exists), security reviewer (new), QA agent that tries to break the PR (new), all run in parallel. Surfaces three independent AI perspectives. **~4-6 hrs.**
1963. [ ] **AI proactive monitoring** — hourly autopilot task that reads recent logs + audit_log via Claude and opens issues like "I noticed memory growth on workflow-runner". Goes from reactive to proactive. **~3-4 hrs.**
197
198### Tier 2 — speed + polish wins
1994. [ ] **Sub-30s deploys** (already partially listed under "Should ship tonight")
2005. [ ] **Mobile responsive pass** — design audit + fix across all polished surfaces. **~3-4 hrs.**
2016. [ ] **`DiffView` component rebuild** — the diff renderer used in commit/PR pages. Currently plain. Make it Vercel-quality. **~2-3 hrs.**
202
203### Tier 3 — new capabilities
2047. [ ] **Realtime collaboration on issues/PRs** — multiple users editing same draft simultaneously. SSE infra exists, needs the merge layer. **~6-8 hrs.**
2058. [ ] **Visual workflow editor** — DAG editor for `.gluecron/workflows/*.yml` instead of YAML. **~10-15 hrs.**
2069. [ ] **Time-travel state explorer** — replay any past state of an issue/PR/repo. Differentiation nobody has. **~10-15 hrs.**
20710. [ ] **Self-host one-click installer** — `curl gluecron.com/install-server | bash` for a full gluecron on any Linux box in 60s. **~6-8 hrs.**
208
209### Tier 4 — infrastructure / enterprise
21011. [ ] **Edge-network deploy** — Cloudflare Workers in front of Hetzner. Sub-100ms anywhere on earth.
21112. [ ] **Comprehensive API docs site** — `/api-docs` exists but plain. Should be Stripe-quality.
21213. [ ] **Localization** — English-only today.
21314. [ ] **SOC2 compliance path** — for enterprise customers.
21415. [ ] **Mobile PWA done right** — properly architected this time (not the broken one we ripped out).
215
216---
217
218## 📜 Platform Strategy Review — 2026-05-20 (external)
219
220External spec review landed 2026-05-20. Two parts: tonight's fixes and a long-tail "20 killer moves" list. Track here so nothing falls through.
221
222### Part 1 — Spec corrections (tonight)
223
224- [x] **PR list pagination** — added `?limit` (default 30, max 100) + `?offset` to `GET /api/v2/repos/:owner/:repo/pulls` (commit `8c09fb9`)
225- [ ] **Webhook retries + dead-letter** — in flight (agent on worktree). Exponential backoff (30s, 2m, 10m, 1h, 6h), max 6 attempts, status='dead' after that, new `webhook_deliveries` table
226- [x] **OAuth admin scope** — verified `admin` is not in `SUPPORTED_SCOPES` (src/lib/oauth.ts:18-28). Third-party OAuth apps cannot acquire it; admin scope is PAT-only over session cookies
227- [x] **GateTest timing** — verified runs as fire-and-forget post-receive (src/hooks/post-receive.ts:81-90). Never blocks the push, just notifies and updates commit status async
228- [x] **Git credential security** — verified the codebase never exposes URL-embedded tokens to users (`src/lib/import-helper.ts:81-90` scrubs them from error output before display). Public integration spec updated to recommend git credential helper / Basic Auth password flow instead of URL-embed
229
230### Part 2 — "20 killer moves" — graded by feasibility-from-here
231
232Slotted into existing tiers above where overlapping, listed here when new.
233
234**Native AI & agentic autonomy** (most strategic, partially built)
2351. [ ] Deterministic agent runtimes — sandbox+repl in repo. Builds on existing workflow runner. **~12-16 hrs**
2362. [ ] Push-time vector indexing — wire embeddings into `post-receive.ts`. Anthropic embeddings + pgvector. **~6-8 hrs**
2373. [ ] Multi-file AST graph for MCP — extend the 15 MCP tools to expose structural deps. **~8-10 hrs**
2384. [ ] Autonomous PR decoupling — new `ai/*` branch type that autopilot owns end-to-end. Pieces exist. **~6-8 hrs**
2395. [ ] AI-driven taint patcher — extends `ai-review.ts`: when GateTest flags, Claude proposes the patch + opens a PR. **~4-6 hrs**
240
241**High-performance self-hosting & independence**
2426. [ ] Single-binary deploy — Bun's `bun build --compile`. Already feasible. **~2-3 hrs**
2437. [ ] Multi-master replication — schema-level. Hard. **~weeks**
2448. [ ] S3-backed git objects — git LFS-style with object storage. **~10-15 hrs**
2459. [ ] Outbound-only tunnel — Cloudflare Tunnel template. **~2-3 hrs**
24610. [ ] SSO on every tier — OIDC works; SAML + AD missing. **~6-8 hrs**
247
248**Advanced CI/CD & security**
24911. [ ] Local-runnable Actions — `gluecron act run` CLI mirroring runner image. **~6-8 hrs**
25012. [ ] SLSA-style signed artifacts — sigstore + provenance attestation. **~4-6 hrs**
25113. [ ] Sub-ms pre-receive secrets — true pre-receive, regex+entropy only (no taint). **~3-4 hrs**
25214. [ ] Impact-aware CI scaling — runner pool by changeset size. **~6-8 hrs**
25315. [ ] Compliance ledger export — `audit_log` exists. CSV/JSON export endpoint + retention policy. **~3-4 hrs**
254
255**Developer experience & extensibility**
25616. [ ] Realtime collaborative PRs — already Tier 3 #7 above
25717. [ ] NNTP / IMAP / mailing-list bridge — wild but cheap. RFC-3977 NNTP server. **~10-12 hrs**
25818. [ ] Programmable webhook pipelines — runs user JS/Wasm before delivery. Builds on the new retry queue. **~8-10 hrs**
25919. [ ] Feature-flag controller — track flag state on merge. **~6-8 hrs**
26020. [ ] Semantic code search — embeddings powered. Builds on #2 (push-time vector index). **~4-6 hrs**
261
262---
263
264## 🛰️ Spec Review Addendum — 2026-05-20 (Holden Mercer / agent-build API)
265
266External addendum asked for the API surface an AI build agent needs to:
267read files, write multi-file atomic commits, dispatch background builds.
26812 endpoints across 3 groups. Status:
269
270### Group 1 — File contents
271- [x] `GET /api/v2/repos/:owner/:repo/contents/:path` (was already built)
272- [x] `PUT /api/v2/repos/:owner/:repo/contents/:path` (was already built)
273- [ ] `DELETE /api/v2/repos/:owner/:repo/contents/:path` (in flight tonight)
274
275### Group 2 — Git plumbing (atomic multi-file commits)
276- [x] `POST /api/v2/repos/:owner/:repo/git/refs` (creating branches — already built)
277- [ ] `GET /api/v2/repos/:owner/:repo/git/refs/heads/:branch` (in flight tonight)
278- [ ] `GET /api/v2/repos/:owner/:repo/git/commits/:sha` (in flight tonight)
279- [ ] `POST /api/v2/repos/:owner/:repo/git/blobs` (in flight tonight)
280- [ ] `POST /api/v2/repos/:owner/:repo/git/trees` (in flight tonight)
281- [ ] `POST /api/v2/repos/:owner/:repo/git/commits` (in flight tonight)
282- [ ] `PATCH /api/v2/repos/:owner/:repo/git/refs/heads/:branch` (in flight tonight)
283
284### Group 3 — Actions / workflows
285- [ ] `POST /api/v2/repos/:owner/:repo/actions/workflows/:filename/dispatches` (in flight tonight)
286- [ ] `GET /api/v2/repos/:owner/:repo/actions/workflows/:filename/runs` (in flight tonight)
287- [ ] `GET /api/v2/repos/:owner/:repo/actions/runs/:run_id` (in flight tonight)
288- [ ] `GET /api/v2/repos/:owner/:repo/actions/runs/:run_id/logs` (zip) (in flight tonight)
289- [ ] `POST /api/v2/repos/:owner/:repo/actions/runs/:run_id/cancel` (in flight tonight)
290
291Helpers verified available: `getBlob`, `getTree`, `getCommit`, `resolveRef`,
292`updateRef`, `writeBlob`, `refExists`, `objectExists`, `getBlobShaAtPath`,
293`createOrUpdateFileOnBranch`, `enqueueRun`. Auth uses existing `requireApiAuth` +
294`requireScope("repo")`. No schema changes needed.
295
296---
297
298## 🛸 "2030 KILLER MOVES" — 2026-05-20 (external strategic doc, 30 items)
299
300Triaged for feasibility from current architecture. Tagged: **[NOW]** = can
301build inside the current platform with no new infra; **[NEXT]** = needs
302one major piece of new infra (vector store, edge runtime, enclave); **[FAR]**
303= multi-quarter or requires partner ecosystem.
304
305### Next-gen security & agent scoping
306- [ ] **[NOW]** 1. Token-level identity binding — `agent_session` tokens scoped to a single branch/issue. Builds on existing PAT scopes — add a `target_ref` field to `api_tokens`. **~4-6 hrs**
307- [ ] **[NOW]** 2. Ephemeral branch sandboxes — `refs/scratch/*` exempt from CI, pruned after merge. **~4-6 hrs**
308- [ ] **[NOW]** 3. Nonce-enforced PUT queries — `If-Match: <blob_sha>` semantics. Group 1 PUT/DELETE already needs `sha`; lift to an HTTP header. **~2-3 hrs**
309- [ ] **[NOW]** 4. Byte-range content patching — `PATCH /contents/:path` with RFC-6902 JSON patch or unified-diff body. **~4-6 hrs**
310- [ ] **[NEXT]** 5. Semantic content hashing — AST-aware hash to suppress comment/whitespace CI. Needs per-language parsers. **~10-15 hrs**
311
312### AI-native git data layer
313- [ ] **[NOW]** 6. LLM-native content bundling — `GET /contents/:path?format=llm-xml`. Existing repo-walker + XML wrap. **~3-4 hrs**
314- [ ] **[NEXT]** 7. On-the-fly dependency analysis on commit POST. Needs language-aware parsers. **~8-10 hrs**
315- [ ] **[NOW]** 8. Graph-native history walks — `?depth=10&include_diffs=true` on `/git/commits/:sha`. **~3-4 hrs**
316- [ ] **[NOW]** 9. Auto-clustered staging trees — agents stream blobs, server batches into one commit on `flush`. Sits next to Group 2 tree builder. **~6-8 hrs**
317- [ ] **[NEXT]** 10. Intent metadata + pre-receive intent matcher. Needs semantic-diff infra. **~10-12 hrs**
318
319### Real-time observability & build fabric
320- [ ] **[NOW]** 11. Zero-polling SSE workflow log streams — `/actions/runs/:run_id/stream`. SSE infra already exists. **~3-4 hrs**
321- [ ] **[NEXT]** 12. Programmable inline step interceptors — workflow_dispatch body conditional hooks. **~6-8 hrs**
322- [ ] **[NEXT]** 13. State-saves on failure — snapshot runner FS on crash. Needs container snapshot capability. **~10-15 hrs**
323- [ ] **[NEXT]** 14. Predictive execution caching — keyed by `tree_sha + input_shape`. Cache layer. **~6-8 hrs**
324- [ ] **[NEXT]** 15. Vector-formatted workflow log outlets — embeddings on log lines. Pairs with item #2 of prev list. **~4-6 hrs**
325
326### Enclave runtimes & advanced security
327- [ ] **[FAR]** 16. Post-quantum API auth (ML-DSA / Falcon). **~weeks**
328- [ ] **[NEXT]** 17. Cryptographic reproducibility proofs / signed BOM per run. Builds on SLSA item from prev list. **~6-8 hrs**
329- [ ] **[FAR]** 18. Zero-trust local storage — orchestration-plane-only mode. Massive architectural shift. **~quarters**
330- [ ] **[NOW]** 19. Context-aware 429 — `X-Gluecron-Backoff-Context` header on throttles. **~1-2 hrs**
331- [ ] **[FAR]** 20. Automated fork-enclave execution for unverified agents. Needs biometric integration. **~quarters**
332
333### Architectural superiority
334- [ ] **[FAR]** 21. Edge-native API compilation (Rust/Wasm). Rewrite of the metadata-API surface. **~quarters**
335- [ ] **[NEXT]** 22. Native workspace sync — long-lived file-watcher endpoint. Pairs with realtime collab. **~8-10 hrs**
336- [ ] **[NEXT]** 23. Autonomous cost gating — `budget_limit` on workflow_dispatch. Needs runner-cost telemetry. **~4-6 hrs**
337- [ ] **[NEXT]** 24. AI hallucination sandboxing — npm/PyPI/crates pre-check on commit. **~6-8 hrs**
338- [ ] **[FAR]** 25. P2P code swaps for large assets. Needs IPFS/WebTorrent. **~weeks**
339- [ ] **[NOW]** 26. Immutable audit ledger separate from git graph. `audit_log` already exists; add append-only signature chain. **~3-4 hrs**
340- [ ] **[NOW]** 27. Context-aware auto-pruning — delete merged auto-branches after 24h. Cron-style autopilot task. **~2-3 hrs**
341- [ ] **[NEXT]** 28. Dynamic mid-run resource balancing. Needs runner-pool elasticity. **~8-10 hrs**
342- [ ] **[NEXT]** 29. Multi-model orchestration in workflows — workflow YAML can call into a model router. **~6-8 hrs**
343- [ ] **[NOW]** 30. Self-healing endpoint schemas — accept slight param drift + return `X-Gluecron-Schema-Warning`. **~2-3 hrs**
344
345### Top picks if shipping next
346The **[NOW]** items with best ROI for the agent-build use case:
347- 1 (token-binding) + 3 (nonce/If-Match) + 8 (history depth) + 11 (SSE logs)
348 = an agent's full safety + observability story in ~12-16 hrs of work
349- 6 (LLM-XML bundling) + 9 (auto-clustered tree) = differentiated IDE-agent UX in ~10-12 hrs
350
351---
352
353## 📊 Latest commits on main (auto-updated, top of `git log`)
354
355Run `git log --oneline -15` to see what's actually shipped. The HEAD SHA the live server is running can be confirmed at `https://gluecron.com/version`.
356
357---
358
359## How to update this file
360
361- Move items between sections as they ship / change priority
362- Don't delete items — strike them through or move to a "shipped" log
363- Update the date at top whenever you edit
364- Commit the change so it persists for everyone (future you, future Claude, anyone else looking at the repo)
3This document went stale (last real update 2026-05-20) while real work kept
4landing on `main`. Full prior content is preserved in git history
5(`git log --follow -- ROADMAP.md`) if needed for archaeology.
AddedSTATUS.md+96−0View fileUnifiedSplit
@@ -0,0 +1,96 @@
1# Gluecron Status — 2026-07-17
2
3Single current source of truth for "what's actually shipped, what's actually
4open, what to read next." Supersedes `ROADMAP.md`, `CHANGELOG.md`, and the
5`AUDIT-2026-*.md` chain — those are now redirect stubs pointing here. Update
6this file, not those, when state changes.
7
8`BUILD_BIBLE.md` §4 (LOCKED BLOCKS) remains the authoritative owner-sign-off
9gate on renaming/altering shipped code — that mechanism isn't moved here.
10Its *content* (the actual locked-file list) is last known to be a full
11audit pass behind current `main` (see "Known documentation debt" below) —
12treat any specific file:line claim in it as unverified until re-audited,
13not as settled fact.
14
15## What changed this session (2026-07-16/17)
16
17All items below are merged to `main` and pushed to the canonical remote
18(`gluecron.com/ccantynz/Gluecron.com.git`), verified per their own
19inline test/build evidence — not just written.
20
211. **Push-time secret scanning, CODEOWNERS merge enforcement, PR-workflow
22 sync wiring, autorepair/branch-protection fixes** — 5-piece hardening
23 batch, 29 dedicated tests green.
242. **`agent-journey.ts` self-healing** — orphaned probe-repo cleanup now
25 sweeps stale `journey-*` repos at the start of every run, so a killed
26 process no longer leaves permanent leftovers.
273. **Repo-settings and account-settings navigation** — `RepoNav` was
28 missing its "Settings" tab entirely (type union had it, no `<a>`
29 rendered it), orphaning the whole settings tree (mirrors, dep updater,
30 webhooks, collaborators, environments, pages, workflow secrets,
31 protected tags, rulesets, automation, audit log) behind the Cmd-K
32 palette. Fixed, plus two adjacent bugs found during the fix:
33 `dep-updater.tsx` was rendering the wrong nav component entirely
34 (`IssueNav` instead of `RepoNav`), and the `/settings` index page
35 itself had no top nav. Account settings had the identical shape —
36 `SettingsSubnav` only listed 4 of 11 pages; extended to cover
37 2FA/passkeys/signing-keys/sessions/integrations.
384. **`fireWebhooks()` wired into 19 real call sites** (was 0) — the
39 webhook feature was fully built (retry/dead-letter queue, live
40 "last delivery" UI) but no push/issue/PR/star event anywhere in the
41 codebase ever called it, on either the web routes *or* the 8 MCP
42 write tools (`gluecron_create_pr`, `gluecron_merge_pr`, etc., which
43 have their own independent implementations). Verified live end-to-end
44 against production via `scripts/agent-journey.ts` — a probe webhook
45 pointed at `/healthz` now records a real delivery attempt after a
46 real MCP-driven PR create + merge.
475. **AI security gate no longer silently reports "clean" on a provider
48 error** — `aiSecurityScan()` returned `[]` on any Anthropic API error
49 (timeout, rate limit, unparseable response), identical to a genuine
50 zero-finding scan; `gate.ts` then reported "No security issues found"
51 either way. Added `aiSecurityScanSafe()` distinguishing the two states,
52 mirroring the `runGateTestScan` skip-not-silently-pass precedent
53 (commit `6930df0`) already established for the GateTest gate.
546. **Dead webhook deliveries now alert the owner** — a delivery that
55 exhausts all retries (or is blocked by the SSRF guard) previously only
56 logged to `console.error`. Now sends an in-app notification
57 (`integration_dead` kind) linking back to the webhook's settings page.
58
59## Known open items (not closed this session)
60
61- **Offsite backup not armed** — daily Neon dump + weekly restore drill
62 run fine on the VPS, but dumps only live on the box itself
63 (`BACKUP_SCP_TARGET` unset). Gates Cutover Runbook Phase 4.
64- **GateTest defaults off for new repos** (migration `0112`) — a
65 deliberate, documented decision (commit `6930df0`: "hasn't proven
66 reliable enough to be a required-by-default external dependency yet"),
67 not a bug. Revisit once a concrete reliability bar is defined and met.
68- **Legal pages** (`legal/TERMS.md`, `PRIVACY.md`, `AUP.md`, `DPA.md`)
69 drafted but awaiting attorney sign-off; DMCA agent placeholder unfilled.
70- **Penetration test** — not started, intentionally on hold pending a
71 signed Rules-of-Engagement / authorization document (attorney-gated,
72 separate from the legal-pages thread above).
73- **Authenticated `doctor.ts` sections (d/e) and the full PAT-gated
74 agent-journey matrix** — only ever run against anonymous endpoints
75 plus the one PAT-driven journey run this session; a systematic
76 authenticated sweep hasn't happened.
77
78## Known documentation debt
79
80`BUILD_BIBLE.md` claims (as of its last real update, 2026-06-13) that
81Blocks A–M are all shipped, including the last month's actual work —
82it wasn't touched during that month despite real commits landing. Its
83§4 locked-blocks list should be treated as stale evidence, not settled
84fact, until someone re-audits it against current `main`. That re-audit
85is a bigger job than this pass and is explicitly not done here — flagged,
86not fixed.
87
88## Where to look
89
90- **This file** — current state, updated as things ship.
91- **`BUILD_BIBLE.md`** — locked-file sign-off gate (mechanism still
92 authoritative; content stale, see above) and historical block plan.
93- **`scripts/doctor.ts` / `scripts/agent-journey.ts`** — the actual
94 live-verification tools. Run them against `https://gluecron.com` with
95 a fresh `GLUECRON_PAT` (from `/settings/tokens`) rather than trusting
96 any document's claim about production behavior.
097