Repository navigation
test: complete clone retry owner mutation coverage - #2841
Daniel Meppiel (danielmeppiel) merged 1 commit into
Conversation
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is a minimal, correctly targeted test-only mutation entry that matches the current clone_engine.py call site and introduces no production or contract-surface risk.
Review tier: Lite
Findings: None
What changed in this PR
Adds the missing integration mutation row for the transport-platform-clone-connect-retry owner guard so the “exactly-once” mutation matrix again covers every registered guard and catches regressions like the release-run failure described in the PR body.
Changes:
- Add a new
MutationCaseentry that mutatesCloneEngine.execute()to callclone_action(...)directly instead of_clone(...), bypassing the canonical connect-retry wrapper for that one call site. - Preserve existing matrix invariants (single occurrence, parsable Python, ASCII-only fragments, and per-guard uniqueness) by using the exact
clone_engine.pycall-site fragment.
| File | Description |
|---|---|
| tests/integration/test_architecture_owner_rule_mutations.py | Adds one new mutation-matrix row for the clone connect retry guard to restore exact-once coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Docs sync advisoryVerdict: no_change * Pages affected: 0 * LLM calls: 1/15 High confidence, deterministic L0 path gate: the sole changed path matches Final validation handoffAll 15 reported hosted checks pass at head Relevant local proof: 901 passed, including the full affected integration module, all architecture integration/registry/inventory/mutation contracts, clone retry behavior and its three bypass mutations, and resolution-staging MCP lifecycle. Additional focused mutation plus clean-baseline proof: 5 passed. Quality: 56 passed. Full canonical lint and assertion/duplicate ratchets clean. No merge, tag, workflow dispatch, cancellation, or publishing action taken by this session. GitHub currently reports mergeStateStatus BLOCKED despite all reported checks passing; parent owns merge policy and release actions. |
TL;DR
Add the missing load-bearing mutation for
transport-platform-clone-connect-retry, repairing the exact-once owner matrix that failed release run 34015503962 after #2839. #2840 repaired the unit inventory but missed this independent integration contract.Important
Eight added lines in one test file. No production, workflow, specification, version, or changelog changes. No specification waiver. Parent owns merge/tag/release actions.
Problem (WHY)
Reproduced
test_matrix_covers_every_registry_guard_exactly_oncefailing with exactly one missing guard. Adding a name alone would not prove detection: the matrix requires surgical valid Python, a clean baseline, the actual owning rule, and a real attributedViolation.Validation follows "do the work, run a validator (a script, a reference checklist, or a self-check), fix any issues, and repeat until validation passes."
Approach (WHAT)
Additive change -- see Implementation.
Implementation (HOW)
tests/integration/test_architecture_owner_rule_mutations.pygains one sorted row replacing_clone(url, _env_for(attempt, url), target_path)withclone_action(url, _env_for(attempt, url), target_path)in an in-memory source override. This bypasses canonical connection recovery while preserving the arguments and valid Python. Every existing invariant remains unchanged.Diagrams
The new row drives the real selected rule through the existing mutation and baseline proofs (validated with
mmdc).flowchart LR subgraph Input["Source override"] M["NEW: replace _clone with clone_action"] end subgraph Guard["Selected real rule"] R["transport-platform-clone-connect-retry"] end subgraph Proof["Existing matrix assertions"] V["Attributed Violation"] B["Unmutated baseline is clean"] end M --> R --> V R --> B classDef new stroke-dasharray: 5 5; class M new;Trade-offs
Benefits
Violation.Validation
Base: latest main
4b0efe2524319f91434d5fcc04cd1c1e86124d8a, includingbc9f75704and #2827. Hosted checks pending at creation; local results below.Reproduction and full relevant contract suite
Before patch:
uv run --extra dev pytest -q tests/integration/test_architecture_*.py tests/unit/scripts/test_architecture_*.py tests/unit/install/test_architecture_invariants.py tests/unit/deps/test_clone_connect_retry.py tests/integration/test_resolution_staging_mcp_lifecycle.pyIncludes the entire affected integration module, every architecture integration mutation/contract module, unit inventory/registry/runner contracts, retry behavior and all three unit bypass cases, and inherited staging MCP lifecycle coverage.
uv run --frozen --extra dev pytest -q tests/integration/test_architecture_owner_rule_mutations.py -k 'clone_connect_retry or clone-connect-retry or report_nothing or covers_every_registry'Proves exact-once inventory, owning-rule attribution, surgical valid-source mutation, bypass rejection, and clean unmutated baseline.
Lint, quality, and inventory audit
Full canonical lint passed: Ruff, formatting, YAML safety, 2100-line limit, portable relative paths, pylint R0801, auth boundaries, and architecture boundaries.
uv run --frozen --extra dev pytest -p no:cacheprovider -q tests/qualityuv run --frozen python scripts/check_test_assertions.pyuv run --frozen python scripts/check_exact_test_duplicates.pySearched owner registry, registered analyzer, frozen unit runner inventory, integration matrix, unit bypass tests, and other architecture contracts. No additional authoritative inventory discrepancy found. Historical performance parity JSON is not a live guard catalog.
Scenario Evidence
tests/integration/test_architecture_owner_rule_mutations.py::test_matrix_covers_every_registry_guard_exactly_oncetests/integration/test_architecture_owner_rule_mutations.py::test_owner_rule_catches_its_guard_mutation[transport-platform-clone-connect-retry]tests/unit/deps/test_clone_connect_retry.pytests/integration/test_resolution_staging_mcp_lifecycle.pyHow to test
Co-authored-by: Copilot [email protected]