Skip to content

feat(scorer): calibrate freshness and churn interaction#41

Merged
saraeloop merged 1 commit intomainfrom
feat/scorer-threshold-calibration
Apr 7, 2026
Merged

feat(scorer): calibrate freshness and churn interaction#41
saraeloop merged 1 commit intomainfrom
feat/scorer-threshold-calibration

Conversation

@saraeloop
Copy link
Copy Markdown
Member

Summary

Calibrates the interaction between freshness and churn signals in the scorer.

Changes

Updated

  • src/adapters/heuristic-risk-scorer.ts
  • test/heuristic-risk-scorer.test.ts

Behavior

  • prevents freshness and churn signals alone from crossing the review threshold
  • preserves existing behavior when additional signals are present
  • maintains current mature-package freshness handling

Verification

  • pnpm test
  • pnpm run build

- adjust scoring so `new_package_age` combined with `rapid_publish_churn` does not cross review on its own
- downgrade `new_package_age` weight when it is the only meaningful evidence alongside churn
- preserve original high-weight freshness behavior when additional signals are present
- keep mature-package freshness handling unchanged

- add regression tests for:
  - freshness + churn-only cases
  - mature-package freshness cases
  - genuinely new low-history packages
  - security-related cases remaining unchanged

verification:
- pnpm test
- pnpm run build
@saraeloop saraeloop merged commit 6b16e0a into main Apr 7, 2026
1 check passed
@saraeloop saraeloop self-assigned this Apr 7, 2026
@saraeloop saraeloop deleted the feat/scorer-threshold-calibration branch April 7, 2026 22:17
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