Skip to content

Commit 730681a

Browse files
CrazyBaranclaude
andcommitted
test(extensions): pin that every drifted extension stays covered by the delivery tests
Address Copilot review round 2 on github#4394. The update-delivery tests draw their parametrized cases from the live catalog, so an extension that lost its `bundled` flag, its catalog entry, or its in-repo manifest silently dropped out of both tests, and the DRIFTED_BEFORE_BUMP guard inside them never ran for it. The previous presence test only asserted the case list was non-empty. Replace it with test_drifted_extensions_are_covered, which asserts every extension in DRIFTED_BEFORE_BUMP is still a bundled, in-repo catalog entry. De-bundling one of them is a deliberate decision that should update that set rather than silently shrink coverage. Verified: clearing the bundled flag on `assess` drops its cases from the parametrized tests and this test is the only one that fails. Refs github#4345 Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent a21a34f commit 730681a

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎tests/contract/test_bundled_extension_update_delivery.py‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,20 @@ def _run_update(project_dir: Path, ext_id: str):
9191
)
9292

9393

94-
def test_bundled_ids_present():
95-
assert _bundled_ids(), "expected bundled extensions with in-repo sources"
94+
def test_drifted_extensions_are_covered():
95+
"""The parametrized tests below draw their cases from the live catalog, so
96+
an extension that lost its ``bundled`` flag, its catalog entry, or its
97+
in-repo manifest would silently drop out of them and the
98+
``DRIFTED_BEFORE_BUMP`` guard inside would never run for it. Pin the
99+
coverage itself: every extension known to have drifted must still be a
100+
bundled, in-repo catalog entry. De-bundling one of them is a deliberate
101+
decision that should update this set, not a silent loss of coverage."""
102+
covered = set(_bundled_ids())
103+
missing = DRIFTED_BEFORE_BUMP - covered
104+
assert not missing, (
105+
f"{sorted(missing)} drifted before #4345 but are no longer bundled, in-repo "
106+
f"catalog entries, so the update-delivery tests no longer cover them"
107+
)
96108

97109

98110
@pytest.mark.parametrize("ext_id", _bundled_ids())

0 commit comments

Comments
 (0)