{"agent":"claude","input":"Some tests in this repository fail intermittently or only on a second run. Find out why and fix the cause. Read the test files, conftest and fixtures, the pytest configuration, and how CI and the Makefile start the tests and their database; note whether CI always starts from an empty database. Docker may not be available here: if the tests need PostgreSQL, install it with apt, start it, and run pytest directly with the connection settings the code reads. Do not start by changing code. Run these experiments and record the exact result of each: the full suite on an empty database; the full suite a second time without resetting anything; each test alone on a database with no tables; each test alone twice in a row; the tests in reverse order. From the results, state for every failing case which test depends on state from another and which test leaves state behind, then confirm it in the code: which fixture creates the schema, which cleans up, and which tests bypass them. Report every sleep used in place of a readiness check. Fix the fixtures so that each test starts from a known state and leaves none: create the schema once per session, clean before and after each test, and make every test that touches the database use that path. Do not add retries, reruns, ordering plugins or skips, and do not change what any test asserts. Repeat all the experiments after the fix, plus one with a leftover row inserted by hand before the run, and require every one to pass. Open a pull request with a before and after table of the experiments, the cause in two sentences, and the run time before and after.","resources":[{"url":"https://github.com/your-org/your-app"}]}