Repository navigation
fix: require author breadth or engagement for hot topics - #1519
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the Hot topics eligibility and source-window changes.
No open issues 🎉
What changed in this PR
This PR updates Hot topics eligibility so repeated posts by one author cannot qualify a topic alone, while a sufficiently engaging single thread can qualify.
Changes:
- Require multiple root authors or one thread meeting the existing age-discounted engagement threshold.
- Extend discovery and recap source windows from eight to twelve hours.
- Update public documentation and regression coverage for engagement, author breadth, scoring thresholds, and time boundaries.
| File | Description |
|---|---|
tests/Unit/Queries/HotHeadlinesQueryTest.php |
Covers revised eligibility, engagement thresholds, and twelve-hour boundaries. |
tests/Unit/Jobs/GenerateHeadlineSummaryTest.php |
Updates recap time boundaries and engagement fixtures. |
KNOWLEDGE_BASE.md |
Documents qualification rules and extended source windows. |
app/Queries/HotHeadlinesQuery.php |
Implements author-breadth or single-thread eligibility and the shared window constant. |
app/Queries/HeadlineSummaryCommitsQuery.php |
Uses the shared twelve-hour window for recap sources. |
Review effort: Balanced
Summary
Hot topics could qualify from two posts by the same author, while an engaging discussion with only one root post could not qualify. Require either multiple root authors or a sufficiently trending individual thread, and extend the discovery window from eight to twelve hours.
Changes
Validation
All checks passed locally on the final tree:
vendor/bin/pint --dirty --format agent— passed.vendor/bin/pest tests/Unit/Queries/HotHeadlinesQueryTest.php --compact— 16 tests, 31 assertions passed.vendor/bin/pest tests/Feature/Controllers/Api/MentionSuggestionControllerTest.php tests/Feature/Controllers/MentionSuggestionControllerTest.php --compact— 49 tests, 134 assertions passed.composer test:lint— passed; warnings remain in unchanged frontend files.composer test:types— passed.composer test:type-coverage— passed, 100%.bun run test:unit— 308 Node tests passed, including the nested Vitest suite.php -d memory_limit=-1 vendor/bin/pest --parallel --ci --coverage --exactly=100.0 --passthru-php="'-d' 'memory_limit=-1'"— 5,879 tests, 31,665 assertions passed; 100% coverage.git diff --check— passed.Visual and device verification are inapplicable: no component styles, layout or interactions changed. This PR uses the text-only template; no inspection captures are included. Hosted CI is separate from these local results.
Independent review
Independent read-only reviewer: PASS for correctness, regressions, architecture and meaningful tests, with no unresolved findings.
af8dc37a15b73ac59bcd74b1435e53dfabd55dca67a61acf078865e5fbad8e696d80076f52b33d48Limitations
The cutoff has not yet been calibrated against labeled production examples. Production-scale query performance and real-world relevance remain unverified. No production data was accessed or modified; ground-truth sampling is deferred until read-only access is available.
Summary by CodeRabbit