Skip to content

feat(miner-selfimprove): wire the historical-replay scorers into the Phase 7 calibration loop #4248

Description

@JSONbored

Found during a 2026-07-08 miner-roadmap audit: #3014 ("wire historical replay into Phase 7 calibration loop") is closed, but the two sides it claims to connect were never actually connected.

packages/gittensory-engine/src/phase7-calibration-loop.ts (landed via #3014/PR #3225) is a well-built, well-tested pure contract for combining a historical_replay score with the passive pr_outcome signal into one tracked calibration metric. By design it can't call into packages/gittensory-miner itself (wrong dependency direction — miner depends on engine, not vice versa; its own header comment says "the miner runtime owns scheduling replay runs and persisting ledger rows; this module owns [the combining logic]"), so it correctly expects an external caller to feed it real replay results.

packages/gittensory-miner/lib/replay-objective-anchor.js (#3012) and lib/replay-task-generation.js (#3011) are also real, well-built, and well-tested — a sophisticated pure structural scorer and a leakage-safe synthetic-task generator, respectively.

Confirmed directly: neither grep -rn "phase7-calibration-loop" in packages/gittensory-miner/ nor a search for callers of the two replay modules (outside their own tests) turns up anything. PR #3225 only touched files inside packages/gittensory-engine/ — it never touched the miner side. Two finished pieces, never connected, behind an issue that claims "wired." This is exactly the kind of gap a closed-issue count won't surface.

Deliverables

  • A scheduler/runner in packages/gittensory-miner (CLI command or background job) that invokes the replay scorers, produces a historical_replay score in the shape phase7-calibration-loop.ts expects
  • Actually calls the loop's combining function with that score plus the existing pr_outcome signal
  • Persists the combined result somewhere queryable (ledger or local state, matching the existing ledger conventions in packages/gittensory-miner/lib/)
  • Integration test exercising the full chain: replay scorer → combining contract → persisted result — not just each side's existing unit tests in isolation
  • A note added to feat(miner): wire the historical-replay harness into the live Phase 7 calibration loop #3014/feat(engine): wire historical replay into Phase 7 calibration loop #3225 or this issue clarifying the original issue's actual scope so it doesn't recur

References

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