Skip to content

Check Related reading and the search index on the built site - #105

Merged
bits-bytes-nn merged 1 commit into
mainfrom
review-r12
Oct 16, 2026
Merged

bits-bytes-nn merged 1 commit into
mainfrom
review-r12

Conversation

@bits-bytes-nn

Copy link
Copy Markdown
Owner

Third round of adversarial review: two gates that passed on a broken site.

  • Related reading: with docs[i].data["related"] = [] in _plugins/related_posts.rb, every post lost its block (36 → 0) and all five gates passed. script/check-plugin-output.rb now ranks each post with RelatedPosts.rank and fails when the ranking finds related posts but the page has no class="related-posts" block. RelatedPosts.meta builds the ranking input, so the hook and the check share it.
  • Search index: with the comma after "url" dropped from search.json, the built index did not parse (site search finds nothing) and all gates passed. The check now parses it and requires one entry per post with a url and text.

Both verified on scratch copies: each mutation now fails the check, and the unmodified build passes.

No change to _data/post_conventions.yml and no new lint rule.

Checks: all five gates pass on a fresh build.

Every gate passed with the related list emptied in related_posts.rb, and with
a comma dropped from search.json, which leaves site search finding nothing.
check-plugin-output.rb now fails a post the ranking gives related posts but
whose page has no Related reading block, and a search index that does not
parse or lacks a post. RelatedPosts.meta builds the ranking input for both
the hook and the check.
@bits-bytes-nn
bits-bytes-nn merged commit b705a67 into main Oct 16, 2026
3 checks passed
@bits-bytes-nn
bits-bytes-nn deleted the review-r12 branch October 16, 2026 15:28
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.

1 participant