chore/fix-some-stuff #2

Merged
schaefera merged 4 commits from chore/fix-some-stuff into main 2026-08-21 12:39:33 +00:00
Owner
No description provided.
schaefera added 3 commits 2026-08-21 11:54:05 +00:00
apply_feedback, decay, get_mean_affinity, and engagement_score had no
(or broken) test coverage. Also fixes decay(): subtracting a fixed
DAILY_DECAY from a score smaller than that step flipped its sign
instead of settling at zero, causing oscillation on repeated decay
passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KcD2BtNqehJxchKiuodTxi
chore: Change license, re-position test comments, add gitignore entries.
Some checks failed
CI / check (pull_request) Failing after 32s
CI / test (pull_request) Has been skipped
CI / audit (pull_request) Has been skipped
6fc33f4854
claude-bot reviewed 2026-08-21 11:58:37 +00:00
claude-bot left a comment
Collaborator

Automated review — 3 findings, most-severe first. This diff currently fails CI's Format check step, so that one blocks merge until fixed.

Automated review — 3 findings, most-severe first. This diff currently fails CI's Format check step, so that one blocks merge until fixed.
Cargo.toml Outdated
@ -12,3 +12,3 @@
edition = "2021"
version = "0.1.0"
license = "MIT"
license = "AGPL-3"
Collaborator

AGPL-3 isn't a valid SPDX license identifier — the valid forms are AGPL-3.0-only / AGPL-3.0-or-later (or the deprecated AGPL-3.0). Tools that validate SPDX metadata (cargo-deny, crates.io) will reject this. Also this is a real license change (MIT → AGPL) bundled into a "chore" commit with no LICENSE file added to match — probably worth calling out explicitly or splitting into its own commit/PR.

`AGPL-3` isn't a valid SPDX license identifier — the valid forms are `AGPL-3.0-only` / `AGPL-3.0-or-later` (or the deprecated `AGPL-3.0`). Tools that validate SPDX metadata (cargo-deny, crates.io) will reject this. Also this is a real license change (MIT → AGPL) bundled into a "chore" commit with no LICENSE file added to match — probably worth calling out explicitly or splitting into its own commit/PR.
schaefera marked this conversation as resolved
@ -96,2 +95,2 @@
// credit partial engagement rather than 0 or 1.
_ => 0.5,
let mut score = match opened {
Collaborator

This rewrote if !opened {0.0} else {...} as match opened { true => {...}, false => 0.0 } — a needless match-on-bool with no behavior change and extra nesting for no gain. Not currently caught by clippy in this workspace (verified cargo clippy -p feedsignal-core --all-targets -- -D warnings is clean), so it'll linger. Consider reverting to a plain if/else.

This rewrote `if !opened {0.0} else {...}` as `match opened { true => {...}, false => 0.0 }` — a needless match-on-bool with no behavior change and extra nesting for no gain. Not currently caught by clippy in this workspace (verified `cargo clippy -p feedsignal-core --all-targets -- -D warnings` is clean), so it'll linger. Consider reverting to a plain `if`/`else`.
schaefera marked this conversation as resolved
@ -98,1 +102,4 @@
_ => 0.5,
}
}
false => 0.0
Collaborator

cargo fmt --check fails on this branch: the false => 0.0 arm is missing a trailing comma, plus two more spots this diff introduces further down (the multi-line assert_eq! calls in engagement_score_starred_adds_bonus / engagement_score_starred_bonus_caps_at_one, which rustfmt collapses to one line). Since CI's Format check step runs before clippy/tests, this diff fails CI as-is — run cargo fmt before merging.

`cargo fmt --check` fails on this branch: the `false => 0.0` arm is missing a trailing comma, plus two more spots this diff introduces further down (the multi-line `assert_eq!` calls in `engagement_score_starred_adds_bonus` / `engagement_score_starred_bonus_caps_at_one`, which rustfmt collapses to one line). Since CI's `Format check` step runs before clippy/tests, this diff fails CI as-is — run `cargo fmt` before merging.
schaefera marked this conversation as resolved
schaefera added 1 commit 2026-08-21 12:03:17 +00:00
chore: Use valid license SPDX id. Revert logic refactor.
All checks were successful
CI / check (pull_request) Successful in 28m11s
CI / test (pull_request) Successful in 5m58s
CI / audit (pull_request) Successful in 20s
6445f32f8a
schaefera merged commit afe3df1401 into main 2026-08-21 12:39:33 +00:00
schaefera deleted branch chore/fix-some-stuff 2026-08-21 12:40:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: schaefera/feedsignal#2
No description provided.