Repository navigation
feat: refresh hot-topic recaps with concise event-focused briefs - #1393
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the recap and refresh-command changes.
No open issues 🎉
What changed in this PR
Updates the backend hot-topic recap pipeline to produce concise, event-focused briefs and lets operators refresh current recaps immediately without changing the scheduled two-hour reuse behavior.
Changes:
- Revises writer guidance toward one or two short sentences, targeting 300 characters while retaining existing safeguards.
- Adds synchronous
headlines:refresh, preserving existing recaps until a replacement passes publication checks. - Adds refresh-command tests and updates the public recap documentation.
| File | Description |
|---|---|
tests/Feature/Commands/RefreshHeadlineSummariesTest.php |
Tests refresh behavior, conflicting updates, abstention, and sanitized failures. |
KNOWLEDGE_BASE.md |
Documents the event-focused recap style. |
app/Console/Commands/RefreshHeadlineSummariesCommand.php |
Adds synchronous refresh for the current hot-topic shortlist. |
app/Ai/Agents/HeadlineSummaryWriter.php |
Refines instructions for concise, grounded briefs. |
app/Actions/CreateHeadlineSummary.php |
Supports forced refresh and checks recap timestamps and sources before publication. |
Review effort: Balanced
Summary
Make hot-topic recaps explain the underlying situation or event instead of cataloguing individual posts. Add
php artisan headlines:refreshto regenerate current hot-topic recaps immediately without waiting for the scheduled job or the two-hour reuse window.This is separate from the Hot topics UI PR and targets upstream
productiondirectly.Changes
Validation
php artisan test --compact tests/Feature/Commands/RefreshHeadlineSummariesTest.php tests/Unit/Jobs/GenerateHeadlineSummaryTest.php tests/Unit/Jobs/GenerateHotHeadlineSummariesTest.php tests/Unit/Services/HeadlineProviders/OpenAIHeadlineProviderTest.php— 67 passed, 213 assertions. Covers immediate replacement of fresh recaps, missing recaps, cold/no topics, abstention, competing updates, source changes, sanitized failures, existing scheduled reuse, and provider contracts.composer test:lint,composer test:types,composer test:type-coverage, andbun run test:unit— all passed. Type coverage is 100%; JavaScript unit tests: 222 passed. Existing non-failing lint warnings remain in unchanged files.php -d memory_limit=-1 vendor/bin/pest --parallel --ci --coverage --exactly=100.0 --passthru-php="'-d' 'memory_limit=-1'"— 5,455 passed, 29,314 assertions, 100% coverage.php artisan headlines:refresh --helpconfirms command registration and synchronous-refresh description.Independent review
PASS, no blocking findings, from independent read-only review of exact base e557d66c → head 976f420e. Review covered the complete five-file diff, surrounding code/tests, user intent, concurrency/invalidation, privacy, architecture, and meaningful coverage. Visual/device review is inapplicable to this backend/CLI/prompt-only diff.
The reviewer inspected the targeted-test and JavaScript logs but did not rerun tests. Full PHP coverage was pending at review time; its final outcome is reported above. No live-provider style evaluation was performed.
Limitations
Summary by CodeRabbit