← Back to issue list

Remove BuilddBaseAlias string-match guard in handle_runtime_error

View original Github issue

Metadata

Project
craft-application
Number
#1086
Type
issue
State
open
Author
tonyandrewmeyer
Labels
—
Created
Updated
Closed
—

Current evaluation

Follow-up cleanup request: replace the message-matching BuilddBaseAlias ValueError guard in handle_runtime_error with typed handling. Blocked by open craft-providers#969; the guard does not yet exist on main (introduced in still-open PR #1082).

Suggested action: needs triage

Reason: The issue has no labels, no comments, and no maintainer response after 122 days, so it has never been triaged. Evidence also shows mixed signals: the `case ValueError() if "BuilddBaseAlias" in str(error)` guard is absent from the current HEAD of craft_application/util/logging.py (grep for BuilddBaseAlias finds only project.py and test hits, and git log shows no commit introducing it), meaning it lives only in the still-open, unmerged PR #1082, whose summary notes 11 unresolved comments. Meanwhile the blocking issue craft-providers#969 is summarized as "the reported BuilddBaseAlias ValueError no longer escapes", which suggests the correct fix here may be outright removal rather than a typed `except`, so the desired end state still needs maintainer confirmation.

Evaluated by: mr-cal-bot

Impact: 20 Quick Win: 6 Complexity: 30 Confidence: 60 Actionability: 45

Issue body

`craft_application/util/logging.py` (lines ~115-133, introduced in #1082) catches the bare `ValueError("'X.YY' is not a valid BuilddBaseAlias")` from craft-providers by string-matching the message: case ValueError() if "BuilddBaseAlias" in str(error): This is a shallow guard. The proper fix is for craft-providers to raise a typed error at the lookup site; once that lands, this match arm should be replaced by a typed `except` clause (or removed if the upstream handler covers it). Blocked by: canonical/craft-providers#969

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 20
Quick Win: 6
Complexity: 30
Confidence: 60
Actionability: 45
needs triage Follow-up cleanup request: replace the message-matching BuilddBaseAlias ValueError guard in handle_runtime_error with typed handling. Blocked by open craft-providers#969; the guard does not yet exist on main (introduced in still-open PR #1082).
stealth/space-bunny-alpha
Impact: 32
Quick Win: 17
Complexity: 30
Confidence: 94
Actionability: 76
needs triage Replace the message-based BuilddBaseAlias ValueError guard with typed handling once craft-providers raises a typed error; blocked by open, untriaged craft-providers#969.
stealth/space-bunny-alpha
Impact: 28
Quick Win: 8
Complexity: 32
Confidence: 93
Actionability: 43
needs triage A message-based ValueError guard in handle_runtime_error should be replaced with typed handling, but craft-providers#969 remains open and untriaged.
qwen3.6-35b-a3b-mtp-q6
Impact: 20
Quick Win: 15
Staleness: 70
Complexity: 25
Confidence: 60
Support Request: 0
needs triage Issue about removing a string-match guard for BuilddBaseAlias ValueError in handle_runtime_error, blocked by craft-providers#969
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 30
Confidence: 90
Support Request: 0
needs triage Issue requests replacing a string-match guard for a ValueError with a typed exception handler, pending an upstream fix in craft-providers.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 20
Confidence: 85
Support Request: 0
needs triage Proposes replacing a string-matching ValueError guard in logging.py with a typed exception after an upstream craft-providers fix lands. Currently blocked and awaiting maintainer triage.

Update history

No update history recorded yet.

Related work

  • Blocked By: canonical/craft-providers#969 (confidence 90%)

    Explicitly stated in the issue body as the blocking upstream work; its summary indicates the bare ValueError premise may itself be obsolete, which would change the resolution to plain removal.

  • Related To: canonical/craft-application#1082 (confidence 85%)

    PR cited as introducing the string-match guard; still open with unresolved reviewer comments, so the code this issue targets has not landed on main.

Related issues

No related issues found above the similarity threshold.