Skip to content

Add unit tests for decay curve behavior #26

Open

Description

@BennettSchwartz

Summary

pkg/decay/curves.go currently has no direct unit tests, even though it contains core salience decay math used by schedulers.

Why this is a good first issue

  • Small, self-contained file.
  • Pure functions (no DB/network dependencies).
  • Straightforward table-driven tests.

Proposed work

Add pkg/decay/curves_test.go with tests for:

  • Exponential decay with positive half-life.
  • Linear decay with positive half-life.
  • Min-salience floor behavior.
  • halfLife <= 0 fallback behavior.
  • GetDecayFunc dispatch for known and unknown curves.

Acceptance criteria

  • New tests pass with go test ./pkg/decay.
  • Test names clearly describe expected behavior.
  • Edge cases (halfLife <= 0, flooring) are covered.

Activity

  1. min-ok commented on Oct 2, 2026

    @min-ok

    Hi! I'd like to work on this one. Could you assign it to me?

  2. BennettSchwartz commented on Oct 6, 2026

    @BennettSchwartz
    OwnerAuthor

    @min-ok assigned!

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

Metadata

Metadata

Assignees

Labels

area:runtimeDaemon runtime and shutdown behaviorgood first issueGood for newcomerspriority:mediumImportant but not urgenttype:tech-debtMaintenance and engineering quality work

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions