Skip to content

WL-0MN0SS4UD0SJAC3T: lock non-stacking of in-progress & ancestor boosts in computeScore#978

Merged
SorraTheOrc merged 1 commit intomainfrom
fix/computeScore-non-stacking-WL-0MN0SS4UD0SJAC3T
Mar 22, 2026
Merged

WL-0MN0SS4UD0SJAC3T: lock non-stacking of in-progress & ancestor boosts in computeScore#978
SorraTheOrc merged 1 commit intomainfrom
fix/computeScore-non-stacking-WL-0MN0SS4UD0SJAC3T

Conversation

@SorraTheOrc
Copy link
Member

Summary

Prevent stacking of in-progress and ancestor boosts in computeScore(). The scoring code now applies a single multiplier (in-progress OR ancestor) exactly once. Added a focused unit test to lock this invariant.

Changes

  • src/database.ts: computeScore() uses an explicit multiplier variable and applies either IN_PROGRESS_BOOST (1.5) or PARENT_IN_PROGRESS_BOOST (1.25) once; blocked items receive no boost and retain the -10000 penalty.
  • tests/computeScore.nonstack.test.ts: new test that verifies an in-progress parent does NOT receive both boosts and therefore does not outrank an older high-priority open item.

Testing

  • I ran the new test locally via Vitest. To reproduce locally:
    • Run the single test: npx vitest -t "computeScore non-stacking invariant"
    • Or run the original failing test: npx vitest -t "in-progress boost in computeScore / reSort > should apply only the in-progress boost (not ancestor boost) when item is itself in-progress"

Notes

  • Commit: 1e6c57a
  • Branch: fix/computeScore-non-stacking-WL-0MN0SS4UD0SJAC3T
  • No stored fields changed; only scoring behavior and tests were added.

Request

Please review the change and verify CI. If you want, I can also add a small unit test asserting the numeric multiplier directly (extracting computeScore) or regenerate build artifacts if needed.

@SorraTheOrc SorraTheOrc merged commit d3161fe into main Mar 22, 2026
4 checks passed
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