Skip to content

refactor(engine): extract signals engine with re-export shim (#4884) - #5800

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
andriypolanski:feat/extract-signals-engine-4884
Jul 14, 2026
Merged

refactor(engine): extract signals engine with re-export shim (#4884)#5800
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
andriypolanski:feat/extract-signals-engine-4884

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary

Change

  • packages/loopover-engine/src/signals/engine.ts — canonical home for the maintainer signal stack (collision detection, queue health, lane advice, preflight, bounty context, etc.).
  • src/signals/engine.ts — thin export * shim over the engine source path (same convention as src/signals/check-summary.ts / Extract the rest of signals/ #4883).
  • src/signals/reward-risk.ts — binds RewardRiskEngineDeps against the engine package builders directly, avoiding a shim circular import after the move.
  • packages/loopover-engine/tsconfig.json — excludes src/signals/engine.ts from the published package tsc build (still host-bound via monorepo-relative imports; consumed through the shim, not dist/).
  • scripts/check-engine-parity.ts + test/unit/check-engine-parity-script.test.ts — update SHARES_MEANINGFUL_FILE_TWIN_PAIR host path to the engine package location.
  • Comment updates in packages/loopover-engine/src/reward-risk.ts and packages/loopover-engine/src/signals/slop.ts to point at the new canonical path.

Acceptance

Criterion Status
Every known external consumer keeps working with zero import-path changes Yes — shim at src/signals/engine.ts
Full existing test coverage for this file passes unchanged Yes — signals / reward-risk / parity suites green
No other refactor / cleanup / behavior change in the same PR Yes — move-only + shim wiring

Closes #4884


Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused (signals-engine extraction only) and does not mix unrelated changes.
  • This follows CONTRIBUTING.md and does not touch site/, CNAME, or **/lovable/**.
  • Linked issue: Closes Extract the signals-engine file #4884.

Validation

  • git diff --check
  • npm run test:ci
  • npm audit --audit-level=moderate
  • npm run typecheck
  • npm run build --workspace @loopover/engine
  • npm run test:engine-parity
  • npm run test -- test/unit/signals.test.ts test/unit/signals-v2.test.ts test/unit/signals-coverage.test.ts test/unit/check-engine-parity-script.test.ts — 189 passing
  • Consumer smoke: local-branch, contributor-issue-draft, feasibility-gate-branches, maintainer-slop-duplicate-trend, scenario-summary, reward-risk-freshness — 150 passing

If any required check was skipped, explain why:

  • Run the full npm run test:ci + npm audit --audit-level=moderate gate locally before push (required for merge).

Safety

  • No secrets, wallet details, hotkeys, coldkeys, PATs, private keys, trust scores, or private rankings exposed.
  • Public GitHub text unaffected — refactor/move only; no runtime API or comment-template change.
  • Auth/cookie/CORS/session — n/a.
  • API/OpenAPI/MCP — n/a (engine not re-exported from the published barrel in this PR).
  • No visible UI change.
  • No changelog edit.

UI Evidence

No visible UI change. This PR moves the signals engine behind a re-export shim. No screenshots required.

Notes

@andriypolanski
andriypolanski marked this pull request as draft July 14, 2026 18:03
@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 18:10:17 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 3 non-blocking
  • The added `packages/loopover-engine/src/signals/engine.ts` (+5807 lines) has no inline diff shown, so its contents can't be directly verified here beyond trusting it's a byte-for-byte move — worth a spot-check that it's truly identical to the old `src/signals/engine.ts` content rather than a re-implementation.
  • Confirm via `git diff --stat` or a hash comparison that the moved `engine.ts` content is unchanged beyond the file move, since the diff view can't show a byte-identical move for a 5807-line addition/deletion pair.
  • 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 #4884
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: 151 registered-repo PR(s), 98 merged, 26 issue(s).
Contributor context ✅ Confirmed Gittensor contributor andriypolanski; Gittensor profile; 151 PR(s), 26 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: moderate — The PR completes a well-scoped, single-purpose file move (largest file in the extraction milestone) with a compatibility shim and updated tooling references, directly closing the linked issue #4884 with no bundled unrelated changes visible in the diff.
Review context
  • Author: andriypolanski
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 151 PR(s), 26 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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat <question> 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

@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.10%. Comparing base (9b3f4b2) to head (162a1cb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5800   +/-   ##
=======================================
  Coverage   95.10%   95.10%           
=======================================
  Files         584      584           
  Lines       46440    46440           
  Branches    14849    14849           
=======================================
  Hits        44169    44169           
  Misses       1515     1515           
  Partials      756      756           
Flag Coverage Δ
shard-1 43.76% <ø> (+<0.01%) ⬆️
shard-2 36.20% <ø> (+<0.01%) ⬆️
shard-3 32.15% <ø> (ø)
shard-4 32.92% <ø> (+<0.01%) ⬆️
shard-5 31.63% <ø> (+<0.01%) ⬆️
shard-6 44.53% <ø> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/loopover-engine/src/reward-risk.ts 100.00% <ø> (ø)
packages/loopover-engine/src/signals/engine.ts 97.50% <ø> (ø)
packages/loopover-engine/src/signals/slop.ts 100.00% <ø> (ø)
src/signals/reward-risk.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andriypolanski
andriypolanski marked this pull request as ready for review July 14, 2026 18:07

@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 7ea18c3 into JSONbored:main Jul 14, 2026
16 checks passed
This was referenced Jul 14, 2026
This was referenced Jul 15, 2026
@andriypolanski
andriypolanski deleted the feat/extract-signals-engine-4884 branch July 16, 2026 15:10
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.

Extract the signals-engine file

2 participants