Detail bug report: View on Detail
resolveEffectiveRuleConfig (the §6 b upgrade policy) treated "config parses under the new schema" as "lossless upgrade" and auto-advanced the effective rule version. For min-merged-prs, the v2 schema gives trustedAfter a Zod default of 1, so every v1-authored config {min: N} (the only shape authorable under v1) parsed under v2 and silently auto-advanced to min-merged-prs@2. There, min means a different signal ("merged PRs in other people's repos" instead of "merged PRs in this repo") and a new trustedAfter: 1 exemption was auto-created — a moderation gate silently weakened in production with no proactive disclosure (the hold guard was dead code for this rule, the Rules page showed no badge).
Closes #175
Added an optional carriesForward shape-gate predicate to the RULE_CATALOG entry type. For min-merged-prs, the predicate checks that the config has trustedAfter (the field v2 introduced) — a config without it was authored under v1 and must be HELD for re-confirmation, not silently re-interpreted. The resolver now ANDs the shape gate with schema-parse success:
const carriesForward =
entry.configSchema.safeParse(row.config).success &&
("carriesForward" in entry ? entry.carriesForward(row.config) : true);
Rules whose config schema is identical across versions (e.g. ai-review) don't declare a carriesForward gate, so schema-parse success alone remains sufficient for them — no regression to the lossless upgrade path.
packages/contracts/src/rules.ts — added carriesForward to the catalog type and the min-merged-prs entry; updated resolveEffectiveRuleConfig and the ResolvedRuleConfig.held docstring.packages/contracts/src/rules.resolve.test.ts — added tests for the v1-shape hold ({min} only), the empty-object hold, and the ai-review lossless auto-advance case.packages/contracts/src/rules.resolve.test.ts, packages/core/src/rules/min-merged-prs.test.ts) — 16 pass, covering the v1-shape hold, empty-object hold, unparseable-config hold, v2-shape auto-advance, ai-review lossless auto-advance, already-current, never-bumped, and unknown-rule paths.{min: 5} config now resolves HELD on min-merged-prs@1, where a contributor with 1 local merge is blocked — confirming the silent weakening no longer occurs. The v2 path that would have passed them via the trustedAfter: 1 default still exists when the config is genuinely v2-shaped.packages/db/src/services/, apps/worker/src/jobs/) — 447 pass, confirming the DB service layer (listRuleViews/saveRuleConfig) and the worker's run path that consume resolveEffectiveRuleConfig have no regressions.packages/contracts/src/, packages/core/src/) — 1405 pass.Automatic Fixes PRs can be configured here.
The latest updates on your projects. Learn more about Unkey Deploy
| Name | Status | Preview | Inspect | Updated (UTC) |
|---|---|---|---|---|
| tripwire / web (preview) | Ready | Visit Preview | Inspect | Nov 7, 2026 6:58am |
@detail-app[bot], Tripwire blocked this change request.
Rate limit: You opened 61 change requests in a short time. Wait before you open another.
A new commit will not fix this.
If you think it should merge anyway, say so in a comment. A maintainer will decide.
Re: github.com/Boring-Software-Inc/…/188
The tripwire check is failing with Blocked by Rate limit (per github.com/Boring-Software-Inc/…/188) — 61 change requests opened in a short window. This is an infrastructure/rate-limit block, not a code issue: no PR-side commit can resolve it. The PR is otherwise MERGEABLE with no other failing checks. Leaving for a maintainer to decide whether to merge/override.
Sign in to comment.