Skip to content

feat: render the contract lattice at build time, verify the sync for real - #144

Merged
bdelanghe merged 3 commits into
mainfrom
feat/contracts-build-time-lattice
Jul 5, 2026
Merged

feat: render the contract lattice at build time, verify the sync for real#144
bdelanghe merged 3 commits into
mainfrom
feat/contracts-build-time-lattice

Conversation

@bdelanghe

Copy link
Copy Markdown
Contributor

Summary

  • /contracts (PR feat: /contracts — the visual lattice, live from the signed projection #139) was 100% client-side JS — the static build output only ever showed a "Loading…" placeholder, which is why axe/structure-audit/checks never went green. This renders it at build time instead.
  • data/lattice.json + scripts/gen-lattice.mjs (feat: pull the org contract lattice into the site build pipeline #142) already vendor trellis's signed projection into the pipeline. This finishes the job: contracts.html now renders that data via a new scripts/gen-contracts.mjs (marker-spliced, offline, deterministic — mirrors gen-registry.mjs's pattern).
  • Closes a real honesty gap: lattice-refresh.yml's prior comment claimed the cosign signature was "verified in CI", but nothing actually ran cosign verify-blob anywhere. It now does — for real, against the exact bytes curated (via a new --from-file flag on gen-lattice.mjs) — before ever committing the data. A pull_request-triggered check job also fails if contracts.html drifts from data/lattice.json.
  • Wired contracts.html into build.mjs's static copy and data/nav.jsonld's primary nav; regenerated the structure-audit baseline for the new page.

Test plan

  • npm run build — succeeds, contracts.html copied into dist/ with real rendered rows (no <script> fetch)
  • npm run axe — 10/10 pages, 0 violations (previously would have failed on the placeholder)
  • npm run structure (--check) — passes against regenerated baseline
  • npm run shacl — conforms
  • deno run contract/gate.ts — 0 failing
  • node scripts/gen-contracts.mjs --check — offline, in sync with data/lattice.json
  • Visual check via tezcatl screenshot — tiles + table render correctly, brand-consistent

🤖 Generated with Claude Code

…real

/contracts (PR #139) was 100% client-side JS (fetch + DOM render at page
load), so axe/structure-audit/checks only ever saw a "Loading…" placeholder in
the static build output — that's why it never went green.

data/lattice.json + scripts/gen-lattice.mjs already vendor trellis's signed
projection into the build pipeline (#142). This finishes the job:

- contracts.html renders the lattice section at build time from
  data/lattice.json via scripts/gen-contracts.mjs (marker-spliced, offline,
  deterministic — mirrors gen-registry.mjs's --check pattern), so the static
  output has real content instead of a loading spinner.
- lattice-refresh.yml now actually runs `cosign verify-blob` against trellis's
  signed status.json before curating it (the prior version's comment claimed
  this happens in CI; nothing did). Verification runs against the exact bytes
  curated via gen-lattice.mjs's new --from-file flag, and only a
  verified + changed projection opens a PR. A pull_request-triggered `check`
  job (offline) fails if contracts.html drifts from data/lattice.json.
- wired contracts.html into build.mjs's static copy + data/nav.jsonld's
  primary nav; regenerated the structure-audit baseline for the new page.

Verified locally: build, axe (10/10 pages, 0 violations), structure-audit,
shacl, and the deno contracts gate all pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bdelanghe added 2 commits July 5, 2026 00:11
…har description

brand-checks' meta.mjs gate (required for every non-40x page) failed: 3
required tags missing. Brought contracts.html's <head> up to the same social/
meta parity as conformance.html (og:*, twitter:*) and shortened the
description to 145 chars.
…allback)

brand's colour-usage gate only recognizes var(--bs-x) with no fallback
argument as "tokenized" — var(--bs-color-forest, #0C5A42) leaves the fallback
hex exposed as a raw-colour violation (7 hits: 1x ink, 3x forest, 3x clay-red).
Dropped the fallbacks and swapped the ad-hoc #b3261e for the palette's actual
--bs-color-clay (the existing danger/red token); --bs-color-ink already
covers the intro text color.
@bdelanghe
bdelanghe merged commit a8c2e98 into main Jul 5, 2026
19 checks passed
@bounded-systems-front-desk bounded-systems-front-desk Bot moved this from Todo to Done in Front Desk Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant