docs(engine): document the deliberate gate-advisory twin divergence - #5784
Conversation
Record the keep-divergent decision for the gate-decision advisory twins (JSONbored#4881): src/rules/advisory.ts (host) and packages/loopover-engine/src/advisory/gate-advisory.ts (engine). Add header docs to both explaining that they are intentionally NOT converged — the host copy reaches into the full signals subsystem (isCodeFile, isTestPath, scoring/preview, signals/engine types) while the engine copy is a slimmed re-implementation, precisely so @loopover/engine and its CLI consumers never pull the ~5,800-line signals/engine into their dependency graph. Note that scripts/check-engine-parity.ts keeps the core gate-decision functions in lock-step, and that converging must wait until the dependency-graph constraint is solved. Comments only — no gate-decision behavior changes. Closes JSONbored#4881
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5784 +/- ##
=======================================
Coverage 95.06% 95.06%
=======================================
Files 580 580
Lines 46156 46156
Branches 14804 14804
=======================================
Hits 43880 43880
Misses 1516 1516
Partials 760 760
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-14 15:36:10 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
Records the converge-or-keep decision for the gate-decision advisory twin pair (#4881), and documents it clearly for future contributors — the issue's deliverable ("a clear, documented decision — converge or keep-divergent — for every twin pair in this area").
Decision: keep divergent. The pair
src/rules/advisory.ts(host) ↔packages/loopover-engine/src/advisory/gate-advisory.ts(engine) is the one explicitly documented as deliberately divergent, so the issue's boundary applies: "Don't converge the deliberately-divergent pair without first solving the dependency-graph-size problem it exists to avoid."This PR adds a header comment to both twins explaining:
isCodeFile(../signals/local-branch, which transitively pulls the whole review-scoring / GitHub-API graph),isTestPath,labelMatchesPattern(../scoring/preview), and theCollisionCluster/CollisionReporttypes from the ~5,800-line../signals/engine. The engine copy is a slimmed re-implementation (slimpredicted-gate-types+../scoring/label-match, importing none ofsignals/engine), precisely so@loopover/engine— and the CLI packages that consume it (packages/loopover-miner,packages/loopover-mcp) — never dragsignals/engineand its subsystem into their dependency graph.scripts/check-engine-parity.ts(GATE_DECISION_CORE_MARKERS) asserts both files still export the core gate-decision functions (evaluateGateCheck/evaluateGateCheckCore/isConfiguredGateBlocker/buildPullRequestAdvisory), so the gate decision stays in lock-step even as the surrounding types/plumbing diverge.CollisionReportwithout dragging the signals implementation along).No gate-decision behavior changes — this is a comment-only diff (+26 lines of documentation, zero code changes), which directly satisfies the issue's hard acceptance criterion ("this is the one phase where 'no behavior change' needs to be actively verified"). The host-vs-engine advisory-parity suites still pass identically, and the engine-parity check still reports all pairs agree.
Scope
CONTRIBUTING.md; nosite//CNAME/lovable.scoring/rulestwins #4881.Validation
git diff --check(comment-only; verified no non-comment line changed on either file)npm run typecheck(root +@loopover/enginebuild) cleanadvisory-live-parity,live-gate-parity,gate-check-policy,advisory-ai-routing-call-sitesall pass (136 tests) — the host and engine twins still produce identical gate decisionsscripts/check-engine-parity.tspasses (20 pairs agree; coreGATE_DECISION_CORE_MARKERSintact)npm run command-reference:check(unaffected)mainimmediately before pushing — no base conflictCodecov
patchhas no coverable lines to measure (the diff is entirely comments).If any required check was skipped, explain why:
actionlint,test:workers,ui:*,npm auditwere not run — no workflow, worker, UI, or dependency surface changed. The fullnpm run test:ciruns them on CI.Safety
Auth/CORS/session, API/OpenAPI/MCP, and UI safety boxes are not applicable.