Skip to content

Research site on Astro 7 + Alpine (CSP build): entity pages, backlinks, map, search, Markdown pages - #112

Merged
OpenReplicant merged 1 commit into
mainfrom
claude/site-ssg
Nov 27, 2026
Merged

OpenReplicant merged 1 commit into
mainfrom
claude/site-ssg

Conversation

@OpenReplicant

Copy link
Copy Markdown
Owner

Stacked on #111 (branched from origin/claude/site-assessments, which was still open). Its base is claude/site-assessments; when #111 merges, retarget this to main before that branch is deleted.

The generator: Astro 7, with Alpine's CSP build

Criterion Astro 7.4.11 Hugo Python + Jinja + Markdown
One layout per entity type src/pages/<type>/[name].astro yes (templates) yes
Markdown folder becomes pages content collection with a zod front-matter schema yes write it ourselves
YAML entities as pages with resolved refs and backlinks a JS data layer (src/lib/data.mjs) feeding getStaticPaths content adapters, but backlinks in Go templates are hard yes
JSON Schema validation fails the build Ajv, draft 2020-12 needs a separate step jsonschema
No runtime CDN or tracking yes; build telemetry disabled in the scripts yes yes
Pinned deps, lockfile package-lock.json, exact versions, npm ci --ignore-scripts one binary requirements.lock
Escaping automatic in text and attributes; set:html never used contextual autoescape Jinja autoescape
Matches the owner's site same framework, and Alpine like the website no no

Astro wins on matching the owner's stack, Markdown pages with checked front matter, and components per entity type. Python plus Jinja would have been the smallest change; Hugo the fastest build, but weakest at the cross-references this is for.

Not Astro 4, the owner's website's version: npm audit on the website reports a critical advisory set for astro <=7.4.4 (reflected XSS through server islands, XSS through spread attribute names, a dev server file read, and more), and content collections loaded from outside src/ were experimental in 4. 7.4.11 (11 Nov) is the newest release more than two weeks old. The website may want the same upgrade.

Alpine: @alpinejs/csp 3.17.5, copied from node_modules into public/assets/vendor/ on every build and dev start, with no CDN. Its components (theme, feed, search, graph) are registered with Alpine.data in assets/site.js. The content security policy is unchanged in spirit: script-src 'self', style-src 'self', no unsafe-eval or unsafe-inline. It adds connect-src 'self' for the search index and changes form-action from 'none' to 'self' for the header's search box. Without JavaScript, every page still works.

What the site has now

  • A page per entity: claims, papers (papers/arxiv-2610.00346.html), trials (trials/e-04a.html, derived from claim sources and outcome trial ids), resources (each model, engine, GPU and dataset), options, roles, the system, and Markdown pages.
  • References both ways on every page ("Links to" / "Linked from", grouped by kind of reference, with the status).
    • A claim page starts with a tested-on table: model by result, plus the trial and the prediction.
    • The Inkling 2 Mini page lists every claim tested with it and each result. The 27B+ claim shows there as Replicated, from E-04a. The page also lists its trials (E-04a, E-17 to E-17d), our measurements on it, and notes about it.
    • A trial page lists the outcomes it produced and on which models, what it measured, and related trials (E-17, E-17b...).
    • A paper page lists its claims with their status, options, roles and abstract.
    • A role page lists open questions (watch.yaml), options, what has been tested, what is next in the queue, and every claim.
  • map.html: a static SVG laid out at build time, with columns for models, papers and trials, claims, options and roles. Alpine highlights a node's neighbours and filters by kind.
  • search.html over data/search.json. Without JavaScript it lists everything by kind; the header's search box lands there. Also new: data/graph.json, with every node and edge, the calibration pairs and the Brier score.
  • File-based pages: a .md file under site/content/ becomes a page. Its front matter is title, kind (page, note or announcement), date, refs, nav, blocks and draft. refs: [resource:inkling-2-mini-q4-k, trial:E-04a] puts a back-link on those pages, and a ref that does not resolve stops the build.
    • how.html is now content/how.md.
    • I added one note, content/notes/2026-11-27-inkling-and-the-27b-finding.md, as an example. It only restates the claim file's outcomes. Delete it if you'd rather not have it.
  • Kept: schema validation that fails the build, the steering links with their exact body lines (src/lib/steer.mjs), queue, predictions and calibration, watching, light and dark themes, the CSP, escaping, and data/claims.json.

Tests

tests/test_site.py now runs the real build. It is skipped without npm ci in site/, and fails instead when MORPHOGEN_SITE_TESTS=1, which the workflow sets.

  • On the demo data, it checks:
    • every claim and entity has a page;
    • statuses;
    • the Inkling, E-04a, paper and role cross-references;
    • no inline script, outside resource or style attribute;
    • well-formed issue links.
  • On a hostile fixture, it checks:
  • An invalid claim, and a Markdown ref to a missing entity, each stop the build.
  • npm test runs node unit tests for safeUrl, the issueUrl round trip and slugs.
  • The full suite passes locally: 342 tests.

Escaping note: Astro escapes & and " inside quoted attributes but leaves < (it cannot open a tag there), so the escaping test strips attribute values before looking for markup.

Workflow

actions/setup-node@949feb2… (v7.1.0, by SHA), Node 24.5.0, npm ci --ignore-scripts, tests, then npm run build. The push trigger stays commented out. Pages was not enabled and no settings were changed.

Checked, and not checked

  • In Chrome against a local build:
    • the Inkling page;
    • search for "inkling" (7 results, Alpine running under the CSP with no console errors);
    • the map in the light theme, with hovering highlighting 13 nodes and edges;
    • the claim page.
  • npm run dev serves the pages.
  • Not checked at phone width: the window resize had no effect in my browser session. The tables and the map scroll inside their own containers, but please look at it on a phone.
  • Licences: everything is MIT, ISC, Apache-2.0, BSD and similar, except optional @img/sharp-libvips-* binaries (LGPL-3.0), pulled in by Astro's image service. They are build-time only, unused here, and nothing from them is shipped.

Left out (cheaper later)

What the owner needs to do

🤖 Generated with Claude Code

https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh

…references both ways, a map, search, Markdown pages

site/build.py is replaced by an Astro project in site/. src/lib/data.mjs reads the same files (config.toml), validates
every claim against schemas/evidence-claim.v1.json with Ajv, and joins claims, papers, trials, models and other
resources, options, roles and the system into one graph with typed references and backlinks. Each entity type has
one layout (src/pages/<type>/[name].astro); every entity page lists what it links to and what links to it. A
claim page starts with a "tested on" table (model by result); a model's page lists every claim tested with it and
the result; a trial's page lists the outcomes it produced and on which models. map.html is a build-time layout of
the graph as an SVG of links; search.html searches data/search.json.

Markdown files in site/content become pages with the shared layout (front matter checked by a content collection;
`refs:` link the page to entities, which link back). how.html is now content/how.md.

Interactive parts (feed filters, search, theme, map highlighting) are Alpine components registered by name, run by
@alpinejs/csp copied into the site at build time, so the content security policy stays without unsafe-eval or
unsafe-inline (connect-src 'self' for the search index, form-action 'self' for the header's search box).

The steering links and their body lines are unchanged (src/lib/steer.mjs). tests/test_site.py now runs the real
build on the demo data and on a hostile fixture (escaping, javascript: links, several assessments, calibration,
an invalid claim, a Markdown ref to a missing entity); it is skipped without `npm ci` in site/ unless
MORPHOGEN_SITE_TESTS=1, which the workflow sets. The workflow installs Node by SHA-pinned setup-node and the
locked packages with `npm ci --ignore-scripts`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
@OpenReplicant
OpenReplicant marked this pull request as ready for review November 27, 2026 22:29
@OpenReplicant
OpenReplicant changed the base branch from claude/site-assessments to main November 27, 2026 22:47
@OpenReplicant
OpenReplicant deployed to morphogen-judge November 27, 2026 22:47 — with GitHub Actions Active
@OpenReplicant
OpenReplicant deployed to morphogen-judge November 27, 2026 22:48 — with GitHub Actions Active
@OpenReplicant
OpenReplicant merged commit 9f8476d into main Nov 27, 2026
4 of 5 checks passed
OpenReplicant added a commit that referenced this pull request Nov 27, 2026
Research site for any system: config file, morphogen site init/build, --base, Pages template (stacked on #112)

This branch was successfully deployed

1 active deployment
morphogen-judge — 21a19b69 Deployed Nov 27, 2026 by OpenReplicant via judge / score #44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant