⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
packages/loopover-engine/src/signals/predicted-gate-engine.ts's extractLinkedIssueNumbers (lines 920-961, used at line 365) only replicates the maintainer-side gate's numeric cap (.slice(0, MAX_LINKED_ISSUE_NUMBERS)), with no overflow signal anywhere. The maintainer-side gate hard-fails a PR with 51+ distinct linked-issue references (src/db/repositories.ts's extractLinkedIssueNumbersWithOverflow and src/review/linked-issue-hard-rules.ts's resolveLinkedIssueHardRule). test/unit/predicted-gate-engine.test.ts:341 only asserts the array is capped, never that a blocking finding is produced. The local prediction tool can therefore never warn a miner about a PR that will be hard-failed purely for reference overflow.
Requirements
Add an overflow-aware extraction result to extractLinkedIssueNumbers (mirroring extractLinkedIssueNumbersWithOverflow's shape) and have buildPreflightResult emit a blocking finding matching resolveLinkedIssueHardRule's message when overflow is detected, so the local predicted-gate tool warns about this failure mode before a PR is ever pushed.
Deliverables
All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.
Test Coverage Requirements
packages/loopover-engine/** -- 99%+ patch coverage, branch-counted, on the new overflow-detection path.
Expected Outcome
A miner running the local predicted-gate preview against a PR with 51+ linked-issue references sees the same hard-fail warning the real maintainer gate would produce, instead of a silently-truncated, misleadingly-clean preview.
Links & Resources
packages/loopover-engine/src/signals/predicted-gate-engine.ts:365,920-961
src/db/repositories.ts
src/review/linked-issue-hard-rules.ts
test/unit/predicted-gate-engine.test.ts:341
Context
packages/loopover-engine/src/signals/predicted-gate-engine.ts'sextractLinkedIssueNumbers(lines 920-961, used at line 365) only replicates the maintainer-side gate's numeric cap (.slice(0, MAX_LINKED_ISSUE_NUMBERS)), with nooverflowsignal anywhere. The maintainer-side gate hard-fails a PR with 51+ distinct linked-issue references (src/db/repositories.ts'sextractLinkedIssueNumbersWithOverflowandsrc/review/linked-issue-hard-rules.ts'sresolveLinkedIssueHardRule).test/unit/predicted-gate-engine.test.ts:341only asserts the array is capped, never that a blocking finding is produced. The local prediction tool can therefore never warn a miner about a PR that will be hard-failed purely for reference overflow.Requirements
Add an overflow-aware extraction result to
extractLinkedIssueNumbers(mirroringextractLinkedIssueNumbersWithOverflow's shape) and havebuildPreflightResultemit a blocking finding matchingresolveLinkedIssueHardRule's message when overflow is detected, so the local predicted-gate tool warns about this failure mode before a PR is ever pushed.Deliverables
extractLinkedIssueNumbers(or a new sibling function) reports whether the 51-reference cap was exceededbuildPreflightResultemits a blocking finding matchingresolveLinkedIssueHardRule's real message when overflow is detectedengine-parity-fixtures.test.tsharness, confirming the predicted-gate result matches the real maintainer-gate hard-failAll of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.
Test Coverage Requirements
packages/loopover-engine/**-- 99%+ patch coverage, branch-counted, on the new overflow-detection path.Expected Outcome
A miner running the local predicted-gate preview against a PR with 51+ linked-issue references sees the same hard-fail warning the real maintainer gate would produce, instead of a silently-truncated, misleadingly-clean preview.
Links & Resources
packages/loopover-engine/src/signals/predicted-gate-engine.ts:365,920-961src/db/repositories.tssrc/review/linked-issue-hard-rules.tstest/unit/predicted-gate-engine.test.ts:341