Repository navigation
Conversation
added 5 commits
August 19, 2026 19:18
… at read time (refs crn-evw98.3)
…read time (refs crn-evw98.3)
golangci-lint flags return nil, nil as ambiguous; the codebase already has a precedented idiom for this exact "no match" contract (recurrenceMatch in cmd/remember.go), so apply the same nolint:nilnil annotation rather than inventing a sentinel error. crn-evw98.3
Review round 1 (crn-0mdsv) flagged spec criterion 5 as unmet: getCmd's plain-text output printed the corrector's "id: title" line first, then a separate "redirected_from: <id>" line second -- never leading, never combining both ids on one line, no NOTE phrasing. Reorder/reword the two Printf calls so the NOTE line (when a redirect occurred) prints before the id:title line and names both the originally-requested id and the serving id in one line: NOTE: <original-id> redirected to <corrector-id> Update the two plain-text redirect tests to pin the new contract: TestGetRedirectsToCorrectionWhenOriginalIsRequested now asserts the leading line is exactly the NOTE line (order-sensitive, previously only an order-insensitive substring check that would not have caught this gap); TestGetDoesNotRedirectWhenNoCorrectionExists now asserts the absence of "NOTE:" rather than the no-longer-emitted "redirected_from" string. --json output (EntryResult.RedirectedFrom) is unchanged -- already correct per round 1's review.
Cross-topic-key Corrects/Supersedes link, consulted at read time.
Owner
Author
|
Superseded by #133 (crn-6b1g8), which merged the rebased + criterion-5-fixed redo of this feature (commit 161eaa9 -> squash-merged as 14eb15c). This PR was blocked on a genuine criterion-6 merge conflict (crn-v6jix) and was correctly never merged. Closing per mayor's standing authorization recorded on crn-v6jix's notes (2026-08-20). |
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.
Adds an explicit `Corrects` link on entries (set via `--corrects` on remember), followed at read time regardless of topic. Looking up an entry that has since been corrected now redirects to the correction and prints a leading note naming both the original and the corrector, instead of silently serving stale content.
Previously, corrections only linked entries within the same topic (an inferred match). This adds an author-declared link that crosses topics, matching how a single-topic lookup already prefers the more specific/current entry.