Home

boring / v2

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

feat(forge-github): rewrite the PR comment + review copy (§7/§12)

4 months ago

7047647
Authored
grim7/12/2026, 12:24:07 PM
The old comment counted rules ("tripped 1 of 8 rules" — meaningless to a
stranger), buried the run button in a "for maintainers" dropdown (but the run
page is the contributor's appeal surface now, §10), and told everyone to "fix and
push" even when the failing rule was account age, which no commit clears.

- never count rules: the comment speaks the failing rules' summarize() one-liners
  — max 2 inline (each with its wait-hint appended, "your account is 2 days old —
  it clears in 5 days"), 3+ collapse to "<first>, plus N other things."
- the run button renders VISIBLY, outside any <details>; the "for maintainers"
  wrapper is gone.
- the "how do i fix this?" body is chosen by the failing rules' remedies:
  all-revise / nothing-revisable / mixed; the appeal sentence rides along
  whenever anything is non-revise.
- @-mention the contributor on blocked + sent-to-review; drop the "tripwire:"
  prefix everywhere (the bot name carries it). the review stamp is one line:
  "blocked — {first reason}.".
- reasons are built in the worker (comment-reasons.ts) — the only legal core
  importer — from each step's stored envelope via the rule's own summarize/
  remedy/waitHint; emitPrSurface takes reasons and drops the stats rule-count.
- adjusted the rule one-liners to speak TO the contributor (this account → your
  account; found N → it adds N; percentage → "the title isn't in latin script").
  not a version bump — summaries are stored at persist time, so historical runs
  keep their text and stay interpretable (replay unchanged: 2 flips).
- regenerated the comment snapshots; replaced the condensedness test with
  assertions that matter (verdict line, visible button, no rule count, no prefix,
  contributor @-mentioned).

Checks: biome clean, typecheck 0, boundaries ok, 201 tests, replay 2 flips.

Parentff0fa8f

24 files changed
  • DECISIONS.md+34−0
  • all-summaries.md+17−0
  • apps/worker/src/jobs/comment-reasons.ts+53−0
  • apps/worker/src/jobs/pr-surface.ts+21−9
  • apps/worker/src/jobs/process-event.ts+1−1
  • apps/worker/src/jobs/resume-run.ts+3−12
  • apps/worker/src/jobs/run-workflows.ts+7−7
  • apps/worker/src/jobs/sweep-actions.ts+4
−0
  • apps/worker/src/process-event.integration.test.ts+4−2
  • apps/worker/src/sweep-actions.integration.test.ts+2−2
  • packages/core/src/rules/account-age.ts+1−1
  • packages/core/src/rules/crypto-address.ts+1−1
  • packages/core/src/rules/english-only.ts+1−2
  • packages/core/src/rules/honeypot.ts——
  • packages/core/src/rules/min-merged-prs.ts+3−1
  • packages/core/src/rules/pr-rate-limit.ts+1−1
  • packages/core/src/rules/profile-readme.ts+3−1
  • packages/core/src/rules/public-view.test.ts+2−2
  • packages/forge-github/src/actions/__snapshots__/actions.test.ts.snap+44−13
  • packages/forge-github/src/actions/actions.test.ts+59−19
  • packages/forge-github/src/actions/comment.ts+32−23
  • packages/forge-github/src/copy.ts+86−26
  • packages/forge-github/src/index.ts+8−5
  • spec.md+26−16