Repository navigation
chore: drop unused schema bundles - #1877
Conversation
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — high-risk-path deletions require human review.
This PR is a pure deletion chore removing 16 retired prerelease schema cache bundles under schemas/cache/3.1.0-beta.3/ (~17,743 files, zero additions). The reviewer verified independently that the removed prereleases were never packaged (pyproject package-data restricts to 3.0/3.1/3.1.15/3.2), are not re-synced (PREVIEW_VERSIONS=3.1.27), and that every removed-version reference in tests/src is a label/comment/enum-example rather than a cache load. No Critical/High/Medium findings were surfaced.
Despite the clean review, decision-table row 3 applies: high_risk is true AND the high_risk_reasons contain (deleted) entries matching schemas/**. Deletions in sensitive schema paths always merit escalation — they are rare and hard to recover from if the analysis is wrong. A human must confirm these retired caches are safe to remove.
Escalation reasons
- Deletes many files under
schemas/cache/3.1.0-beta.3/**(matches high-risk globschemas/**) — schema cache removal requires human/CODEOWNERS confirmation.
Note: gated_paths is false and review_decision is REVIEW_REQUIRED, but row 2 does not apply (gated_paths false). Row 3 is the controlling trigger.
Why human review
- Deletes numerous files under schemas/cache/3.1.0-beta.3/** (matches high-risk path glob schemas/**) — schema cache deletions always merit human/CODEOWNERS review per decision-rule row 3, even on a clean diff.
Summary
Remove retired prerelease schema caches that are not loaded by repository code, tests, CI, or distribution packaging. This reduces clone and worktree size while retaining the bundles required for schema generation, validation, and historical tests.
In a source checkout, a request or response declaring one of the removed prerelease versions no longer finds a schema for that version. For a native tool, validation reports a
schema_unavailableissue (src/adcp/validation/schema_validator.py), which strict request mode raises asVERSION_UNSUPPORTED(src/adcp/validation/client_hooks.py). Custom tools and other fallback paths skip validation as before. Installed wheels already lacked these retired prerelease bundles and already behave this way; wheel contents and runtime code are unchanged.Removed bundles
Sizes are the sum of file bytes in each directory, measured before removal.
3.1.0-beta.33.1.0-beta.43.1.0-beta.53.1.0-beta.73.1.0-rc.23.1.0-rc.43.1.0-rc.63.1.0-rc.83.2.0-beta.03.2.0-beta.33.2.0-beta.93.2.0-beta.103.2.0-beta.113.2.0-rc.03.2.0-rc.23.2.0-rc.4Total
schemas/cache: 2,915,185,105 → 1,450,454,875 bytes, a reduction of 1,464,730,230 bytes (50.2%).Retained bundles
3.1.0-rc.9and3.1.0-rc.10: the version-negotiation test reads both bundle versions to compare prerelease ordering.3.1.0-rc.13: schema validation and upstream recorder tests load it.3.2.0-beta.4: version-scoped MCP schema and discovery tests load it.3.2.0-beta.5: postal-area schema validation test loads it.3.2.0-beta.6: historical reporting and MCP materialization tests and installed test fixtures load it.3.2.0-rc.1: media-buy action fixtures and schema validation tests load it.3.2.0-rc.3: reporting-status compatibility handling and historical reporting tests/fixtures load it.3.2.0-rc.6: reporting interop, version-scoped validation, and historical test fixtures load it.3.2.0-rc.7: version bridge and historical validation tests load it.The
2.5cache remains for legacy schema tests. The distribution bundles3.0,3.1,3.1.15, and3.2remain unchanged. Cache enumeration for packaging fingerprints does not itself require a particular retired bundle. The sync script fetches the SDK pin andPREVIEW_VERSIONS; the retained 3.1.15 compatibility cache is independent of that sync.Verification
Baseline and proposed removals were tested against the same fetched
origin/maincommit in separate checkouts with Python 3.12; the full runs overlapped without sharing cache directories. The local environment did not supply PostgreSQL services; CI runs its service-backed matrix separately. The Python 3.10, 3.11, and 3.13 full CI lanes were not run locally.make PYTHON=.venv312/bin/python validate-generated/make validate-generated: passed before and after, includingpython scripts/generate_types.py --check, versioned stub and base checks.python -m pytest tests/test_code_generation.py -v --tb=short: 125 passed before and after.ruff check src/ packages/adcp-reporting-storage/src/: passed before and after.mypy src/adcp/ packages/adcp-reporting-storage/src/adcp_reporting_storage/: passed before and after.mypy --strict tests/type_checks/ examples/reporting_webhook_activity.py examples/reporting_status_notifications.py examples/reporting_destination_writer.py examples/reporting_durable_materializer.py examples/reporting_receipt_ingress.py examples/reporting_production.py: passed before and after.python scripts/run_pyright_type_checks.pyandpython scripts/check_type_ignore_contract.py: passed before and after.python scripts/sync_schemas.py && python scripts/fix_schema_refs.py && git diff --quiet -- schemas/cache/: passed before and after, with signed upstream bundles and intended deletions staged for the second check. Also verifiedgit ls-files --others --exclude-standard -- schemas/cache/was empty after sync; removed caches were not recreated.python -m pytest -n 2 -q tests/test_validation_version.py tests/test_schema_validation.py tests/test_version_scoped_models.py tests/test_postal_area_compat.py tests/test_rc6_adoption.py tests/test_rc7_version_bridge.py tests/test_media_buy_actions.py tests/test_upstream_recorder.py tests/test_sync_schemas.py tests/test_sync_schemas_signed_release.py: 480 passed after removal.python -m pytest tests/test_negotiated_catalog_purchase.py -q: 38 passed after retaining3.1.0-rc.9and3.1.0-rc.10.python -m build --outdir <dist> && python scripts/ci/check_distribution_size.py <dist>: passed before and after. The wheel measured 51,379,311 bytes in both builds; sdist sizes were 48,374,400 and 48,390,350 bytes respectively. Compared SHA-256 values for every packagedadcp/_schemas/member: all 3,735 paths and contents matched, with bundle keys3.0,3.1,3.1.15, and3.2.An initial trial also removed
3.1.0-rc.9and3.1.0-rc.10. The full suite exposed a negotiation failure because the test loads the available bundle versions before comparing them; both bundles were restored so the ordering test remains meaningful. The affected 38-test negotiation file passed after restoration.python scripts/ci/run_native_tests.py --mode full --coverage --unit-workers 2: baseline unit phase 14,143 passed, 156 skipped, 1 xfailed. Final-set unit phase 14,142 passed, 1 failed, 156 skipped, 1 xfailed. The failure wastests/test_reporting_source_contract.py::test_an_executor_past_its_deadline_is_cancelled_and_reported: the 80 ms deadline test reportedexecutor.cancelled == False. It passed in the baseline full run and passed on an independent final-set rerun (python -m pytest tests/test_reporting_source_contract.py::test_an_executor_past_its_deadline_is_cancelled_and_reported -q, 1 passed). The shared test host was heavily loaded; this test does not read schema bundles. Because the runner stops after a failing unit phase, the final-set sequential phase was run separately with the same runner-generated command and appended coverage:python -c 'from scripts.ci.run_native_tests import run_commands, test_commands; raise SystemExit(run_commands(test_commands("full", coverage=True, workers=2)[1:]))'.ensurepipforpython -m venv. After Python venv support was installed, a fresh Python 3.12 environment and isolated test harness reran both affected parametrized tests on each checkout:python scripts/reporting_test_harness.py python -m pytest tests/conformance/reporting/test_reporting_notification_packaging.py::test_installed_base_import_needs_no_pg_extra tests/conformance/reporting/test_reporting_notification_packaging.py::test_installed_pg_extra_migrates_commits_and_restarts -n 0 -v -ra. Both baseline and final set: 2 passed, 2 skipped; the skipped PostgreSQL cases requireADCP_PG_TEST_URL.ensurepiphost issue described above). Final-set sequential phase: 4,723 passed, 2,667 skipped, 10 deselected, with appended coverage of 92.16% (80% required).