Skip to content

fix(engine): consolidate duplicate-winner.ts — two byte-identical copies within gittensory-engine #4251

Description

@JSONbored

Found during a 2026-07-08 miner-roadmap audit: packages/gittensory-engine/src/duplicate-winner.ts and packages/gittensory-engine/src/signals/duplicate-winner.ts are byte-identical copies of the same file, living inside the same package (not a src/-vs-engine extraction pair — both copies are already inside gittensory-engine).

The package's index.ts barrel exports from the top-level copy, but advisory/gate-advisory.ts (which predicted-gate.ts's whole verdict chain runs through) imports the signals/ copy instead. Low-risk today only because the two files happen to still be identical — exactly the kind of accidental fork that the engine-parity audit (see the sibling issue on src/ vs packages/gittensory-engine/src/ divergence) flags as a real risk pattern in this codebase.

Deliverables

  • Make packages/gittensory-engine/src/signals/duplicate-winner.ts a thin export * from "../duplicate-winner.js" re-export, matching this package's existing shim pattern
  • Confirm advisory/gate-advisory.ts and any other importer of the signals/ path still resolve correctly
  • No behavior change — existing tests should pass unmodified

References

  • packages/gittensory-engine/src/duplicate-winner.ts
  • packages/gittensory-engine/src/signals/duplicate-winner.ts
  • packages/gittensory-engine/src/advisory/gate-advisory.ts:13 (the importer using the wrong copy)
  • packages/gittensory-engine/src/index.ts (the barrel export using the other copy)

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
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions