Full spec: docs/hardening-roadmap-2026-04-16.md#h-10
Description
github-adapter.ts:71 sorts by stargazers_count to pick top 3 repos for commit fetching. Two repos with equal star counts order by GitHub API response order, which is not guaranteed stable across requests. Breaks idempotent canonicalId when commit-extracted emails differ.
Current State
.sort((a, b) => b.stargazers_count - a.stargazers_count) at packages/adapters/adapter-github/src/github-adapter.ts:71.
Suggested Fix
Verification
Automation Hints
scope: packages/adapters/adapter-github/src
do-not-touch: other adapters
approach: add-validation
risk: low
max-files-changed: 3
blocked-by: none
bail-if: adapter-github tests fail
Priority
Low
Full spec:
docs/hardening-roadmap-2026-04-16.md#h-10Description
github-adapter.ts:71sorts bystargazers_countto pick top 3 repos for commit fetching. Two repos with equal star counts order by GitHub API response order, which is not guaranteed stable across requests. Breaks idempotent canonicalId when commit-extracted emails differ.Current State
.sort((a, b) => b.stargazers_count - a.stargazers_count)atpackages/adapters/adapter-github/src/github-adapter.ts:71.Suggested Fix
b.stargazers_count - a.stargazers_count || a.name.localeCompare(b.name)..sort(and apply same treatment where ordering matters.Verification
pnpm buildpassespnpm testpassespnpm typecheckcleanAutomation Hints
scope: packages/adapters/adapter-github/src
do-not-touch: other adapters
approach: add-validation
risk: low
max-files-changed: 3
blocked-by: none
bail-if: adapter-github tests fail
Priority
Low