← Back to issue list

test: unit tests for get_package and get_partitions methods

View original Github issue

Metadata

Project
debcraft
Number
#56
Type
pull request
State
open
Author
Copilot
Labels
—
Created
Updated
Closed
—

Current evaluation

Adds unit tests for Project.get_package() and PackagesProject.get_partitions(). Open 308 days, 0 approvals, 3 unresolved comments; maintainer asked for a rebase on 2025-12-06 and the bot author cannot force-push. Branch has drifted 300 days behind main.

Suggested action: close stale

Reason: lengau explicitly requested "@copilot rebase this on main" (2025-12-06) and the author replied it cannot force-push, with zero activity in the ~300 days since; the branch is now far behind main (project.py has since gained #94, #98, #152, #158, #184), and the diff's +578/-108 across 21 files is far wider than the advertised tests, so it would need rewriting rather than a rebase. Its purpose is partly stale — main already covers get_partitions via test_default_partition in tests/unit/models/test_project_model.py — but get_package() still has zero coverage at HEAD, so a fresh small PR is the better path.

Evaluated by: mr-cal-bot

Impact: 20 Quick Win: 2 Complexity: 35 Confidence: 72 Actionability: 18

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint && make test`? --- Addresses review feedback from #54 requesting unit test coverage for the new `get_package` and `get_partitions` methods in project models. ### Changes - Added tests for `Project.get_package()`: - Successful package retrieval - Error when no packages defined - Error when package not found - Added tests for `PackagesProject.get_partitions()`: - Returns `["default"]` when no packages defined - Returns `["default", "package/<name>", ...]` when packages defined ```python def test_get_package_success(default_project): package = default_project.get_package("package-1") assert package.version == "2.0" def test_get_partitions_with_packages(): packages_project = project.PackagesProject( packages={"pkg-a": Package(version="1.0"), "pkg-b": Package(version="2.0")} ) result = packages_project.get_partitions() assert result == ["default", "package/pkg-a", "package/pkg-b"] ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 20
Quick Win: 2
Complexity: 35
Confidence: 72
Actionability: 18
close stale Adds unit tests for Project.get_package() and PackagesProject.get_partitions(). Open 308 days, 0 approvals, 3 unresolved comments; maintainer asked for a rebase on 2025-12-06 and the bot author cannot force-push. Branch has drifted 300 days behind main.
qwen/qwen3.6-35b-a3b
Impact: 25
Quick Win: 3
Complexity: 20
Confidence: 70
Actionability: 15
close stale Adds unit tests for Project.get_package() and PackagesProject.get_partitions() methods. PR is 296 days old with 3 unresolved review comments, 0 reviewers, and was never rebased after a maintainer request 288 days ago.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 16
Staleness: 62
Complexity: 35
Confidence: 65
needs review Adds unit tests for Project.get_package() and PackagesProject.get_partitions() as follow-up to merged #54. Pending rebase onto main requested by a maintainer; the Copilot bot can't force-push, and no activity for about 9 months.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 15
Confidence: 85
close stale Adds unit tests for get_package and get_partitions methods. Blocked on a maintainer-requested rebase that the AI author stated it cannot perform. Inactive for over 7 months with no follow-up.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 15
Confidence: 85
close stale Adds unit tests for get_package and get_partitions methods. Inactive for 7 months after maintainer requested a rebase that the AI author could not perform.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/debcraft#54 (confidence 90%)

    PR #54 (merged, commit 997cdf6) introduced get_package/get_partitions; cmatsuoka said this PR can land directly on main only after #54, which has since happened, but the branch was never rebased.

  • Related To: canonical/debcraft#98 (confidence 65%)

    'feat: set default partition' (commit c43abf5) reworked get_partitions and added test_default_partition on main; this branch predates that work and its test expectations were written against the older model.

Related issues

No related issues found above the similarity threshold.