Home

boring / v2

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

fix: deny always blocks; rule link id, resume labels, moderation copy

3 months ago

afbde34
Authored
grim7/24/2026, 5:26:58 AM
four fixes from one debugging session, confirmed against prod (read-only)
on scratch #83.

- resume: the verdict is the maintainer's decision, not graph traversal.
  deny always blocks — a deny edge drawn to a non-block action (discord),
  or to nowhere, no longer resumes to pass. side-effect edges still conduct;
  a block action floors in when the graph produced none. approve resumes to
  the graph's verdict. extracted resolveResumeOutcome (pure, unit-tested).
- rules: the "edit in workflow" link built the definition wire id, not the
  editor's row id (two separate generateId() calls at create), so it 404'd.
  map wire->row via listEnabledWorkflowRows.
- run view: resumed steps carry a :resume suffix the snapshot label map
  lacks — strip it so the moderation node and its actions label correctly;
  label the synthetic deny-floor step as block.
- moderation queue: toast names the outcome, not the mechanism.

regression: resume-verdict.test.ts covers deny -> non-block action -> block.
moderation.integration.test.ts needs docker; ci runs it.

Parentf6545d5

7 files changed
  • apps/web/src/components/moderation/moderation-queue.tsx+5−2
  • apps/web/src/lib/rules.functions.ts+13−4
  • apps/web/src/lib/server/run-view.ts+29−2
  • apps/worker/src/jobs/resume-run.ts+35−14
  • apps/worker/src/jobs/resume-verdict.test.ts+56−0
  • apps/worker/src/moderation.integration.test.ts+1−1
  • packages/db/src/services/repos.ts+30−0