Stu Mason
Stu Mason

Activity

StuMason/progress
stumason.dev
TypeScript
Pull Request Closed

PR #86 closed: feat: AI summaries for feed items (cheap LLM pass over automated activity)

Stacked on #85 — merge that first; GitHub will retarget this to main.

Why

Even with bot noise filtered (#85), raw PR bodies are written for reviewers, not clients. This adds the AI pass: a cheap model rewrites each PR/release into 1–2 plain-English sentences for the feed cards.

What

  • SummarizeFeedItem action using the already-installed openai-php/laravel (no new dependency). Model: gpt-5-mini by default, OPENAI_FEED_SUMMARY_MODEL env to override. Stores metadata.ai_summary; the DTO excerpt from #85 automatically prefers it.
  • Queued SummarizeFeedItemJob dispatched at ingest (webhook + 30-min sync) for PR/release items with a body and no existing summary. No-ops gracefully when OPENAI_API_KEY is unset.
  • php artisan feed:summarize backfill command (--limit, --force, --queue).
  • Bugfix: re-syncs rebuilt metadata from the raw event every 30 min, which would have wiped summaries — both ingest paths now preserve ai_summary.
  • Bugfix: the homepage feed renders StreamItem, not FeedItemCard — switched its body preview to the new excerpt (verified in browser: summaries render on the cards).
  • phpunit now blanks OPENAI_API_KEY so the suite can never hit the live API.

Example output (real, local)

PR #120 merged: fix: correct API path for listing application deployments Fixes 404 when fetching an app's deployment history by using the correct Coolify v4 endpoint GET /api/v1/deployments/applications/{uuid} instead of the incorrect /api/v1/applications/{uuid}/deployments.

After merge

  1. Set OPENAI_API_KEY (and optionally OPENAI_FEED_SUMMARY_MODEL) in prod env
  2. php artisan feed:summarize --limit=100 (or --queue to push through Horizon)

Cost: pennies — each item is one small completion on a mini model.

+307
additions
-6
deletions
10
files changed