-
Notifications
You must be signed in to change notification settings - Fork 156
Test gap: TestExplicitTargetDirCreation and TestContentHashFallback are logic-replays #768
Copy link
Copy link
Open
Labels
area/testingTest infrastructure, fixtures, e2e harness, coverage.Test infrastructure, fixtures, e2e harness, coverage.good first issueGood for newcomersGood for newcomerspriority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).type/bugSomething does not work as documented.Something does not work as documented.
Metadata
Metadata
Assignees
Labels
area/testingTest infrastructure, fixtures, e2e harness, coverage.Test infrastructure, fixtures, e2e harness, coverage.good first issueGood for newcomersGood for newcomerspriority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).type/bugSomething does not work as documented.Something does not work as documented.
Type
Projects
Status
In Progress
Surfaced by Copilot review of #763.
The two test classes added in #763 —
TestExplicitTargetDirCreationandTestContentHashFallbackintests/unit/test_install_command.py— re-implement the production conditional inline rather than exercisingapm installitself. They will pass even ifinstall/phases/targets.pyorinstall/phases/{download,integrate}.pyregress, defeating their purpose as regression guards.Required follow-up
apm install --target claudeviaCliRunner(mocking downloads/integration), assert.claude/is created. Or factor the loop ininstall/phases/targets.pyinto a helper and unit-test the helper directly.git.Repothat raises and a mocked downloader; assert the downloader is not called whencontent_hashmatches, and is called when it mismatches/is missing. Affects three sites:install/phases/download.py:81-90install/phases/integrate.py:104-114(update_refs branch)install/phases/integrate.py:115-126(normal-mode branch)Context
This aligns with the broader integration-coverage push in #767 — the cleanest fix is likely a shared CliRunner-based fixture under
tests/integration/install/rather than more isolated unit tests.Acceptance criteria
and not _explicitguard is removed fromtargets.py.pass.Refs: #763 (Copilot review comments), #767 (integration coverage gaps).