# Quarantined tests — excluded from the blocking CI suite.
#
# WHY THIS FILE EXISTS
# CI ran 4 of 285 test files for a long time, so the suite rotted unnoticed:
# switching the full suite on surfaced 77 failures that predate any single
# change. Rather than leave the suite ungated until every one is fixed (which is
# how it got this way), the full suite gates PRs NOW and the known-bad tests are
# listed here explicitly.
#
# This list is meant to SHRINK. A second, non-blocking CI job runs exactly these
# tests, so when one starts passing it shows up and the line can be deleted.
# Do not add a line without a reason comment.
#
# Every id below was observed failing on a clean checkout; none of them are
# caused by the change that introduced this file.
#
# Format: one pytest node id per line. `#` comments and blank lines ignored.
#
# AUDITED 2026-08-28 — the list had rotted in both directions, unnoticed because
# the watch that was supposed to catch it was broken (a stale id aborted pytest
# at collection; the watch swallowed that and reported "all still failing,
# nothing to do" while running zero tests — now a hard error, see
# scripts/pytest_gate.sh). Of 41 entries: 10 named tests that no longer existed
# (deleted here — `--deselect` accepts unknown ids silently, so nothing ever
# complained), 9 already PASSED, 3 only ever SKIP (no `duckdb`), and 19 really
# failed. Two of the 19 are fixed below and retired with a third that was
# already passing, leaving 28 here: 8 passing, 3 skipping, 17 failing.
#
# The 8 + 3 are deliberately left quarantined rather than retired on the spot.
# They pass on ONE developer machine, and several were quarantined for behavior
# under sharded CI load in the first place — so the now-honest watch, running in
# CI where that evidence actually lives, is what should retire them.
#
# The 17 are mostly not broken tests: they are stale assertions against product
# that deliberately moved (snapshot-readonly.css rules that no longer exist,
# `_setStudyTab('visualizations')` gone from study-detail.js, loom-explore
# renamed bigraph-loom, spine templates restructured). Retiring those means
# deciding what the assertion SHOULD say now, one at a time — real work, not
# bookkeeping.
#
# Beware the comments as much as the ids. Both test_composites_kind_module
# entries were annotated "flaky, times out under CI load, passes locally".
# Neither was a timeout. Both ran `finally: _REGISTRY.pop(id, None)` against a
# `_RegistryView`, which implements neither `pop` nor `__delitem__` (the backing
# registry has no per-key removal at all) -- so TEARDOWN raised AttributeError,
# the test went red, and the recorded diagnosis blamed CI load. A third test,
# test_visualization_endpoints::test_post_composite_test_run_accepts_generator_id,
# was quarantined for the same reason under a different heading. All three are
# fixed and retired: conftest's autouse `_restore_composite_spec_registry`
# already does that cleanup, at the right scope for a process-global registry.

# ── Viz / endpoints / misc ────────────────────────────────────────────────────
tests/test_investigation_run_e2e.py::test_detail_after_run
tests/test_remote_run_panel.py::test_view_run_button_routes_to_visualizations_not_dead_route
tests/test_visualization_endpoints.py::test_post_create_from_composite_creates_v2_spec

# ── Snapshot/publish + loom serving ───────────────────────────────────────────
# RETIRED (fixed): test_snapshot_css_* and the three test_loom_explore_serve
# entries were stale assertions against product that moved — the snapshot repo
# label was superseded (not shown) and loom-explore was renamed bigraph-loom
# (served at /bigraph-loom/). Their assertions were updated to the new structure
# and they now pass, so they re-join the blocking gate.
tests/test_publish.py::test_walkthrough_composite_popout_is_snapshot_aware

# ── Emitter/store selection — FIXED (zarr reader), held quarantined on purpose ─
tests/test_emitters_run_with_emitter.py::test_run_with_emitter_short_run_does_not_silently_empty
tests/test_emitters_run_with_emitter.py::test_run_with_emitter_zarr_fallback_uses_fresh_state
# These two now PASS (this PR fixes the real defect: the zarr trace reader
# comparative_viz._extract_trace_from_zarr read every xarray store back as empty
# because it looked for time_gen=<N> on the leaf's IMMEDIATE parent, but the
# emitter nests the store path so time_gen lives on the ancestor lineage_seed
# partition node — fixed to walk up). Their bodies are updated to assert the real
# behavior (short run charts a real non-empty series), so the quarantine-watch job
# will report them PASSING — that is expected.
# They are kept quarantined ON PURPOSE: un-quarantining them adds 2 tests to the
# blocking suite, which shifts pytest-split's shard balance and DETERMINISTICALLY
# co-locates pre-existing test-isolation leakers (SMS provider-cache poisoning +
# os.environ pops that aren't restored, e.g. test_openapi_structural_contract's
# _build_openapi) with their victims (test_remote_run_endpoints,
# test_provenance_manifest, test_viva_v1_client_contract, test_remote_dispatch_*).
# Those leaks are latent on main and unrelated to emitters. Un-quarantine these
# two once that provider/env test-isolation is hardened (separate follow-up).

# ── Template drift (page/tab markup changed; assertions never updated) ────────
tests/test_spine_present_c_unbury.py::test_discovery_implications_elevated_above_conclusion_text
tests/test_spine_present_c_unbury.py::test_purpose_is_not_collapsed_by_default
tests/test_spine_present_c_unbury.py::test_secondary_content_stays_collapsible
# The four below were fixed + un-quarantined by the 5-tab study-layout reorg
# (feat/study-layout-reorg): their assertions were updated to the new structure
# and now pass, so they re-join the blocking gate.

# Flaky timing test: asserts GET /api/simulations returns in <10.0s when the
# remote is slow (proof the non-blocking SWR path wasn't re-blocked). On current
# CI runners the non-blocking path lands at ~10.2-10.3s, marginally over the
# bound, so it fails intermittently — observed red on main (3 of its last 4
# pytest runs) as well as here, independent of the frontend changes in this PR.
# Quarantined pending a real fix to the bound / SWR budget.
