Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

fix(runs): dedupe the joined-run feed at render, never in storage

3 months ago

16a75f6
Authored
grim7/24/2026, 7:37:33 PM
a run joins multiple workflow defs (§5.11) — user workflows plus the derived
default over leftover rules. that produced a feed with the trigger repeated per
def and the same block/comment/check shown several times, unreadable.

the fix is render-time ONLY, in the RunView assembly (loadRunView). persisted
run_steps / run_actions stay 1:1 with execution: stats (getRulesStats counts
those rows), replay, economics, and every webhook/discord delivery read the raw
rows, not this view — so nothing is suppressed, only the feed reads clean.

- collapse the repeated trigger to one (no reader counts trigger steps; replay
  ignores them).
- collapse duplicate PR-singleton actions (block, comment, set-check) to one —
  the adapter already dedupes the real github artifact by number/sha/verdict.
- NEVER collapse label / webhook / discord: their target (a label value, a
  delivery url) is stripped from the view (§10), so two sends to two urls stay
  two rows. collapsing a real delivery is the invariant this must not cross.

verified: stats read persisted rows directly (not the view); loadRunView is the
only consumer of the deduped shape (run page + copy-markdown); nothing reads a
per-def trigger verdict. no change to persistence, delivery, stats, moderation.

Parent83a0c2b

2 files changed
  • apps/web/src/lib/server/run-view-collapse.test.ts+73−0
  • apps/web/src/lib/server/run-view.ts+73−23