Skip to content

feat(miner-foundation): extract test-evidence + local-scorer signals into gittensory-engine #2277

Description

@JSONbored

Move the two smallest, fully self-contained signal modules — src/signals/test-evidence.ts (32 lines: isTestPath, hasLocalTestEvidence, classifyTestCoverage) and src/signals/local-scorer.ts (34 lines: computeLocalScorerTokens) — into packages/gittensory-engine/src/. These have no non-trivial internal dependencies (local-scorer only imports types from local-branch.ts, which stays in src/ for now — the engine version accepts the same shape via a locally-declared type instead of importing across the boundary) and are good first extractions to prove the pattern before the larger slop/reward-risk modules.

Deliverables

  • packages/gittensory-engine/src/test-evidence.ts — verbatim port of isTestPath, hasLocalTestEvidence, classifyTestCoverage.
  • packages/gittensory-engine/src/local-scorer.ts — verbatim port of computeLocalScorerTokens, with LocalBranchChangedFile/LocalBranchScorer/LocalBranchValidation re-declared as local types (matching shapes) rather than importing from src/signals/local-branch.ts, since that module stays in the backend tree.
  • src/signals/test-evidence.ts and src/signals/local-scorer.ts become thin re-export shims from @jsonbored/gittensory-engine (keep the files so every existing import from "./test-evidence" / "./local-scorer" in src/ keeps working with zero call-site churn).
  • Existing test suites for both modules (wherever they currently live under test/unit/) pass unmodified against the shim.
  • packages/gittensory-engine/src/index.ts re-exports both new modules.

References

  • src/signals/test-evidence.ts (32 lines) — full file to port.
  • src/signals/local-scorer.ts (34 lines) — full file to port; note its LocalBranchScorer/LocalBranchChangedFile/LocalBranchValidation type dependency on ./local-branch, which this issue re-declares locally rather than cross-importing.
  • packages/gittensory-engine/ — created by the package-skeleton issue (must land first).

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions