fix(engine): use aggregate repo-stat issues for cache-only outcome totals#511
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | d0e4536 | Commit Preview URL Branch Preview URL |
Jun 10 2026, 08:24 AM |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
b690dd7 to
d0e4536
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ContributorRepoStatRecord.issueswhen detailedIssueRecordrows were absent or truncated, causing history totals to undercount compared to profile/reconciliation cached totals.Description
src/signals/engine.tsto computeopenIssueRows,closedIssueRows, andcachedIssueCount = Math.max(cachedIssues.length, cachedStat?.issues ?? 0)and to usecachedIssueCountas a fallback when official issue counts are absent.openIssuesfalls back toopenIssueRowsandclosedIssuesfalls back toMath.max(closedIssueRows, cachedIssueCount - openIssueRows, 0)soissues = openIssues + closedIssuespreserves aggregate repo-stat counts.test/unit/signals-v2.test.tsthat constructs a cache-only contributor withrepoStats.issues = 7and noIssueRecordrows and asserts profile, repo outcome, history totals, and reconciliation all reflect the aggregate issue count.Testing
npx vitest run test/unit/signals-v2.test.tsand the test file passed (all tests succeeded).npm run typecheck(tsc --noEmit) and it completed successfully.Codex Task