loopx icon indicating copy to clipboard operation
loopx copied to clipboard

[Bug]: the required test-shard lane fails on main because the monitor transport test still expects the pre-#6828 refusal for an oversized canonical record

Open JasonBuildAI opened this issue 1 month ago • 0 comments

LoopX version or commit: main dc9fdbb51

Host or runtime surface: Not host-specific (fails in the required Python Tests shards; deterministic repro on a local checkout)

Area: Control plane (canonical Todo snapshot transport) with a required-check blocker in Python Tests

Problem

The required Python Tests lane is red on the current main head dc9fdbb51, and one deterministic cause is tests/control_plane/test_monitor_target_transport.py::test_real_large_authority_returns_complete_target:

FAILED tests/control_plane/test_monitor_target_transport.py::test_real_large_authority_returns_complete_target[120000-file]
FAILED tests/control_plane/test_monitor_target_transport.py::test_real_large_authority_returns_complete_target[120000-sqlite]
Failed: DID NOT RAISE LocalCoordinationAuthorityUnavailable
tests/control_plane/test_monitor_target_transport.py:61: Failed
2 failed, 4 passed, 13 deselected in 99.11s

test-shard (3) fails on this test (job 117808033729 in schedule run 39172287050; the same signature appears in run 39155549439), and the pytest aggregator and merge-gate fail with it.

The 120000 case (a ~3 MB target record, larger than the 2 MiB inline request ceiling) still expects canonical_snapshot_record_too_large. That expectation was written when the Python canonical-snapshot adapter read through the wire-only paginated endpoint (coordination.local_authority.todo_snapshot_page), whose 1,792 KiB inline page budget refuses a single record that cannot fit. Commit 81d4fc2db (#6828) deliberately moved the adapter to the complete private-file entrypoint (coordination.local_authority.todo_snapshot, up to 62 MiB) and documented that "a complete snapshot within private-file capacity can carry records or metadata beyond the inline page limit; the standalone wire-only endpoint retains its previous rejection behavior" (canonical snapshot pagination).

Measured on dc9fdbb51: for both file and sqlite providers the transport returns the 3,000,000-byte note byte-identical, resolve_due_monitor_candidate returns {"due": true, ...}, and no display-Markdown state file is consulted. So the merged contract is satisfied and only the test still encodes the pre-#6828 refusal.

Impact

  • test-shard (3) is a required check; pytest and merge-gate inherit its failure. The required qualification is red on main, and every pull request based on current main inherits a failing required check it did not cause (39 open PRs at the time of filing).
  • The scheduled Python Tests fleet run fails for the same cause, so the daily qualification cannot report a clean base and this failure masks real regressions in the same shard.
  • The red lane also misreads as "an oversized canonical record was not refused" even though the accepted #6828 contract explicitly allows a complete snapshot within private-file capacity to carry records beyond the inline page limit.

Minimal reproduction

git checkout dc9fdbb51
uv sync --extra test
uv run --extra test python -m pytest -q \
  tests/control_plane/test_monitor_target_transport.py -k large_authority

Observed: 2 failed, 4 passed, 13 deselected with Failed: DID NOT RAISE LocalCoordinationAuthorityUnavailable at tests/control_plane/test_monitor_target_transport.py:61.

Expected behavior

The monitor transport test qualifies the merged complete-read contract: a record larger than the inline request/page budget is transported completely by the private-file entrypoint, while the refusal path stays pinned where it still exists - the wire-only coordination.local_authority.todo_snapshot_page endpoint, already covered by tests/control_plane_ts/canonical_snapshot_page.test.ts (canonical_snapshot_record_too_large) and the bounded-page assertions in tests/control_plane/test_canonical_snapshot_integration.py.

Actual behavior

The test still requires the pre-#6828 refusal, so the required shard fails on main for behavior that the merged transport contract intentionally allows.

JasonBuildAI avatar Oct 19 '26 02:10 JasonBuildAI