Skip to content

Epic: converge remaining 15 hand-duplicated src/ <-> @loopover/engine files onto thin re-export shims #6202

Description

@JSONbored

Context

@loopover/engine (packages/loopover-engine/src/, 152 files) is this repo's intended single home for logic shared between ORB (the review/gate side, src/**) and AMS (the miner side, packages/loopover-miner/**). Convergence started with #4879 and has landed in pieces since, but a fresh audit (2026-07-15) found 15 files still hand-duplicated between src/ and packages/loopover-engine/src/ — byte-identical (or near-identical, modulo an import-path/doc-comment delta) copies that should instead be thin re-export shims pointing at the engine, exactly like src/settings/auto-close-exempt.ts, moderation-rules.ts, global-contributor-cap.ts, and src/signals/duplicate-winner.ts already correctly are.

Every hand-duplicated pair is a latent drift bug: a fix applied to one copy silently doesn't reach the other unless someone remembers to hand-port it (this is the exact failure mode #4879's shim conversion was built to eliminate).

Confirmed remaining duplicate pairs (verified via diff, 2026-07-15)

Each pair's counterpart already exists at the identical relative path inside packages/loopover-engine/src/<dir>/<file> — this is a straightforward shim conversion, not a design question.

Requirements (for the epic — see sub-issues for the concrete per-batch work)

  • Every file gets converted following the exact precedent already proven 4 times (auto-close-exempt.ts, moderation-rules.ts, global-contributor-cap.ts, signals/duplicate-winner.ts): the src/ copy becomes a thin export * from "../../packages/loopover-engine/src/<dir>/<file>"-style re-export (match whichever exact re-export shape the existing shims use), the engine copy remains the canonical implementation.
  • No behavior change anywhere — every existing test for both the src/ and engine copies must continue passing unchanged.
  • Before converting, double-check no src/-side-only behavior has crept into either copy since this audit (confirm the diff really is import-path-only, not a stale assumption).

Deliverables

Expected Outcome

No file in src/** remains a hand-duplicated copy of its @loopover/engine counterpart — every shared piece of logic has exactly one canonical implementation, and a future engine-side fix propagates automatically to both ORB and AMS instead of needing manual re-application.

Links & Resources

  • #4879 (the original convergence effort and shim pattern)
  • packages/loopover-engine/src/ (the canonical home)
  • src/settings/auto-close-exempt.ts, moderation-rules.ts, global-contributor-cap.ts, src/signals/duplicate-winner.ts (already-correct shim examples to replicate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededroadmapOn the Wave-2 agent-layer roadmap board (project 9)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions