Skip to content

Display the distributed Interdependency textbook - #14

Merged
erinepshovel-code merged 24 commits into
mainfrom
agent/display-distributed-textbook
Jul 21, 2026
Merged

erinepshovel-code merged 24 commits into
mainfrom
agent/display-distributed-textbook

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

Purpose

Displays chapters Zero through Seven of the distributed Interdependency textbook as one continuous public reading sequence while preserving each chapter’s owning repository, exact source identity, license boundary, and local status vocabulary.

Chapter spine

Chapter Title Owning source
0 Meta Energy Theory — Axioms, Postulates, and Theorems The-Interdependency/metapat:CHAPTER_ZERO.md
1 The Subtractive Foundations of the Unit Carrier The-Interdependency/ucns:docs/chapter-1.md
2 Measurement Without Transfer The-Interdependency/edcm:docs/chapter-2.md
3 Modules That Speak for Themselves The-Interdependency/skill-lib:docs/chapter-3.md
4 Canon Without Inversion The-Interdependency/interdependent-lib:docs/chapter-4.md
5 One Architecture, Four Layers The-Interdependency/ptcna:docs/chapter-5.md
6 The Instrument The-Interdependency/a0:docs/chapter-6.md
7 The Echo The-Interdependency/zfae:docs/chapter-7.md

What changed

  • adds /chapters/ as the complete textbook index
  • adds /chapters/chapter-zero/ through /chapters/chapter-seven/
  • fetches each declared source from its exact resolved main commit and blob during the build
  • records SHA-256 content identity, retrieval time, source URL, and fallback state per chapter
  • renders exact Markdown through a static, HTML-disabled Markdown renderer
  • preserves Chapter Seven’s explicit theory under development status
  • adds sequential previous/next reading navigation
  • adds the textbook to primary navigation, the knowledge-system homepage, footer state, and public /build.json
  • distinguishes the distributed textbook from the sole canon of The Interdependent Way in wayseer00/main
  • adds production fail-closed gates for chapter count, order, source locations, missing content, provenance, and fallback
  • adds unit, generated-artifact, browser, and accessibility coverage

File plan

Path Change Purpose Risk Required evidence
src/_data/textbook_sources.json create declare ordered chapter ownership source rename or relocation manifest/integrity test
scripts/fetch-textbook.mjs create retrieve exact source content and provenance network/source failure fail-closed production validation + retained snapshot policy
src/chapters/* create unified index and chapter readers long technical pages or Markdown edge cases generated/browser/accessibility tests
navigation, home, CSS modify make the textbook visible and readable navigation density and mobile overflow browser/accessibility checks
validation and build identity modify bind displayed chapters to exact repository identities stale fallback presented as current production gate + public build manifest
tests and README modify/create make the eight-chapter spine durable none full PR workflow

Authority boundary

This website does not merge chapter authority. Each chapter remains governed by the license and status vocabulary of its source repository. Citation does not transfer theorem, proof, empirical, frontier, or canonical status across chapters.

The canonical text of The Interdependent Way remains only wayseer00/main:canon/INTERDEPENDENT_WAY.txt. The distributed technical textbook is a separate reading object.

Offline behavior

A networked production build requires all eight live source files and fails if any source is absent or falls back. OFFLINE=1 may use a retained last-known-good snapshot; a clean checkout without one renders metadata-only hmmm records rather than inventing chapter text.

hmmm

The complete sequence is now displayable without centralizing ownership. Corrections still belong first in the repository that carries the affected chapter; this site follows those exact sources on the next verified build.

Comment thread tests/site-contract.test.mjs Fixed
Comment thread tests/site-contract.test.mjs Fixed
@erinepshovel-code
erinepshovel-code merged commit 0cf3ff1 into main Jul 21, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5ee176db9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .eleventy.js
eleventyConfig.addFilter('dateOnly', value => value ? String(value).slice(0, 10) : 'hmmm');
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 || '')));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve textbook math delimiters

For any fetched chapter that uses LaTeX-style math, this filter sends the text through plain markdown-it, which treats backslashes before ( and [ as Markdown escapes; for example \(\mathcal{O}\) and \[ ... \] render as (\mathcal{O}) and [ ... ]. That corrupts mathematical notation while the chapter page still presents the rendered text as exact source material, so the textbook renderer should either support math or protect those delimiters before Markdown rendering.

Useful? React with 👍 / 👎.

Comment on lines +148 to +149
const retained = previousByNumber.get(source.number);
chapters.push(retained ? { ...retained, ...source, fallback: true, retrievalError: 'offline requested; retained last-known-good chapter content' } : metadataOnly(source, 'offline requested; no retained chapter snapshot'));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reuse snapshots only for the same source

When OFFLINE=1 and textbook_sources.json changes the repository, path, branch, or title for an existing chapter number, this reuses the retained snapshot by number alone and then overlays the new manifest fields onto the old content and digest. An offline build can therefore display stale text while attributing it to a different source; only reuse the retained chapter when its source identity still matches, otherwise emit the metadata-only fallback.

Useful? React with 👍 / 👎.

if (!textbook.complete || textbook.fallback) throw new Error('production textbook refresh is incomplete or using fallback content');
for (const chapter of textbook.chapters) {
if (!chapter.content?.trim()) throw new Error(`chapter ${chapter.number} content missing`);
if (!/^[a-f0-9]{64}$/.test(chapter.contentSha256 || '')) throw new Error(`chapter ${chapter.number} digest missing`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify chapter digests against content

In a production validation run, this only checks that contentSha256 looks like a SHA-256 string, not that it is the digest of the chapter content being displayed. If the generated textbook JSON is restored or corrupted with changed content and a stale but well-formed digest, the build still publishes a false source identity in /build.json; recompute createHash('sha256').update(chapter.content).digest('hex') here before accepting the artifact.

Useful? React with 👍 / 👎.

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.

2 participants