fix(engine): consolidate duplicate-winner.ts byte-identical copies - #4373
Conversation
…SONbored#4251) packages/gittensory-engine/src/duplicate-winner.ts and its signals/duplicate-winner.ts sibling were accidental byte-identical forks living inside the same package. Turns the signals/ copy into a thin re-export of the top-level module so advisory/gate-advisory.ts's existing import keeps resolving, with no behavior change.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 17:16:22 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 4 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
packages/gittensory-engine/src/duplicate-winner.tsandpackages/gittensory-engine/src/signals/duplicate-winner.tswere accidental byte-identical forks living inside the same package (not asrc/-vs-engine extraction pair — both copies were already insidegittensory-engine).index.tsbarrel exports from the top-level copy, butadvisory/gate-advisory.tsimports thesignals/copy instead — low-risk only because the two files happened to stay identical.signals/duplicate-winner.tsinto a thin re-export of../duplicate-winner.js, matching the existing extraction-shim pattern used elsewhere in this codebase (e.g.src/signals/duplicate-winner.ts's own re-export of the engine module). No behavior change —advisory/gate-advisory.ts's existing import keeps resolving to the exact same functions.Fixes #4251
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — this change is entirely insidepackages/gittensory-engine/, which is not measured bycodecov/patch(Codecov only measuressrc/**, collected by vitest); root vitest coverage is unaffected/unchanged.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateAlso ran the package's own gate:
npm run test --workspace @jsonbored/gittensory-engine(281/281 passing, including a new dedicatedtest/duplicate-winner-signals-shim.test.tsproving the shim re-exports the exact same function references as the top-level module, plus a runtime check thatisDuplicateClusterWinnerByClaimstill behaves correctly through thesignals/import path thatadvisory/gate-advisory.tsuses). Ran the full rootnpm run test:ciend-to-end (green).Safety
UI Evidencesection below — N/A, no visible/UI change.UI Evidence
Not applicable — this PR only consolidates an internal duplicate file inside
packages/gittensory-engine; there is no visible UI change.Notes
advisory/gate-advisory.ts's existing../signals/duplicate-winner.jsimport keeps resolving without a call-site change, per the issue's deliverables../signals/duplicate-winneris not part of the package's publicexportsmap (only./signals/test-evidenceis), so there is no published subpath to update.