Skip to content

feat(engine): extract local-scorer.ts's computeLocalScorerTokens to gittensory-engine #4253

Description

@JSONbored

Found during a 2026-07-08 miner-roadmap audit. src/signals/local-scorer.ts's computeLocalScorerTokens is a 35-line pure function already documented (#782) as needing to run "in every surface (stdio package AND hosted Worker)" — the exact situation gittensory-engine exists to solve, but it was never actually moved there.

It depends only on the already-portable isCodeFile/isTestFile (extracted) plus 3 narrow type shapes currently defined in local-branch.ts, which is itself far too large and Node-coupled to move wholesale.

Deliverables

  • Extract computeLocalScorerTokens to packages/gittensory-engine/src/local-scorer.ts (or a suitable existing module)
  • Lift or narrowly duplicate the 3 type shapes it needs from local-branch.ts into the engine package's types/ — do not attempt to move local-branch.ts itself
  • src/signals/local-scorer.ts becomes a thin re-export shim
  • Export from the package's public entrypoint
  • Existing tests for this function pass unmodified against the moved implementation

References

  • src/signals/local-scorer.ts (source function, feat(agent): local gittensor-root scorer MCP wrapper #782)
  • src/signals/local-branch.ts (source of the 3 dependent type shapes — do not move this file itself)
  • packages/gittensory-engine/src/signals/test-evidence.ts (extraction pattern to mirror)

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

    Status
    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions