Skip to content

fix: handle short contributor analysis windows - #196

Open
twei43846-afk wants to merge 1 commit into
oss-compass:mainfrom
twei43846-afk:codex/oss-compass-190-short
Open

fix: handle short contributor analysis windows#196
twei43846-afk wants to merge 1 commit into
oss-compass:mainfrom
twei43846-afk:codex/oss-compass-190-short

Conversation

@twei43846-afk

Copy link
Copy Markdown

Summary

Fixes #195.

  • Prevents uninitialized weeks access for analysis windows shorter than four weeks.
  • Preserves the prior behavior for short windows by skipping the 3/4-weeks regular-contributor criterion when it cannot be evaluated.
  • Adds a one-day-window regression test.

Root cause

get_regular_contributor() initialized weeks only for ranges with at least four week boundaries, then used it unconditionally.

Validation

  • python -m compileall -q compass_metrics tests
  • Regression unittest for a one-day analysis window

@twei43846-afk
twei43846-afk marked this pull request as ready for review July 30, 2026 01:53
Signed-off-by: twei43846-afk <306386671+twei43846-afk@users.noreply.github.com>
@twei43846-afk
twei43846-afk force-pushed the codex/oss-compass-190-short branch from 74e2e1f to 140aba7 Compare July 30, 2026 01:54
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.

fix: contributor detail lookup fails for analysis windows shorter than four weeks

1 participant