Skip to content

File the remaining orphaned categories - #200

Merged
ssavutu merged 1 commit into
mainfrom
fix/sports-subsection-rollup
Aug 7, 2026
Merged

File the remaining orphaned categories#200
ssavutu merged 1 commit into
mainfrom
fix/sports-subsection-rollup

Conversation

@ssavutu

@ssavutu ssavutu commented Aug 6, 2026

Copy link
Copy Markdown
Member

Follow-on to #199, which fixed the sports half of the same bug.

What's left

#199 left 436 published articles matching no section or subsection — still published, still reachable by direct link and by search, on no section page. Same cause: WordPress rolled a parent category up over its child terms, and flat matching has nothing to roll up through. The ReportOrphanedArticles warning added in #199 has been naming them at every boot since.

The calls

Filed by what the articles actually are:

Section Categories
Entertainment Style and its features (306 articles), TV, Exhibits, Reel2Reel, Features, Restaurant/Beer Reviews, Last Call
Opinion Editorial (103), Letters to the Editor, Commentary
Columns Podcasts (75) and the recurring shows
Comics & Puzzles Word Search
Science & Tech Technically Speaking
News Paid Post

Two worth stating out loud:

  • Style → Entertainment, not Opinion's Lifestyle. It's culture coverage, not opinion writing, and it's the single biggest bucket at 306 articles.
  • Paid Post → News is the weakest call here. It isn't news; it's sponsored content. But an advertiser paid for it to be visible and nothing fits better. Happy to move it if the desk disagrees.

The one to watch

"Mark and Jair Explain Sports" is a show, not a sports article — and it was one of the 31 articles that unanchored matching wrongly counted into Sports before the exact-match fix. Anchored patterns keep it out of Sports while the alias puts it in Columns. TestPodcastNamedForASectionStaysOutOfIt pins both halves.

TestNoCategoryIsAliasedToTwoSections is also new: an alias claimed by two sections would put one article on both section pages, which reads as a duplicate rather than as a misconfiguration — the same way the original bug read as a normal section.

Needs a data edit too

entertainment and science-tech already hold aliases, and SeedDefaultCategoryAliases only writes where the column IS NULL — deliberately, so an editor's clear isn't resurrected on every restart. So those two rows will not be topped up by this merge and must be updated directly (SQL in the PR discussion, or the sections screen). The map stays the source of truth for a database built from scratch; the comment on it now says so.

Without that edit, the Style family — 306 of the 436 — stays orphaned.

Testing

go build, go vet, full suite green. Expect the startup warning to drop from 436 to near zero once both the merge and the data edit are in.

🤖 Generated with Claude Code

The sports fix left 436 published articles matching no section or
subsection: still published, still reachable by direct link and by search,
on no section page. Same cause -- WordPress rolled a parent category up
over its child terms, and flat matching has nothing to roll up through --
and the startup warning has been naming them since the last deploy.

Filed by what the articles are:

  Entertainment  Style and its features (306 articles), TV, Exhibits,
                 Reel2Reel, Features, and the reviews columns. Style is
                 culture coverage, not opinion writing, so it goes here
                 rather than under Opinion's Lifestyle.
  Opinion        Editorial (103), Letters to the Editor, Commentary --
                 the section's own voice, filed under neither.
  Columns        Podcasts (75) and the recurring shows. Columns is where
                 bylined series live.
  Comics&Puzzles Word Search.
  Science & Tech Technically Speaking.
  News           Paid Post. The weakest of these: it is not news, but an
                 advertiser paid for it to be visible and nothing fits
                 better.

"Mark and Jair Explain Sports" is the one to watch. It is a show, not a
sports article, and it was one of the 31 that unanchored matching wrongly
counted into Sports. Anchored patterns keep it out while the alias puts it
in Columns, and a test pins both halves.

TestNoCategoryIsAliasedToTwoSections is new: an alias claimed by two
sections would put one article on both section pages, which reads as a
duplicate rather than as a misconfiguration -- the same way the original
bug read as a normal section.

entertainment and science-tech already hold aliases, and the seed only
writes where the column IS NULL so it will not top them up. Those two rows
are updated directly on the live database; the map stays the source of
truth for a database built from scratch. The comment on it says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ssavutu
ssavutu force-pushed the fix/sports-subsection-rollup branch from de6991e to c0f2ae9 Compare August 7, 2026 04:10
@ssavutu
ssavutu merged commit 871b9c0 into main Aug 7, 2026
6 checks passed
@ssavutu
ssavutu deleted the fix/sports-subsection-rollup branch August 7, 2026 04:34
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