Skip to content

Use the commit window for Code Personality consistency - #4308

Open
Pulkit7070 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Pulkit7070:fix/personality-consistency-window
Open

Pulkit7070 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Pulkit7070:fix/personality-consistency-window

Conversation

@Pulkit7070

@Pulkit7070 Pulkit7070 commented Dec 5, 2026 •

Copy link
Copy Markdown

Code +2/-2 · Tests +15/-0 · Other +0/-0

What and why

The Code Personality report calculates part of its perfectionism score by dividing active days by total commits. The numerator comes from a 365-day streak window and the denominator comes from a 90-day commit window. This can inflate the score and gives the model mismatched inputs. Count active days in the commit series used for the total.

How to test

  1. Run pnpm exec vitest run test/personality-route.test.ts.
  2. The regression fixture has four commits across two active days, a zero-commit day, and 45 streak activity days. The route returns a consistency contribution of 20 points. Upstream returned 40.

All 3,463 tests passed. Type checking, lint, and the production build passed locally on Node 24. Authenticated browser validation requires a configured DevTrack account and backend. Previously cached reports may persist until expiration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant