Skip to content

Let Facet save reading links on teaching records that have no prose - #19

Merged
tig merged 1 commit into
mainfrom
fix/reading-only-teaching
Oct 14, 2026
Merged

tig merged 1 commit into
mainfrom
fix/reading-only-teaching

Conversation

@tig

@tig tig commented Oct 14, 2026

Copy link
Copy Markdown
Member

kindelwww#296 pins principles at 961aa456. That revision adds Further reading for every company set. The new teaching files hold only id, slug, and blog.

Adding, removing, or moving a reading link runs plan.js, which calls structuralShape. That check still required full teaching prose, so a valid list was rejected with errors such as "Why must stay between 3 and 6 paragraphs." I reproduced it with the Arm own-it record from that principles commit.

A teaching file whose keys are only id, slug, and blog now skips the prose counts. The reading list is still checked: it cannot be empty, each link still needs a title, an https URL, and a note, and a {lp:slug} token in a note still has to be listed on related. A file that includes any other field still has to carry the full teaching shape.

kindelwww#296 needs this on facet main before it can repin facet and copy lib/ into api/editor-lib. I am not reverting the principles pin.

Tests: node --test on the patch, allowlist, guard, reuse, lists, insert, essay link, and analytics suites (167 pass), plus node scripts/check-essay-links.js and node scripts/check-companies.js.

A teaching file with only id, slug, and blog is Further reading.
structuralShape still required the prose counts, so adding, removing,
or moving a reading link failed. Skip those counts when no prose field
is present, and keep the reading list checks.
@tig

tig commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T19:54:30.189516Z 072e12f Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 072e12f05c

ℹ️ 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".

@tig
tig marked this pull request as ready for review October 14, 2026 19:52
Copilot AI balanced review requested due to automatic review settings October 14, 2026 19:52
@tig tig self-assigned this Oct 14, 2026

Copilot AI 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.

🟢 Approval recommended

The narrow validation change preserves existing safeguards and has focused regression coverage.

0 open findings

What changed in this PR

Allows Facet to save reading-list changes on teaching records without prose, supporting the updated principles data.

Changes:

  • Skip prose requirements only for records containing id, slug, and blog.
  • Preserve reading-link validation and full teaching requirements for other records.
  • Add regression coverage for list edits and invalid content.
File Description
tests/​lists.test.mjs Tests reading-only edits and validation safeguards.
lib/​rules.js Allows reading-only records through structural validation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tig
tig merged commit 0ad89b6 into main Oct 14, 2026
2 checks passed
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