Restore the Interdefinables heading hierarchy - #13
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fe9938682
ℹ️ 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".
| }; | ||
|
|
||
| while (headingStack.length && headingStack.at(-1).level >= level) headingStack.pop(); | ||
| headingStack.push({ id, level }); |
There was a problem hiding this comment.
Update parent IDs after duplicate heading renames
If a refreshed canon repeats a heading slug within the same section and either copy has lower-level children, this stores the pre-deduplicated id in headingStack; the duplicate pass later suffixes unit.id values but never rewrites existing parentIds. Those children then get dangling heading-parent edges and the new unit page parent lookup renders an empty “Parent heading” despite the parent unit existing under its suffixed ID.
Useful? React with 👍 / 👎.
| assert.ok(interdefinablesSection >= 0, 'Interdefinables section missing'); | ||
| assert.ok(humanHeading > interdefinablesSection, 'Human consciousness must appear inside Interdefinables'); | ||
| assert.ok(binaryHeading > humanHeading, 'Human consciousness child headings must follow their parent'); | ||
| assert.ok(preambleSection > binaryHeading, 'Preamble must be the next major section after Interdefinables'); |
There was a problem hiding this comment.
Skip fallback-only Preamble order in generated test
When _site is built from the documented fallback mirror, such as with OFFLINE=1 or a GitHub fetch failure, the checked-in mirror has Preamble before The Interdefinables, and validate-content intentionally skips the remote-only order gate for canon.source.fallback. This unconditional assertion makes npm run check fail in fallback builds even though that recovery path is supposed to remain supported.
Useful? React with 👍 / 👎.
Purpose
Corrects the canonical opening hierarchy so Human consciousness emerges from is a subheading beneath The Interdefinables, its binary/trinary/archetype headings remain nested beneath it, and Preamble is the next major section.
What changed
The InterdefinablesandPreambleas level-2 peer sectionsHuman consciousness emerges fromas a level-3 child ofThe InterdefinablesparentIdrelationships andheading-parentedges without removing existing section edgesFile plan
scripts/canon-parser.mjsscripts/validate-content.mjssrc/way/index.njk,src/way/unit.njk, CSSdocs/content-model.mdCanon boundary
The controlling source remains
wayseer00/main:canon/INTERDEPENDENT_WAY.txt. This patch changes no canonical wording. It corrects how the website represents the relationships already present in that source.Usage
Run
npm run validateafter any canon refresh. A build now fails ifHuman consciousness emerges frombecomes a peer section, losesThe Interdefinablesas its parent, or if the controlling remote canon inserts another major section beforePreamble.hmmm
The checked-in recovery mirror still contains older wording and physical ordering. This patch interprets its heading relationships correctly but does not silently elevate that recovery copy into a competing canon source.