Skip to content

feat(miner-foundation): extract predicted-gate types into gittensory-engine #2276

Description

@JSONbored

Move the pure, dependency-light type surface of src/rules/predicted-gate.ts (the PredictedGateVerdict, PredictedGateInput types and the predictedGateNote/publicSafeFinding pure helpers) into packages/gittensory-engine/src/predicted-gate.ts, re-exported from the engine's barrel. This is a TYPES-AND-PURE-HELPERS-FIRST slice of the full extraction (the follow-up issue moves buildPredictedGateVerdict itself once its signal dependencies are also extracted) so the surface area per PR stays small. src/rules/predicted-gate.ts re-exports from the engine package rather than duplicating the types, so there is exactly one definition.

Deliverables

  • packages/gittensory-engine/src/predicted-gate.ts with PredictedGateVerdict, PredictedGateInput types and the pure predictedGateNote/publicSafeFinding functions, ported verbatim (same doc comments, same behavior).
  • packages/gittensory-engine/src/index.ts re-exports the new module.
  • src/rules/predicted-gate.ts imports PredictedGateVerdict, PredictedGateInput, predictedGateNote, publicSafeFinding from @jsonbored/gittensory-engine instead of defining them locally; deletes the now-duplicate local definitions.
  • npm run typecheck and the existing predicted-gate test suite pass unmodified (behavior must be byte-identical — no test changes needed if the port is faithful).
  • Add @jsonbored/gittensory-engine as a dependencies entry in root package.json (workspace-linked) so src/ can import it.

References

  • src/rules/predicted-gate.ts (lines 36-93) — the exact types and helpers to move.
  • packages/gittensory-engine/ — created by the package-skeleton issue (must land first).
  • .claude/skills/contributing-to-gittensory/SKILL.md Phase 2 — "trace the closest analogue end-to-end" convention this port must follow faithfully.

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