You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File: crates/libaipm/src/migrate/adapters/mod.rs
Function: StubAdapter::to_artifact (test-only stub used in migrate::adapters registry ordering/object-safety tests)
The Err(Error::UnsupportedSource(...)) branch of this stub's to_artifact implementation was never exercised — existing tests only called stub.name() and stub.applies_to(...), leaving the file at 88.89% region branch coverage (8/9 hit).
What scenario the new test covers
Added stub_adapter_to_artifact_returns_unsupported_source_error, which constructs a StubAdapter, calls to_artifact with a minimal DiscoveredFeature, and asserts it returns Err(Error::UnsupportedSource(msg)) where msg contains "stub". This directly exercises the previously-uncovered error branch.
Original error: ERR_API: [2026-08-20T23:37:21.337Z] create pull request in TheLarkInn/aipm failed (attempt 1)
Original error: Resource not accessible by personal access token - https://docs.github.com/rest/pulls/pulls#create-a-pull-request
Retryable: false
Suggestion: This error cannot be resolved by retrying. Please check the error details and fix the underlying issue.
What branch was uncovered
File:
crates/libaipm/src/migrate/adapters/mod.rsFunction:
StubAdapter::to_artifact(test-only stub used inmigrate::adaptersregistry ordering/object-safety tests)The
Err(Error::UnsupportedSource(...))branch of this stub'sto_artifactimplementation was never exercised — existing tests only calledstub.name()andstub.applies_to(...), leaving the file at 88.89% region branch coverage (8/9 hit).What scenario the new test covers
Added
stub_adapter_to_artifact_returns_unsupported_source_error, which constructs aStubAdapter, callsto_artifactwith a minimalDiscoveredFeature, and asserts it returnsErr(Error::UnsupportedSource(msg))wheremsgcontains"stub". This directly exercises the previously-uncovered error branch.Before/after branch coverage
adapters/mod.rsbranch coverage: 88.89% → 100.00%Test code added
Verification
cargo build --workspace✅cargo test --workspace✅ (all pass, including the new test)cargo fmt --check✅cargo clippy --workspace -- -D warnings: pre-existing failures unrelated to this change (manual_is_variant_andlint inresolver/mod.rsandsecurity.rs, confirmed present onmainbefore this change too — already being tracked/fixed by PR fix(clippy): use Result::is_ok_and for Rust 1.98.0 manual_is_variant_and lint #1631)Note
This was originally intended as a pull request, but PR creation failed. The changes have been pushed to the branch
coverage-improver/stub-adapter-to-artifact-error-25f55f1f1013a8f3.Original error: ERR_API: [2026-08-20T23:37:21.337Z] create pull request in TheLarkInn/aipm failed (attempt 1)
Original error: Resource not accessible by personal access token - https://docs.github.com/rest/pulls/pulls#create-a-pull-request
Retryable: false
Suggestion: This error cannot be resolved by retrying. Please check the error details and fix the underlying issue.
To create the pull request manually:
gh pr create --title "[coverage-improver] Cover StubAdapter::to_artifact error branch" --base main --head coverage-improver/stub-adapter-to-artifact-error-25f55f1f1013a8f3 --repo TheLarkInn/aipmShow patch preview (47 of 47 lines)