Repository Public MIT Selected
1<!--2 ─────────────────────────────────────────────3 SPB Git — Personal Git Platform4 ─────────────────────────────────────────────5 Author : Simon-Pierre Boucher6 Contact : contact@spboucher.ai7 File : CHANGELOG.md8 Purpose : Release notes9 License : MIT © Simon-Pierre Boucher10 ─────────────────────────────────────────────11-->12# Changelog1314## 3.1.2 — 2026-11-191516Fix: a crawler spread over thousands of addresses made the site unreachable (6 481 addresses in 26 minutes, one to17three requests each, 89 % of them for pages pinned to a commit; median answer 7.6 s, restarts for memory).1819- Visitor pass (`lib/crawl-guard.mjs`): a signed timestamp in the `spb_pass` cookie (30 days, HttpOnly), handed out20 by every HTML page. Key in `<data dir>/visitor-pass.key`.21- Historical pages asked with a pass keep the per-address budget (`SPBGIT_HISTORICAL_RPM`, 30), which also applies to22 the pass itself. Asked without a pass, they share one budget for all addresses, `SPBGIT_HISTORICAL_ANON_RPM` (20).23- Beyond the shared budget a browser receives its pass and a page that reloads after two seconds; other clients24 receive 429 with the clone URL.2526## 3.1.1 — 2026-11-172728Fix: snapshot archives filled the disk (226 GB of cache, 91 GB of it abandoned `archive.*.tmp` files).2930- `git/archive.mjs`: one `git archive` per archive whatever the number of concurrent requests, at most31 `SPBGIT_ARCHIVE_CONCURRENCY` (2) builds at a time, temporary file removed on failure and on shutdown.32- Size ceiling `SPBGIT_ARCHIVE_MAX_MB` (2048, `0` = none): beyond it the build is stopped and the answer is 413 with33 the clone URL; the verdict is remembered per commit.34- Cache janitor (`Cache#pruneTransient`): temporary files older than one hour and archives not served for35 `SPBGIT_ARCHIVE_KEEP_HOURS` (24) are removed, including under branch and tag tips.36- `/archive/*`: `SPBGIT_ARCHIVE_RPM` (6) requests per minute per address.37- `deploy/prune-cache.sh` (cron) stays as a second line of defence.383940## 3.1.0 — 2026-11-174142Live metric badges for READMEs.4344- **`GET /badge/:repo/:metric.svg`** — SVG badges rendered by the forge from the cached repository overview:45 `commits`, `last-commit` (coloured by freshness), `activity` (26-week bar chart), `language`, `languages`,46 `size`, `branches`, `tags`, `license`, `clones`; site totals under `/badge/_site/{repos,commits,languages}.svg`.47 Options `style=flat|flat-square|for-the-badge`, `label=`, `color=`. Cached five minutes; an unknown48 repository or metric answers `404` with a red badge (`src/render/badge.mjs`).49- **Insights** — a "Live metric badges" section previews every badge of the repository with its Markdown.50- **`/about/api`** — badge reference. `robots.txt` disallows `/badge/`.515253## 3.0.1 — 2026-11-105455Crawler containment (production was restarting 10–30 times per hour and the cache had reached 76 GB).5657- **robots.txt** — only the default branches are crawlable; pages pinned to a commit SHA, history, blame and58 raw files are disallowed (`Crawl-delay: 5`).59- **Historical pages** (`blob|tree|blame|commits|raw` at a SHA, single commits) — a per-address budget of60 `SPBGIT_HISTORICAL_RPM` requests per minute (default 30), `429` with `Retry-After` beyond it, and61 `X-Robots-Tag: noindex, nofollow` on every such response (`src/lib/crawl-guard.mjs`).62- **Cache janitor** — the cache of a commit that is no longer a branch or tag tip is dropped after63 `SPBGIT_CACHE_STALE_HOURS` (default 24); runs two minutes after start and every six hours, off the request64 path (`Cache#pruneRepo`).65- **Memory limit** — `max_memory_restart` raised from 750 MB to 2 GB: the JavaScript heap stays under 350 MB66 but resident memory settles around 1.2–1.3 GB under crawl (git output buffers, highlighting), so the old67 limit restarted the server every one to two minutes.6869## 3.0.0 — 2026-11-09 · "Monograph"7071A visual redesign of the whole forge in the language of www.spboucher.ai.72No route, API, git or cache behaviour was removed. System: `docs/DESIGN.md`.7374### Design system75- Paper, ink and one indigo accent in three themes: Light (the paper of76 spboucher.ai), Dark (its night edition), Midnight (true black, OLED).77 Tokens are oklch; hairline borders, 2 px ink rules, square corners, no78 gradients, no glow, shadows only on dialogs.79- Type: Fraunces (names, titles, numerals), Inter (text), IBM Plex Mono80 (labels, metadata, code). Fonts are self-hosted **and tracked in git**81 (7 woff2, 200 KB; the two preloaded files weigh 116 KB), with82 metric-adjusted fallbacks so the swap does not shift the layout.83- One icon set (Lucide, ISC) replaces Octicons and the text glyphs of the84 palette; the logo, favicon, touch icon and OG cards use the black "SB"85 monogram tile of the personal site.86- House syntax themes "paper" and "ink" (shiki) replace the GitHub themes.8788### Screens89- **Front page**: masthead with a one-line statement and a framed clone90 specimen ("Fig. 1"), ruled figure row, numbered sections — selected91 repositories, 52 weeks of commits (calendar, language share, latest92 pushes), and the repository index as a typographic table with filters.93- **Repository**: eyebrow (visibility, licence, research), serif title,94 description, mono topic tags, inline clone box, figures, language bar,95 mono tabs; file list with a latest-commit strip; README as a document sheet96 with an "On this page" outline. Sub-pages use a compact header. The97 research banner became a header link and a "Research · preview" tab.98- **Code**: breadcrumb toolbar, file header (name, size, lines, language),99 line numbers behind a hairline, hanging indent in wrap mode, image / PDF /100 notebook / binary / too-large states; blame with an age scale.101- **History**: day-grouped commit ledger; commit page with serif subject,102 quoted body, stats bar, unified/split segmented control, restyled diffs.103- **Branches, releases, insights, research, search**: ledgers, ruled result104 groups, figure captions, checklists.105- **New**: `/about/api` (reference of every public endpoint), linked from the106 header, footer, menu and palette. `/about/metrics` gained an outline.107- **Shell**: mono navigation with an underline marker, search trigger,108 theme menu, bottom sheets on phones, ⌘K palette with scoped tabs and109 icons, colophon footer, navigation progress hairline, 404/500 page,110 print stylesheet.111112### Details113- Relative dates carry the exact instant in `title` everywhere.114- Code no longer wraps by default on phones; it scrolls inside its block.115- Heading anchors are hidden on touch screens.116- Cache keys bumped where the markup changed (`readme-v3`, `md-v3`, `hl-v3`,117 `commit-v4`, `insights-v2`, `heatmap-v6`, OG/favicons `v3`).118119### Operations (found while deploying)120- `/healthz` no longer walks the cache synchronously: with 75 GB / millions of121 cached files in production the walk froze every request for about 100 s per122 call. The footprint is now computed in the background (`Cache.footprintAsync`,123 refreshed at most every 15 minutes); `cache` is `null` until the first walk124 completes and `cacheComputedAt` states its age.125126### QA127- 89 tests; `scripts/qa/screens.py` now also covers `/about/api`, insights128 and an empty search (16 pages × 9 widths × 3 themes) and more controls;129 `scripts/qa/axe.py` covers 15 pages × 2 widths × 3 themes.130131## 2.0.0 — 2026-11-01 · "The Intelligent Git Forge"132133Plan and per-phase log: `docs/SPBGIT-2-PLAN.md`, `docs/SPBGIT-2-PROGRESS.md`.134Deployment and rollback: `docs/DEPLOY.md`. Benchmarks: `docs/BENCHMARKS.md`.135136### Reliability (production incident fixes)137- `/raw/*` streams blobs instead of buffering up to 64 MB; blob pages read138 only size + an 8 KB binary probe for PDFs, images, binaries and large files.139 Fixes the memory-restart loop (2 861 PM2 restarts, RSS up to 2.1 GB).140- Git subprocesses are bounded by a 12-slot semaphore (`SPBGIT_GIT_CONCURRENCY`).141- Overview, calendar and search caches are validated against live ref stamps,142 so a push missed by the post-receive hook can no longer leave stale totals143 ("all-time" 3 332 < "52 weeks" 3 346 is fixed; both come from the same pass).144- One compact log line per completed request; assets logged only on error.145- Prepared diffs, highlighted blobs, rendered Markdown blobs and blame are146 cached per commit; brotli/gzip compression in-process.147148### Design 2.0149- Three first-class themes — Light, Dark (charcoal/slate), Midnight (deep150 navy) — following the OS by default, overridable and persisted.151- Semantic design tokens, 4/8 px spacing, tabular numerals, Bricolage display152 type; mobile-first AppShell with a compact sticky header, navigation sheet,153 bottom-sheet dialogs on phones, 44 px touch targets, safe-area insets, no154 horizontal overflow at 320–1920 px (Chromium + WebKit).155- Component library (Nunjucks macros): icons, chips, stat strip, tabs,156 breadcrumbs, ref picker, empty/error/skeleton states, copy button, toast,157 confirmation dialog.158- Home: compact hero, stat strip, pinned, searchable catalog (deep-linkable159 filters), activity, stack ring, calendar with metric definitions.160- Repository: compact stat strip, tabs (Code · Commits · Branches · Releases ·161 Insights · Research), clone sheet with selectable URLs, lazy expandable file162 tree (desktop sidebar / phone sheet), README with table of contents.163- Source browser: sticky toolbar, wrap (default on phones), copy, raw, blame,164 history, permalink, line ranges, markdown source/rendered toggle.165- Commits: timeline grouped by day; commit page with changed-file list,166 unified **or split** diffs, wrap toggle, large diffs deferred (`?all=1`).167- Search: ⌘K palette with scopes (repos, files, commits, branches), recent168 queries, keyboard + touch navigation; `/search` page groups everything;169 `/api/v1/search` is permission-trivial (every repository is public) and170 index status is exposed.171- `/about/metrics` documents every statistic; `/api/v1/stats` returns172 52-week totals and streaks with a link to the definitions.173- `/:repo/insights`: 52-week calendar, contributors, hottest paths, declared174 dependencies parsed from manifests (npm, PyPI, Cargo, Go, Swift PM).175176### Research Mode (opt-in)177- `/:repo/research` (tab when `research: true` on the repository; preview178 with a banner when LaTeX/BibTeX/figure signals are detected): manuscript PDF179 viewer, LaTeX main documents with parsed title/authors/environment counts,180 BibTeX, figure gallery, tables, reproducibility checklist, experiment181 outputs, notebooks, tagged versions with per-version PDF/zip links. Nothing182 is compiled or executed.183184### AI groundwork (opt-in, off by default)185- Provider-agnostic service (`src/ai/`): Anthropic (official SDK, server-side186 key, server-side refusal fallbacks), OpenAI-compatible local servers, and a187 test-only fake. Disabled providers are absent — nothing is simulated.188- Grounded repository Q&A (`POST /api/v1/repos/:name/ask`) over a BM25 chunk189 index cached per blob (incremental across commits); answers must cite190 `path#Lx-Ly`, citations are verified against the retrieved excerpts and191 unverifiable ones are removed; untrusted content is wrapped as data.192- Commit summaries (`POST /api/v1/repos/:name/commits/:sha/summary`, cached).193- Daily token budget, per-route rate limit, concurrency cap, `/api/v1/ai/status`.194195### Agent Workspace196- Design only: `docs/AGENT-WORKSPACE-DESIGN.md` (scoped job tokens,197 sandboxed runner, approval gates, audit log). Not implemented by design.198199### Tooling200- `scripts/qa/screens.py` (overflow + touch targets + screenshots across201 widths/themes/engines) and `scripts/qa/axe.py` (WCAG 2.x A/AA audit),202 both on Playwright for Python.203- Tests: 59 → 86 (semaphore, split rows, research/insights parsers, scoped204 search, tree API, streamed raw, missed-hook coherence, AI with fake provider,205 security regressions).206207### Removed208- Instrument Serif font, constellation canvas, typewriter terminal, count-up209 numerals, mouse spotlight, scroll reveal (decorative motion that cost CPU on210 phones). `.stat`/`.rstat` tiles replaced by the compact stat strip.211