Home

boring / v2

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

feat(core): min-merged-prs@2 — fix an unsatisfiable rule

4 months ago

8b250b5
Authored
grim7/13/2026, 9:05:29 AM
@1 required merged change requests IN THIS repo — unsatisfiable for any
first-timer (to merge here you must open here; to open you must already
have merged here). a repo with min:1 silently banned every new
contributor forever, and its "wait" remedy was a lie.

ship @2; leave @1 FROZEN and registered (stored runs stay interpretable).

- new meaning: GLOBAL merged change requests, excluding repos the
  contributor owns (`author:X is:pr is:merged -user:X`). the real signal
  is "someone else accepted their work" — unforgeable by a self-created,
  self-merged PR. push-to-others'-repos isn't a cheap search qualifier;
  excluding by ownership closes the stated attack (recorded limitation).
- mergedInRepo becomes an EXEMPTION, not a requirement: a proven local
  contributor (>= trustedAfter merges here) passes regardless of global
  count. the count stays in evidence — a free trust signal.
- ForgeAdapter contributor read gains mergedElsewhere: number | null;
  null (not 0) on a failed read, so the rule SKIPS rather than guesses.
- config { min: 1, trustedAfter: 1 } with .describe() on every field.
  safe: the rule is non-baseline (off until enabled), and min:1 is always
  satisfiable (contribute anywhere you don't own) — the property @1
  lacked.
- remedy honestly "wait" with a threshold-free waitHint; publicEvidence
  exposes observed counts only (leak-invariant holds).

history proven untouched: `bun run replay --corpus` = 15 runs · 13
unchanged · 2 flips · 0 skipped (both flips pre-existing, on
account-age@1). tests: @1 frozen, @2 pass/fail/skip/exempt, self-owned
merge excluded, global-unavailable ⇒ skip, registry + leak invariants.
checks: typecheck all, biome, boundaries, 223 tests.

Parentc112fbe

17 files changed
  • DECISIONS.md+50−0
  • all-summaries.md+23−0
  • apps/worker/src/context.ts+1−0
  • apps/worker/src/moderation.integration.test.ts+20−5
  • apps/worker/src/process-event.integration.test.ts+2−0
  • apps/worker/src/toggles.integration.test.ts+1−0
  • packages/contracts/src/rules.ts+25−4
  • packages/core/src/context.ts+6
−0
  • packages/core/src/rules/min-merged-prs.test.ts+53−2
  • packages/core/src/rules/min-merged-prs.ts+73−3
  • packages/core/src/rules/public-view.test.ts+8−1
  • packages/core/src/rules/registry.test.ts+4−1
  • packages/core/src/rules/registry.ts+3−1
  • packages/core/src/rules/test-context.ts+1−0
  • packages/forge-github/src/client/reads.test.ts+78−0
  • packages/forge-github/src/client/reads.ts+35−21
  • packages/forge/src/index.ts+6−0