Skip to content

docs(engine): document the deliberate gate-advisory twin divergence - #5784

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:feat/loopover-document-gate-advisory-divergence
Jul 14, 2026
Merged

docs(engine): document the deliberate gate-advisory twin divergence#5784
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:feat/loopover-document-gate-advisory-divergence

Conversation

@real-venus

Copy link
Copy Markdown
Contributor

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:

  • Why they diverge: the host copy reaches into the full signals subsystem — isCodeFile (../signals/local-branch, which transitively pulls the whole review-scoring / GitHub-API graph), isTestPath, labelMatchesPattern (../scoring/preview), and the CollisionCluster/CollisionReport types from the ~5,800-line ../signals/engine. The engine copy is a slimmed re-implementation (slim predicted-gate-types + ../scoring/label-match, importing none of signals/engine), precisely so @loopover/engine — and the CLI packages that consume it (packages/loopover-miner, packages/loopover-mcp) — never drag signals/engine and its subsystem into their dependency graph.
  • What keeps it safe: 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.
  • The deferred alternative: converging into one shim must wait until the dependency-graph constraint is solved (e.g. a shared type-only module carrying CollisionReport without 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.

Note: this touches src/rules/advisory.ts (a guardrail path), so I expect the gate to hold it for maintainer review — which is appropriate, since the deliverable is a documented design decision.

Scope

Validation

  • git diff --check (comment-only; verified no non-comment line changed on either file)
  • npm run typecheck (root + @loopover/engine build) clean
  • Behavior unchanged: advisory-live-parity, live-gate-parity, gate-check-policy, advisory-ai-routing-call-sites all pass (136 tests) — the host and engine twins still produce identical gate decisions
  • scripts/check-engine-parity.ts passes (20 pairs agree; core GATE_DECISION_CORE_MARKERS intact)
  • npm run command-reference:check (unaffected)
  • Rebased/verified against the latest main immediately before pushing — no base conflict

Codecov patch has no coverable lines to measure (the diff is entirely comments).

If any required check was skipped, explain why:

  • actionlint, test:workers, ui:*, npm audit were not run — no workflow, worker, UI, or dependency surface changed. The full npm run test:ci runs them on CI.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, PATs, private keys, raw trust scores, private rankings, or private maintainer evidence exposed. Documentation only; behavior byte-for-byte unchanged.
  • Public GitHub text stays sanitized and low-noise.
  • No changelog edited.

Auth/CORS/session, API/OpenAPI/MCP, and UI safety boxes are not applicable.

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
@real-venus
real-venus requested a review from JSONbored as a code owner July 14, 2026 15:26
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.06%. Comparing base (7d59907) to head (f32c832).
⚠️ Report is 2 commits behind head on main.

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           
Flag Coverage Δ
shard-1 43.92% <ø> (-0.01%) ⬇️
shard-2 35.80% <ø> (+0.02%) ⬆️
shard-3 32.26% <ø> (+<0.01%) ⬆️
shard-4 33.56% <ø> (+0.61%) ⬆️
shard-5 31.20% <ø> (-0.55%) ⬇️
shard-6 44.59% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ages/loopover-engine/src/advisory/gate-advisory.ts 100.00% <ø> (ø)
src/rules/advisory.ts 97.77% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-14 15:36:10 UTC

2 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a pure comment-only documentation PR that adds header comments to both twins of the gate-decision advisory pair, recording a 'keep divergent' decision for issue #4881. No executable code changes — only comments prepended above existing imports in both files. The rationale is specific and verifiable against the diff itself (references to check-engine-parity.ts markers, the signals/engine dependency graph concern, and the consuming CLI packages).

Nits — 5 non-blocking
  • The comments are quite long (18 and 8 lines) and duplicate much of the same explanation across both files; consider a shorter cross-reference in one file pointing to the fuller explanation in the other to reduce drift risk if the rationale changes.
  • No test changes are needed here since this is comment-only, but confirm scripts/check-engine-parity.ts is not itself modified/tested as part of 'what keeps it safe' — the PR only documents reliance on it, doesn't change it.
  • Consider linking directly to the issue number in a single canonical location (e.g., a doc file) rather than duplicating the full rationale in two source file headers, so future edits to the rationale only need to happen once.
  • Nit: verify the parity script referenced (scripts/check-engine-parity.ts, GATE_DECISION_CORE_MARKERS) actually exists with that export name, since the review can't inspect it directly from the diff.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4881
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 106 registered-repo PR(s), 54 merged, 14 issue(s).
Contributor context ✅ Confirmed Gittensor contributor real-venus; Gittensor profile; 106 PR(s), 14 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ⚠️ ℹ️ None detected risk: low · value: none — No structural-improvement signals were detected for this PR. LLM value judgment: minor — The change is a low-risk, well-targeted documentation-only addition that closes a specific decision-recording deliverable from issue #4881 without altering any behavior.
Linked issue satisfaction

Partially addressed
The PR clearly satisfies the documentation deliverable for the one explicitly-divergent pair (advisory.ts / gate-advisory.ts), with good rationale and a parity-check safety net, and makes no gate-decision behavior changes. However, the issue asks for a decision documented for 'every twin pair in this area,' and this PR only addresses the single named pair rather than surveying and deciding on othe

Review context
  • Author: real-venus
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Python, Rust, CSS, MDX, Svelte, Swift
  • Official Gittensor activity: 106 PR(s), 14 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask 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.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit e615ec7 into JSONbored:main Jul 14, 2026
16 checks passed
This was referenced Jul 14, 2026
This was referenced Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Converge the scoring/rules twins

1 participant