Conversation
Design for issue #90. The scheduler self-heal overwrites a topic's stored title with check.DisplayName on any difference, so a noisier Check title clobbers a good add-time title every poll. Kinozal also fetches its Check title from the raw mirror host while the rest of the plugin pins kinozal.tv, producing the divergent title. Spec: a display_name_is_placeholder provenance flag (migration 0010) gates self-heal to placeholder-only and locks on first resolve; plus canonicalize kinozal's Check title host. Lock all existing rows.
Also apply gofmt to domain/domain.go, topics/create.go, and kinozal/kinozal_test.go (whitespace-only alignment fixes left by earlier tasks in the series).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sonarr-imported topics (issue #90) showed the forum main-page / category title instead of the release name, and the correct name disappeared after the first scheduler check.
Two independent defects combined:
Check.DisplayNameon any difference — a noisierChecktitle clobbered a good add-time title every poll.Checkfetched its title from the raw mirror host (e.g.kinozal.guru) while the rest of the plugin pinskinozal.tv, so the title source diverged from add-time metadata.Fix
topics.display_name_is_placeholderprovenance flag (migration0010). Set once at creation:trueonly when the title is a trackerParseplaceholder;falsewhen caller-supplied or resolved viaResolveMetadata.true, and locks on first resolve — a resolved title can never be downgraded (fixes the class for every tracker, not just Kinozal).UpdateDisplayNameclears the flag on resolve; a user rename clears it only on an actual name change.Checknow canonicalizes its title URL top.domain(matchingResolveMetadata/fetchInfohash/Download), preserving request-forgery safety — defense-in-depth at the source.Tests
TDD throughout; full suite green with
-race(37 packages, gofmt clean). Key regression test: a resolved-title topic whoseCheckreturns a differentDisplayNameis not overwritten; a placeholder topic is upgraded exactly once, then locked.Design + plan:
docs/superpowers/specs/2026-06-25-self-heal-display-name-gate-design.md,docs/superpowers/plans/2026-06-25-self-heal-display-name-gate.md.Closes #90