← 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 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.

Suggested action: needs review

Reason: lengau asked on 2025-12-06 to rebase and fix merge conflicts, and the Copilot author replied it cannot rebase or fetch main, so a human maintainer must resolve the conflicts manually; no activity since. cmatsuoka already signaled intent to land it ('We can land this directly on main after landing #54', now merged), so the PR remains relevant rather than stale-closable, and the author's explicit request for manual help puts the ball in the maintainer's court.

Impact: 25 Quick Win: 18.75 Staleness: 60 Complexity: 25 Confidence: 65

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
qwen/qwen3.8-27b
Impact: 25
Quick Win: 18.75
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 15
Confidence: 80
close stale Adds 21 unit tests for the Debian control model and encoder, addressing feedback from PR #54. Currently stale and blocked on manual rebase and conflict resolution with main, as the authoring agent lacks git permissions.

Update history

No update history recorded yet.

Related work

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

    PR body states it addresses review feedback from #54, and cmatsuoka said it can land on main after #54 (which is now merged).

Related issues

No related issues found above the similarity threshold.