Skip to content

test: consolidate PROPERTY_MAPPING suites around a public behavior matrix (#799) - #870

Merged
TomKaltofen merged 1 commit into
mainfrom
refactor/os-006-consolidate-property-mapping-tests
Jul 21, 2026
Merged

test: consolidate PROPERTY_MAPPING suites around a public behavior matrix (#799)#870
TomKaltofen merged 1 commit into
mainfrom
refactor/os-006-consolidate-property-mapping-tests

Conversation

@TKaltofen

Copy link
Copy Markdown
Collaborator

Summary

Phase 7 cleanup for the PROPERTY_MAPPING hardening epic (os-006, was #799). Consolidates the PROPERTY_MAPPING test suite around an explicit public-behavior matrix and retires duplicate private-helper coverage, with no production change and no loss of unique regression protection.

Changes

  • Behavior matrix doc (PROPERTY_MAPPING_TEST_MATRIX.md): maps each behavior axis (match path, option source, presence, required/conditional, value shape, value space, callback outcome, diagnostics, defaults lifecycle, construction) to its owning public-boundary test. Records the private-helper tests deliberately kept as intentional contracts, the retired seams, and the deferred fixture-parametrization work with its rationale.
  • Centralize transitional seam-absence pins: move the _get_validation_function gone and _validate_type_validators -> _validate_match_guards rename pins out of test_property_mapping_unified_model.py into test_retire_transitional_seams.py, next to the os-005 seam-absence pins they belong with. The public field-default assertion is preserved on the fields test.
  • Drop a private-lambda pin: test_property_mapping_container_invariance.py no longer pins the plugin element_validator lambda directly; its three public sibling tests and core test_property_mapping_sequence_unpacking.py own that per-element contract.
  • Drop two shipped-plugin facade duplicates: the "reason is None for a valid or absent value" pair in test_property_mapping_enforced_validators.py; that contract is core-owned in test_name_path_validates_option_values.py.
  • Remove the stale-name constants left unreferenced by the above.

Coverage preservation

Net change over the 15 PROPERTY_MAPPING test files: 529 -> 514 collected node ids. Every removed or moved test traces to a surviving public or core boundary that asserts the same behavior; the two seam-absence pins are relocated, not deleted. No new module-level FeatureGroup subclasses, so no added registry-leak surface.

Validation

  • tox green: 7147 passed, 170 skipped (skip count unchanged), ruff format + check, pip-licenses, mypy --strict, and bandit all pass.
  • Two independent deep reviews (a fresh Claude Opus reviewer and codex): both confirm no coverage silently dropped and no production behavior change. Matrix wording nits raised by the Opus review were fixed; the dropped element-validator-shape pin was accepted as intended per the ticket (not an intentional contract).

Test refactor only.

…trix (#799)

Phase 7 cleanup. Add a behavior-matrix doc mapping each PROPERTY_MAPPING
axis to its owning public-boundary test, retire the transitional private
seam-absence pins into the one file that owns them, and drop private-helper
tests already covered at a public or core boundary.

- Add PROPERTY_MAPPING_TEST_MATRIX.md: axis -> owning test, the deliberately
  kept private-helper contracts, and the deferred fixture-parametrization work.
- Move the _get_validation_function / _validate_type_validators seam-absence
  pins from test_property_mapping_unified_model into test_retire_transitional_seams;
  keep the field-default assertion on the public fields test.
- Drop the container-invariance test that pins the plugin element_validator
  lambda directly; its three public sibling tests and core sequence-unpacking
  own that contract.
- Drop the two enforced-validators facade tests that re-assert "reason is None
  for a valid or absent value"; that contract is core-owned in
  test_name_path_validates_option_values.
- Remove the now-unused stale-name constants left in unified_model.

Test refactor only; no production change. tox green (7147 passed, 170 skipped).
@TKaltofen
TKaltofen requested a review from TomKaltofen as a code owner July 21, 2026 13:18
@TomKaltofen
TomKaltofen merged commit 8aec943 into main Jul 21, 2026
18 checks passed
@TomKaltofen
TomKaltofen deleted the refactor/os-006-consolidate-property-mapping-tests branch July 21, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants