test(kanban): archive-terminates-worker fixture records a verified spawn fingerprint

_set_worker_pid on a fake PID (54321) now persists the 'unverified' marker, under which
the archive path correctly refuses to signal; the test pins the verified-spawn behaviour,
so it stubs the fingerprint capture.
This commit is contained in:
teknium1
2026-09-16 00:22:39 -07:00
committed by Teknium
parent 92d64465bf
commit 287c56e95a

View File

@@ -1871,6 +1871,8 @@ def test_archive_running_task_terminates_worker(kanban_home, monkeypatch):
t = kb.create_task(conn, title="x", assignee="a")
host = kb._claimer_id().split(":", 1)[0]
kb.claim_task(conn, t, claimer=f"{host}:worker")
# A verified spawn: an uncaptured fingerprint would (correctly) refuse the signal.
monkeypatch.setattr(kbd, "_process_fingerprint", lambda _pid: "boot:1|777")
kbd._set_worker_pid(conn, t, 54321)
monkeypatch.setattr(kb, "_pid_alive", lambda _pid: False)