You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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).
src/review/ 9-file batch converged (see linked sub-issue)
src/signals/ 2-file batch converged (see linked sub-issue)
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)
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#4879and has landed in pieces since, but a fresh audit (2026-07-15) found 15 files still hand-duplicated betweensrc/andpackages/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 likesrc/settings/auto-close-exempt.ts,moderation-rules.ts,global-contributor-cap.ts, andsrc/signals/duplicate-winner.tsalready 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)
src/settings/(4 files):autonomy.ts,command-authorization.ts,contributor-blacklist.ts,pr-type-label.ts— tracked as sub-issue refactor(settings): converge 4 more hand-duplicated settings files onto their loopover-engine shim, matching the #4879 pattern already applied to 3 siblings #6194 (filed same day).src/review/(9 files):advisory-ai-routing-config.ts,cla-check.ts,enrichment-analyzer-names.ts,guardrail-config.ts,linked-issue-hard-rules-config.ts,linked-issue-label-propagation.ts,pre-merge-checks.ts,screenshot-table-gate.ts,unlinked-issue-guardrail-config.ts.src/signals/(2 files):change-guardrail.ts,preflight-limits.ts.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)
auto-close-exempt.ts,moderation-rules.ts,global-contributor-cap.ts,signals/duplicate-winner.ts): thesrc/copy becomes a thinexport * 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.src/and engine copies must continue passing unchanged.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
src/settings/4-file batch converged (refactor(settings): converge 4 more hand-duplicated settings files onto their loopover-engine shim, matching the #4879 pattern already applied to 3 siblings #6194)src/review/9-file batch converged (see linked sub-issue)src/signals/2-file batch converged (see linked sub-issue)Expected Outcome
No file in
src/**remains a hand-duplicated copy of its@loopover/enginecounterpart — 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)