Files
ai-job-search/tests
Rudy Mizrahi CelekliandCursor ddbbd100b8 fix(rank): report a non-object seen_jobs.json entry instead of a traceback (#636)
* fix(rank): report a non-object seen_jobs.json entry instead of a traceback

candidates, sweep and apply crashed with AttributeError on .get when an entry
was a string or number. load_state now exits with a one-line message naming
the key, like its existing not-an-object-of-entries branch.

* fix(rank): correct the non-object-entry wording and pin apply's two cases

Address review on #636. The CHANGELOG bullet claimed `apply` crashed on
a non-object entry in general; it only touches the keys its results name,
so on master it crashed when a result named the bad entry and otherwise
exited 0 and wrote the valid ones. The bullet now says that `candidates`
and `sweep` crashed on any such entry, `apply` crashed when a result
named it, and all three now exit 1 naming the key; the code is unchanged.

The regression test now covers both `apply` cases from separate results
files (the earlier version reused one path, so the second write hid the
first) and asserts the refused file is left untouched.

Rebased onto master: resolved the `tests/test_rank_state.py` conflict
with #635's `test_malformed_results_are_errors_not_a_traceback` (both
tests kept, appended in order) and moved the CHANGELOG bullet from what
is now the released [1.7.3] section into [Unreleased] > Fixed with (#636).

* fix(rank): drop the changelog edit; the 1.7.4 file is frozen

Release notes come from the PR title. tests/test_changelog_structure.py pins CHANGELOG.md, so the corrected wording stays in the PR body.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 21:01:21 +01:00
..