Skip to content

Update last30days plugin from upstream + refactor#18

Open
dguido wants to merge 5 commits intomainfrom
update/last30days
Open

Update last30days plugin from upstream + refactor#18
dguido wants to merge 5 commits intomainfrom
update/last30days

Conversation

@dguido
Copy link
Copy Markdown
Member

@dguido dguido commented Feb 15, 2026

Summary

Updates last30days from upstream mvanhorn/last30days-skill, then refactors and adds tests.

Upstream commits since last import: 20 (2025-06-15 → 2025-08-02)

Changes

From upstream (commit 3d92772)

  • YouTube search and transcript extraction via yt-dlp (no API key needed)
  • Native web search backends: Brave, OpenRouter, Parallel AI
  • Mock/fixture mode for testing without API keys
  • Reddit thread enrichment (fetches top comments with engagement)
  • Model auto-selection (queries OpenAI/xAI APIs for latest models)
  • Result caching (24h TTL for research, 7d for model selection)
  • Progress display with source diagnostics
  • Entity extraction for supplemental searches
  • WebSearch date confidence scoring

Local improvements

Remove Bird CLI, fix review findings (4003f6e):

  • Remove Bird CLI integration entirely (prefer xAI native)
  • Fix f-string injection in subprocess calls
  • Add --no-warnings to yt-dlp commands
  • Fix silent exception swallowing in entity extraction

Refactor: dataclass, smaller main(), remove dead code (85b0952):

  • Replace 12-element tuple return from run_research() with ResearchResult dataclass
  • Break main() from ~340 lines to 93 by extracting 8 helper functions
  • Replace 16-line if/elif source mapping with _SOURCE_TO_MODE dict
  • Remove dead X supplemental code path in _run_supplemental()
  • Delete store.py (691 lines), briefing.py, watchlist.py — write-only persistence that nothing read back
  • Remove --store flag from CLI, SKILL.md, and README
  • Fix stale "Bird CLI" reference in SKILL.md

Add tests (824423f):

  • 115 tests across 4 modules (dates, score, dedupe, normalize)
  • Covers scoring formulas, engagement normalization, date filtering, deduplication, sort tiebreaking

Net effect

  • +4,012 / -475 lines across 35 files
  • ~900 lines of dead code removed (store/briefing/watchlist)
  • 115 new tests, all passing

Checklist

  • Upstream changes reviewed and triaged
  • Transforms applied (path substitution, platform cleanup)
  • Bird CLI removed, xAI preferred
  • Linters pass (ruff check, ruff format)
  • Tests pass (115/115)
  • Version bumped in plugin.json and marketplace.json

dguido and others added 2 commits February 15, 2026 16:33
Checks an imported plugin's upstream source for changes since import,
categorizes commits, maps files, and walks the user through interactive
triage before applying approved updates via PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Downstream 20 upstream commits adding YouTube search (yt-dlp), Bird CLI
for free X search via browser cookies, native web search backends
(Brave, OpenRouter, Parallel AI), SQLite persistence, watchlist/briefing,
global timeout watchdog with child process cleanup, and Reddit 429
rate-limit fail-fast. Bump version 1.0.0 to 1.1.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dguido and others added 3 commits February 15, 2026 17:07
- Remove Bird CLI (vendored JS, cookie-based X search) — X search
  now uses xAI API exclusively
- Fix SQL injection surface in store.py update_run/update_finding
  by validating kwargs keys against allowed column sets
- Fix config_exists() crash when CONFIG_FILE is None
- Fix openrouter_search.py HTTP-Referer pointing to wrong repo
- Fix silent exception swallowing in Reddit retry logic
- Fix update-skill.md using rm -rf (use trash instead)
- Simplify env.py, ui.py, render.py to remove Bird references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace 12-element tuple return from run_research() with ResearchResult
  dataclass for readability and type safety
- Break main() from ~340 lines to 93 by extracting _parse_args(),
  _resolve_depth(), _resolve_sources(), _select_models(),
  _process_results(), _run_diagnose(), _build_source_info(), _emit_result()
- Replace 16-line if/elif source mapping with _SOURCE_TO_MODE dict
- Remove dead X supplemental code path in _run_supplemental()
- Delete store.py (691 lines), briefing.py, watchlist.py — write-only
  persistence feature that was never read back
- Remove --store flag from CLI, SKILL.md, and README
- Fix stale "Bird CLI" reference in SKILL.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
115 tests covering the four pure-logic modules:
- test_dates: date parsing, ranges, confidence, recency scoring
- test_score: engagement computation, normalization, scoring for
  Reddit/X/YouTube/WebSearch, sort order and tiebreaking
- test_dedupe: text normalization, n-grams, Jaccard similarity,
  duplicate detection, deduplication with score preservation
- test_normalize: date range filtering, normalization of raw API
  data to schema objects for all four source types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dguido dguido changed the title Update last30days plugin from upstream Update last30days plugin from upstream + refactor Feb 15, 2026
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