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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export default function configureEleventy(eleventyConfig) {
eleventyConfig.addFilter('where', (items, key, value) => (items || []).filter(item => item?.[key] === value));
eleventyConfig.addFilter('statusClass', value => `status-${String(value || 'hmmm').toLowerCase().replace(/[^a-z0-9]+/g, '-')}`);
eleventyConfig.addFilter('markdown', value => md.render(String(value || '')));
eleventyConfig.addFilter('edcmMarkdown', value => md.render(String(value || ''))
.replace(/<pre(?![^>]*\btabindex=)([^>]*)>/g, '<pre tabindex="0"$1>')
.replace(/<math(?![^>]*\btabindex=)(?=[^>]*\bdisplay="block")/g, '<math tabindex="0"'));
// Exact canonical body lines of a unit: skip the heading line, stop before
// footnote lines, notes blocks, separators, and sub-headings. Mirrors the
// body extraction in scripts/verify-article-canon.mjs; keep the two in step.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ This site displays exact, provenance-bearing chapter snapshots. It does not merg
- Every public organization repository receives a generated project page.
- `.interdependency/project.yml` supplies reviewed project purpose, maturity, relationships, and links.
- `fallback/` is a dependency-free emergency edition.
- `src/artifacts/edcm-mathematics.njk` publishes an exact commit-pinned reproduction of `The-Interdependency/edcm:docs/EDCM_MATHEMATICS.md` at `/artifacts/edcm-mathematics/`; correct the EDCM source first and run `npm run check:edcm-reference` before updating the copy.
- `artifacts/four-cuts-1.html` is deliberately published at `/artifacts/four-cuts/` through Eleventy passthrough.
- `_site/build.json` publishes the site commit and canonical source identity for live deployment verification.

Expand Down
192 changes: 192 additions & 0 deletions The-Interdependency.github.io_msdmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,29 @@ export default defineMsdmdCollection({
"file": "scripts/canon-parser.mjs",
"id": "canon_parser_core"
},
{
"block": "MODULE_BUILD",
"fields": {
"admin_only": "false",
"auth_boundary": "none",
"internal_surface": "none",
"module_kind": "instrument",
"module_name": "check-edcm-reference-drift",
"network_boundary": "none",
"owner": "Erin Spencer",
"public_surface": "node scripts/check-edcm-reference-drift.mjs [reference-file]",
"rollback": "remove only with another deterministic cross-repository reference gate",
"rollout": "npm run check:edcm-reference and npm run check",
"since": "2026-08-02",
"storage_boundary": "read",
"summary": "Fails when the website copy differs from the exact commit-pinned EDCM reference identity or an explicitly supplied producer checkout.",
"tests": "tests/edcm-mathematics.test.mjs",
"unresolved": "none",
"user_data_boundary": "none"
},
"file": "scripts/check-edcm-reference-drift.mjs",
"id": "edcm_reference_drift_gate"
},
{
"block": "BOUNDARIES",
"fields": {
Expand Down Expand Up @@ -551,6 +574,59 @@ export default defineMsdmdCollection({
"file": "scripts/write-build-info.mjs",
"id": "public_build_identity"
},
{
"block": "CONTRACTS",
"fields": {
"class": "correctness",
"given": "the website builds the EDCM mathematical reference",
"then": "the rendered Markdown source has the exact SHA-256 and Git blob identity of the commit-pinned EDCM reference"
},
"file": "src/_data/edcm_mathematics.js",
"id": "edcm_reference_bytes_reproduced"
},
{
"block": "CONTRACTS",
"fields": {
"class": "evidence",
"given": "the EDCM mathematical reference is published",
"then": "the EDCM repository, path, commit, Git blob, SHA-256, license, and correction target remain visible"
},
"file": "src/_data/edcm_mathematics.js",
"id": "edcm_reference_source_pin_visible"
},
{
"block": "CONTRACTS",
"fields": {
"class": "safety",
"given": "EDCM equations and status boundaries appear on the website",
"then": "the publication identifies itself as a non-authoritative copy and transfers no canon, proof, theorem, measurement, empirical, or runtime status"
},
"file": "src/_data/edcm_mathematics.js",
"id": "edcm_reference_status_does_not_transfer"
},
{
"block": "MODULE_BUILD",
"fields": {
"admin_only": "false",
"auth_boundary": "none",
"internal_surface": "gitBlobSha1, reference_markdown",
"module_kind": "schema",
"module_name": "edcm-mathematics",
"network_boundary": "none",
"owner": "Erin Spencer",
"public_surface": "edcm_mathematics, /artifacts/edcm-mathematics/",
"rollback": "remove this data module, its pinned reference bytes, route, index card, and contract checks together",
"rollout": "loaded by Eleventy and linked from /artifacts/",
"since": "2026-08-02",
"storage_boundary": "read",
"summary": "Publishes an exact commit-pinned reproduction of the EDCM mathematical reference without creating a second mathematical authority.",
"tests": "tests/edcm-mathematics.test.mjs, tests/generated-site.test.mjs",
"unresolved": "Git content identities detect drift but do not provide a cryptographic producer signature",
"user_data_boundary": "none"
},
"file": "src/_data/edcm_mathematics.js",
"id": "edcm_mathematics_public_artifact_record"
},
{
"block": "BOUNDARIES",
"fields": {
Expand Down Expand Up @@ -846,6 +922,45 @@ export default defineMsdmdCollection({
"file": "tests/aicontext.test.mjs",
"id": "check_ai_context_stable_person_identity"
},
{
"block": "CHECKS",
"fields": {
"call": "self::checkReferenceBytesReproduced",
"cleanup": "none",
"mutates": "none",
"proves": "edcm_reference_bytes_reproduced",
"requires": "node",
"timeout": "10"
},
"file": "tests/edcm-mathematics.test.mjs",
"id": "check_edcm_reference_bytes_reproduced"
},
{
"block": "CHECKS",
"fields": {
"call": "self::checkSourcePinVisible",
"cleanup": "none",
"mutates": "none",
"proves": "edcm_reference_source_pin_visible",
"requires": "node",
"timeout": "10"
},
"file": "tests/edcm-mathematics.test.mjs",
"id": "check_edcm_reference_source_pin_visible"
},
{
"block": "CHECKS",
"fields": {
"call": "self::checkStatusDoesNotTransfer",
"cleanup": "none",
"mutates": "none",
"proves": "edcm_reference_status_does_not_transfer",
"requires": "node",
"timeout": "10"
},
"file": "tests/edcm-mathematics.test.mjs",
"id": "check_edcm_reference_status_does_not_transfer"
},
{
"block": "CHECKS",
"fields": {
Expand Down Expand Up @@ -1138,6 +1253,69 @@ export default defineMsdmdCollection({
"source_id": "check_ai_context_stable_person_identity",
"to": "node"
},
{
"from": "check_edcm_reference_bytes_reproduced",
"kind": "calls",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_bytes_reproduced",
"to": "self::checkReferenceBytesReproduced"
},
{
"from": "check_edcm_reference_bytes_reproduced",
"kind": "claims_proves",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_bytes_reproduced",
"to": "edcm_reference_bytes_reproduced"
},
{
"from": "check_edcm_reference_bytes_reproduced",
"kind": "requires",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_bytes_reproduced",
"to": "node"
},
{
"from": "check_edcm_reference_source_pin_visible",
"kind": "calls",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_source_pin_visible",
"to": "self::checkSourcePinVisible"
},
{
"from": "check_edcm_reference_source_pin_visible",
"kind": "claims_proves",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_source_pin_visible",
"to": "edcm_reference_source_pin_visible"
},
{
"from": "check_edcm_reference_source_pin_visible",
"kind": "requires",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_source_pin_visible",
"to": "node"
},
{
"from": "check_edcm_reference_status_does_not_transfer",
"kind": "calls",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_status_does_not_transfer",
"to": "self::checkStatusDoesNotTransfer"
},
{
"from": "check_edcm_reference_status_does_not_transfer",
"kind": "claims_proves",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_status_does_not_transfer",
"to": "edcm_reference_status_does_not_transfer"
},
{
"from": "check_edcm_reference_status_does_not_transfer",
"kind": "requires",
"source_block": "CHECKS",
"source_id": "check_edcm_reference_status_does_not_transfer",
"to": "node"
},
{
"from": "check_llms_markdown_examples_ignored",
"kind": "calls",
Expand Down Expand Up @@ -1264,6 +1442,20 @@ export default defineMsdmdCollection({
"source_id": "distributed_textbook_fetch",
"to": "Erin Spencer"
},
{
"from": "edcm_mathematics_public_artifact_record",
"kind": "owns",
"source_block": "MODULE_BUILD",
"source_id": "edcm_mathematics_public_artifact_record",
"to": "Erin Spencer"
},
{
"from": "edcm_reference_drift_gate",
"kind": "owns",
"source_block": "MODULE_BUILD",
"source_id": "edcm_reference_drift_gate",
"to": "Erin Spencer"
},
{
"from": "generated_content_gate",
"kind": "owns",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@
"audit:workflows": "node scripts/audit-workflows.mjs",
"build:llms": "node scripts/build-llms.mjs --apply",
"check:llms": "node scripts/build-llms.mjs --check",
"check:edcm-reference": "node scripts/check-edcm-reference-drift.mjs",
"prevalidate": "npm run refresh:data",
"validate": "node scripts/validate-content.mjs && node scripts/verify-generated-routes.mjs && node scripts/verify-article-canon.mjs",
"build": "npm run validate && eleventy && pagefind --site _site && node scripts/write-build-info.mjs",
"pretest": "node scripts/prepare-tests.mjs",
"test": "node --test tests/aicontext.test.mjs tests/llms-build.test.mjs tests/canon-parser.test.mjs tests/canon-integrity.test.mjs tests/textbook-integrity.test.mjs tests/math-rendering.test.mjs tests/narratives.test.mjs tests/offline-project-snapshot.test.mjs tests/repo-coverage.test.mjs tests/research-ledger.test.mjs tests/works-registry.test.mjs tests/site-contract.test.mjs",
"test": "node --test tests/aicontext.test.mjs tests/edcm-mathematics.test.mjs tests/llms-build.test.mjs tests/canon-parser.test.mjs tests/canon-integrity.test.mjs tests/textbook-integrity.test.mjs tests/math-rendering.test.mjs tests/narratives.test.mjs tests/offline-project-snapshot.test.mjs tests/repo-coverage.test.mjs tests/research-ledger.test.mjs tests/works-registry.test.mjs tests/site-contract.test.mjs",
"test:generated": "node --test tests/generated-site.test.mjs tests/textbook-generated.test.mjs tests/math-generated.test.mjs && node tests/links.test.mjs",
"test:browser": "playwright test",
"test:e2e": "playwright test tests/site.spec.mjs",
"test:a11y": "playwright test tests/accessibility.spec.mjs",
"test:links": "node tests/links.test.mjs",
"test:performance": "node scripts/performance-placeholder.mjs",
"check": "npm run audit:workflows && npm run check:llms && npm run build && npm test && npm run test:generated",
"check": "npm run audit:workflows && npm run check:llms && npm run check:edcm-reference && npm run build && npm test && npm run test:generated",
"refresh:works": "node scripts/fetch-works.mjs"
},
"dependencies": {
Expand Down
47 changes: 47 additions & 0 deletions scripts/check-edcm-reference-drift.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// === MODULE_BUILD ===
// id: edcm_reference_drift_gate
// module_name: check-edcm-reference-drift
// module_kind: instrument
// summary: Fails when the website copy differs from the exact commit-pinned EDCM reference identity or an explicitly supplied producer checkout.
// owner: Erin Spencer
// public_surface: node scripts/check-edcm-reference-drift.mjs [reference-file]
// internal_surface: none
// auth_boundary: none
// storage_boundary: read
// network_boundary: none
// user_data_boundary: none
// admin_only: false
// tests: tests/edcm-mathematics.test.mjs
// rollout: npm run check:edcm-reference and npm run check
// rollback: remove only with another deterministic cross-repository reference gate
// since: 2026-08-02
// unresolved: none
// === END MODULE_BUILD ===
// Usage: run `npm run check:edcm-reference`; when an EDCM checkout is available, run `node scripts/check-edcm-reference-drift.mjs /path/to/edcm/docs/EDCM_MATHEMATICS.md` for a direct byte comparison.
// Limits: exact Git and SHA-256 identities prove copy equality, not truth, authorship, or producer authentication.

import { readFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import loadEdcmMathematics from '../src/_data/edcm_mathematics.js';

const artifact = loadEdcmMathematics();
const copied = Buffer.from(artifact.reference_markdown, 'utf8');
const referenceArgument = process.argv[2] || process.env.EDCM_REFERENCE_PATH;

if (referenceArgument) {
const referencePath = resolve(referenceArgument);
const authoritative = await readFile(referencePath);
if (!copied.equals(authoritative)) {
throw new Error(`EDCM reference byte drift against ${referencePath}`);
}
}

process.stdout.write(`${JSON.stringify({
repository: artifact.source.repository,
path: artifact.source.path,
commit: artifact.source.commit,
blob: artifact.observed.blob,
sha256: artifact.observed.sha256,
utf8_bytes: copied.length,
direct_reference_compared: Boolean(referenceArgument)
})}\n`);
Loading
Loading