A replaced or detached board takes its failure record with it

The pull records a board that fails on every fetch under ats:failing:<target>, and set_board can now move a company to another board. The old target's record would have outlived the board and counted in `app companies check` for good.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-29 14:17:20 +02:00
1 parent 43773efc53
commit 04da463e9f
2 files changed
+28 -1

No files matched your search

+16
View File
@@ -287,3 +287,19 @@ def test_cli_seed_prints_counts_and_problems(
captured = capsys.readouterr()
assert json.loads(captured.out) == {"added": 1, "boards": 0, "skipped": 0, "total": 1}
assert "companies seed: odd: 'nosuch:odd' is not a known board" in captured.err
def test_replacing_or_detaching_a_board_forgets_that_it_was_failing(
store: Store, boards: Boards) -> None:
from app.jobs.pull import FAILING, failing_boards
sources.set_board(store, "acme", "greenhouse:acme", name="Acme")
store.state[FAILING + "greenhouse:acme"] = '{"since": "2026-09-01T00:00:00+00:00", "reason": "404 Not Found"}'
assert "greenhouse:acme" in failing_boards(store)
sources.set_board(store, "acme", "ashby:acme")
assert failing_boards(store) == {}
store.state[FAILING + "ashby:acme"] = '{"since": "2026-09-01T00:00:00+00:00", "reason": "timeout"}'
sources.detach_board(store, "acme")
assert failing_boards(store) == {}