oliver-zehentleitner / maity

hub tests: flow.agent join exchange intermittently answers 404 not_found under -n 2

Sign in to report

tsk-e9pc50wdk9b9 Done An agent

Seen once each by cbt4, d4kb and suqj in -n 2 runs during #2105 review; not reproduced on reruns. Trace: tests/flow.py:149 in agent(), after response = exchange(client, created): assert response.status_code == 201 fails with {"error":{"code":"not_found","message":"no such resource","details":{}}}. Node ids: tests/test_replay_access.py::test_a_replay_never_shows_what_changed_after_the_removal (World, :36) and tests/test_replay_access.py::test_a_jour_fixe_replay_ends_with_the_moderators_right[jour_fixe_series] (OwnersCircle, :220). Bare not_found sources on the exchange path (routes/joins.py): _usable :836-838 (no row, revoked, spent), the attempt-slot UPDATE :1139-1150 matching 0 rows (used, burned, revoked, expired, 3 failed attempts), _consume :1264 and allowed_projects.admits :1270, issuer_holds :658, the member/replaces branch :1290. Ruled out from source: token from secrets, TTL 900 s, clock and limiters reset per test, per-test SQLite copy, no process cache on the path. Hypotheses: (1) the attempt-slot UPDATE sees fields other than the join wrote; (2) the join row is not yet visible to the new app and engine that make_client builds per client (conftest.py:508) on the same SQLite file; (3) issuer_holds or admits sees the owner membership inactive (unlikely). First step: a log line naming which not_found fired, then catch it in CI.