Use predefined exit codes
Metadata
Current evaluation
Refactor request to replace hardcoded sysexits.h magic numbers with os.EX_* constants in application.py, errors.py, remotebuild.py, and to expose error exit codes for tests. PR #387 merged and fixed the simple cases; 128+SIGINT and a few magic numbers (77/75) remain.
Suggested action: keep open
Reason: PR #387 (merged, commit e8651e46) resolved the main body of the issue — application.py, errors.py, and services/remotebuild.py now use os.EX_* constants — but the follow-up items from the comments remain unaddressed: application.py:440 and util/logging.py:65 still use bare 128 + signal.SIGINT, and commands/remote.py still hardcodes retcode=77 and return 75 with explanatory comments, exactly the anti-pattern the issue targets. The work is small and well-scoped, so it merits keeping open rather than closing as stale.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
15
Quick Win:
12.75
Staleness:
72
Complexity:
15
Confidence:
80
Support Request:
0
|
keep open | Refactor request to replace hardcoded sysexits.h magic numbers with os.EX_* constants in application.py, errors.py, remotebuild.py, and to expose error exit codes for tests. PR #387 merged and fixed the simple cases; 128+SIGINT and a few magic numbers (77/75) remain. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
90
Complexity:
15
Confidence:
85
Support Request:
0
|
close stale | Refactor request to replace hardcoded exit codes with standard os.EX_* constants and expose error exit codes for testing. Partially addressed via PR #387, but stalled for over a year with no further maintainer action. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
20
Confidence:
70
Support Request:
5
|
needs triage | Suggests replacing hardcoded exit codes with Python os module constants and exposing error codes for testing. PR 387 handles simple cases, but signal-based exit codes remain unresolved. Unlabelled and inactive for over a year. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
80
Complexity:
15
Confidence:
80
Support Request:
0
|
close stale | Replace hardcoded exit codes with Python's os.EX_* constants and expose error codes for testing. PR #387 handles simple cases, but 128 + signal.SIGINT mappings remain under discussion. Awaiting resolution. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-application#387
(confidence 85%)
Merged PR 'refactor: use exit code constants when possible' explicitly noted as partially resolving this issue; it converted the simple os.EX_* cases in application.py, errors.py, and remotebuild.py.
Related issues
No related issues found above the similarity threshold.