← Back to issue list

Refactor how managed mode and provider are determined

View original Github issue

Metadata

Project
craft-application
Number
#262
Type
issue
State
open
Author
mr-cal
Labels
—
Created
Updated
Closed
—

Current evaluation

A maintainer-filed code-debt refactor remains open: consolidate split managed-mode and provider decisions earlier in craft-application; current code still handles them separately.

Suggested action: needs triage

Reason: The issue has no labels or assignee, and its only comment is an autogenerated Jira notification, so maintainer prioritization is not recorded. Current code still decides the provider through provider_name/_configure_services while _use_provider separately checks managed mode, destructive mode, and build_environment, confirming the debt but leaving the intended early-decision design to clarify.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 12 Complexity: 48 Confidence: 94 Actionability: 74

Issue body

### What needs to get done Snapcraft determines if it should run in managed mode or not and which provider to use. This is done in 2 discrete places in the codebase. This was upstreamed in https://github.com/canonical/craft-application/pull/242. To make the code more readable and maintainable in craft-application, this code could be combined and done earlier in craft-application's execution. Source: https://github.com/canonical/craft-application/pull/242#discussion_r1507992182 ### Why it needs to get done To reduce code debt

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 12
Complexity: 48
Confidence: 94
Actionability: 74
needs triage A maintainer-filed code-debt refactor remains open: consolidate split managed-mode and provider decisions earlier in craft-application; current code still handles them separately.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 11
Complexity: 40
Confidence: 70
Actionability: 60
keep open Refactor consolidated managed mode and provider determination logic in craft-application to reduce code debt.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 11
Staleness: 75
Complexity: 55
Confidence: 72
Support Request: 0
needs triage Technical debt: consolidate managed-mode and provider determination (currently in 2 places) into one earlier step in craft-application. Code still exhibits the split structure; no labels, no maintainer response, 15 months inactive.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 40
Confidence: 65
Support Request: 5
needs triage Refactor to consolidate managed mode and provider determination logic in craft-application. Currently unlabelled, inactive for over a year, and awaiting maintainer assessment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 75
Support Request: 5
needs triage Refactor to consolidate managed mode and provider determination logic in craft-application. Currently unlabelled, unassessed, and inactive for over a year.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-application#242 (confidence 100%)

    The issue explicitly cites PR #242 and its discussion as the source of the refactor request.

Related issues

No related issues found above the similarity threshold.