← Back to issue list

test: unit tests for control encoder and model

View original Github issue

Metadata

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

Current evaluation

Adds 21 unit tests for the Debian control model and encoder, but remains conflicted with main, fails the Conventional Commits policy, and has been inactive for 300 days.

Suggested action: close stale

Reason: After lengau requested a rebase and conflict resolution, the author stated they could not perform either, and there has been no activity for 300 days. PR #54 has since merged, but this branch remains conflicted, fails policy / Conventional Commits, and its +900/-108 diff across 22 files no longer matches the focused 21-test change described.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 2 Complexity: 42 Confidence: 93 Actionability: 12

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 control file encoding logic. ### Changes - **`tests/unit/models/test_control_model.py`**: Tests for `DebianControl` model and `_field_alias` function - Field alias generation (snake_case → Debian-Control-Format) - Model creation, optional field defaults, architecture as list - **`tests/unit/debcraft/test_control.py`**: Tests for `Encoder` class - Simple field encoding - Multi-line string handling with continuation lines - Empty lines replaced with ` .` - List fields as comma-separated values - None fields excluded from output ### Example ```python from debcraft.models.control import _field_alias # Field alias conversion _field_alias("installed_size") # → "Installed-Size" _field_alias("original_maintainer") # → "Original-Maintainer" ``` 21 new tests added. <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/canonical/debcraft/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 2
Complexity: 42
Confidence: 93
Actionability: 12
close stale Adds 21 unit tests for the Debian control model and encoder, but remains conflicted with main, fails the Conventional Commits policy, and has been inactive for 300 days.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 0
Complexity: 20
Confidence: 70
Actionability: 0
close stale Adds 21 unit tests for control encoder and model. Has unresolved merge conflicts; Copilot author cannot rebase or fix conflicts. CI failing on Conventional Commits policy. Inactive 288 days.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 19
Staleness: 60
Complexity: 25
Confidence: 65
needs review Adds 21 unit tests for the DebianControl model and control Encoder. CI green except Conventional Commits check; stalled ~9 months with unresolved merge conflicts the Copilot author cannot fix; maintainer asked for a rebase.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 90
close stale Adds unit tests for control encoder and model. Blocked by AI author unable to rebase/resolve conflicts after maintainer request. Inactive for ~227 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 88
Complexity: 15
Confidence: 85
close stale Adds 21 unit tests for the DebianControl model and Encoder class. Currently inactive for over 7 months after the AI author stated it cannot rebase or resolve conflicts.

Update history

No update history recorded yet.

Related work

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

    A maintainer said this PR could land after #54; #54 is now merged.

Related issues

No related issues found above the similarity threshold.