← Back to issue list

fix(init): exit parent template dir context after using it

View original Github issue

Metadata

Project
craft-application
Number
#795
Type
pull request
State
open
Author
jonathan-conder
Labels
—
Created
Updated
Closed
—

Current evaluation

fix(init): use parent_template_dir inside its importlib.resources.path context before cleanup. Changes requested (2 reviewers, 8 unresolved comments), all 7 test CI jobs failing, no author activity for 11 months; bug still present upstream.

Suggested action: close stale

Reason: Maintainers requested changes roughly a year ago and the author never responded: review status is changes_requested from 2 reviewers with 8 unresolved review comments and 0 comments on the PR, last activity was 333 days ago, and all 7 test CI jobs fail (including 'Minimum dependencies (all tests)') while the author only claimed 'unrelated lint/test failures' without addressing it. The branch has also diverged past recovery — this PR's 4 files were all subsequently rewritten by b79989ab (#1137, --base), 9c74d1fd (#1149, git init features) and 5a49fd57 (#797, TC rules). Note the underlying bug is NOT obsolete: parent_template_dir at craft_application/commands/init.py:108-113 still returns the importlib.resources.path context after exit, and a pickaxe search found no superseding commit, so a fresh PR is the better path.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 3 Complexity: 35 Confidence: 78 Actionability: 15

Issue body

The directory isn't guaranteed to exist after the context manager exits. --- - [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint && make test`? - [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- There were some unrelated lint/test failures.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 3
Complexity: 35
Confidence: 78
Actionability: 15
close stale fix(init): use parent_template_dir inside its importlib.resources.path context before cleanup. Changes requested (2 reviewers, 8 unresolved comments), all 7 test CI jobs failing, no author activity for 11 months; bug still present upstream.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 4
Complexity: 30
Confidence: 64
Actionability: 20
close stale fix(init): make parent_template_dir leave the importlib.resources context before use; dormant external PR with changes_requested (2 reviewers, 8 unresolved comments) and all test suites failing.
qwen/qwen3.6-35b-a3b
Impact: 50
Quick Win: 11
Complexity: 25
Confidence: 55
Actionability: 30
close stale Fixes parent_template_dir context manager usage in init command; has 8 unresolved review comments and failing tests after 321 days of inactivity
qwen/qwen3.8-27b
Impact: 45
Quick Win: 29
Staleness: 78
Complexity: 35
Confidence: 72
close stale Fix init command to keep parent template dir context active during use; changes requested by 2 reviewers with 8 unresolved comments, no author response in ~10 months, CI failing on test jobs.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 20
Confidence: 75
close stale Addresses directory context manager exit in init template. Currently has 8 unresolved review comments, failing CI tests, and no activity for 261 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
close stale Fixes improper exit from parent template directory context. PR is inactive for over 8 months, lacks maintainer feedback, and author hasn't run required lint/tests.

Update history

No update history recorded yet.

Related work

  • Related To: craft-application#1137 (confidence 80%)

    b79989ab 'feat: add --base option to the init command' rewrote craft_application/commands/init.py and tests/unit/commands/test_init.py — both files this PR patches — creating conflicts.

  • Related To: craft-application#1149 (confidence 78%)

    9c74d1fd 'feat(init): git init features' is the most recent commit touching init.py and tests/unit/commands/test_init.py, diverging further from this PR's base.

  • Related To: craft-application#797 (confidence 60%)

    5a49fd57 added TC001-TC005 typing-import lint rules shortly after this PR opened, likely contributing to its lint/test churn.

Related issues

No related issues found above the similarity threshold.