Skip to content

fix: never strand changes when triage is unavailable; de-noise digest - #7

Merged
krayong merged 2 commits into
mainfrom
fix/triage-stranding-scheduler-env-feed-titles
Jun 26, 2026
Merged

fix: never strand changes when triage is unavailable; de-noise digest#7
krayong merged 2 commits into
mainfrom
fix/triage-stranding-scheduler-env-feed-titles

Conversation

@krayong

@krayong krayong commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

Triage and delivery had a gap that silently dropped real changes (a change detected during an AI-unavailable run was stranded out of the digest forever), plus two sources of digest noise and a scheduled-run triage failure. Each fix is TDD'd.

Fixes

  • Triage worklist is ledger-sourced. run_once triaged only this-run detections, so a change recorded during a run that could not triage kept a NULL verdict and was never re-detected (its content hash / feed seen-set already matched) — stranding it out of the digest forever. store.changes_needing_triage() now returns every verdict IS NULL AND superseded = 0 row, so a later run drains the backlog.
  • Send-all when triage cannot run. When the triager returns unavailable, the run marks every untriaged row substantive (no description) so the digest still goes out with the AI-unavailable banner instead of withholding the changes — same effect as the noop triager.
  • Scheduler units carry user env. [schedule.env] is baked into the launchd plist / systemd unit / crontab alongside PATH, so an account-aware claude wrapper can resolve a profile (e.g. CLAUDE_ACCOUNT) from the bare scheduled environment that otherwise fails triage.
  • Exclude the GKI per-version build-list pages (/docs/core/architecture/kernel/gki-android...-builds) from source-android: they auto-regenerate with new build rows on nearly every crawl, churning the digest without telling a developer anything. The curated GKI docs (gki-faq, gki-releases, gki-versioning, …) are still watched.
  • Synthesize a feed title from the summary when the entry title is only a date (the AndroidX aggregate feed titles every entry by date, e.g. "June 24, 2026"). Display-only: the dedupe identity and title+summary hash still use the original feed values, so the rewrite never re-fires the seen-set.

Testing

uv run pytest — 486 passed. ruff check / ruff format --check clean. New tests cover: ledger-sourced triage drain, send-all on unavailable, [schedule.env] load + plist/systemd/crontab embedding + TUI round-trip, GKI exclusion against the shipped catalog, and date-title synthesis (single, multi, fallback, non-date untouched).

🦇 Generated by Penny-One at Batcave

krayong and others added 2 commits June 26, 2026 17:43
Triage and delivery had a gap that silently dropped real changes, plus two
sources of digest noise. Fixes, each with tests:

- Triage worklist is now ledger-sourced. `run_once` triaged only this-run
  detections, so a change recorded during a run that could not triage kept a
  NULL verdict and was never re-detected (its content hash / feed seen-set
  already matched) — stranding it out of the digest forever.
  `store.changes_needing_triage()` returns every `verdict IS NULL AND
  superseded = 0` row, so a later run drains the backlog.
- Send-all when triage cannot run. When the triager returns `unavailable`, the
  run now marks every untriaged row substantive (no description) so the digest
  still goes out with the AI-unavailable banner instead of withholding the
  changes — same effect as the noop triager.
- Scheduler units carry user env. `[schedule.env]` is baked into the launchd
  plist / systemd unit / crontab alongside PATH, so an account-aware `claude`
  wrapper can resolve a profile (e.g. CLAUDE_ACCOUNT) from the bare scheduled
  environment that otherwise fails triage.
- Exclude the GKI per-version build-list pages (`/docs/core/architecture/
  kernel/gki-android...-builds`) from source-android: they auto-regenerate with
  new build rows on nearly every crawl, churning the digest without telling a
  developer anything. The curated GKI docs are still watched.
- Synthesize a feed title from the summary when the entry title is only a date
  (the AndroidX aggregate feed titles every entry by date). Display-only: the
  dedupe identity and title+summary hash still use the original feed values.

Co-Authored-By: Penny-One (Batcave) <noreply@anthropic.com>
A single drain of hundreds of changes runs many sequential `claude -p` calls;
a batch of 25 items (up to 100KB of page content) could exceed the 120s
subprocess timeout, tripping the run's AI-unavailable banner and the send-all
fallback even though most batches succeeded. Shrink the batch (25 -> 12) and
raise the per-call timeout (120s -> 300s) so a one-shot drain finishes cleanly;
steady-state runs are unaffected.

Co-Authored-By: Penny-One (Batcave) <noreply@anthropic.com>
@krayong
krayong merged commit 93f5a49 into main Jun 26, 2026
2 checks passed
@krayong
krayong deleted the fix/triage-stranding-scheduler-env-feed-titles branch June 26, 2026 15:14
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