← Back to issue list

fix(organize): handle direct self-nesting as error

View original Github issue

Metadata

Project
craft-parts
Number
#1769
Type
pull request
State
open
Author
cmatsuoka
Labels
—
Created
Updated
Closed
—

Current evaluation

⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.

Fixes self-nesting in organize by raising FileOrganizeError instead of silently deleting subtrees. PR has changes_requested status with 3 unresolved review comments and some failing CI tests.

Suggested action: needs review

Reason: The PR has 'changes_requested' status with 3 unresolved review comments, indicating it is under active review and awaiting the author's response. CI has some failing slow tests (OSV-scanner, test-other-plugins, test-python-plugins) that may need investigation. The fix addresses issue #1460 where self-nesting in organize caused broken builds.

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 11 Complexity: 45 Confidence: 75 Actionability: 35

Issue body

Using `organize` with self-nesting (`app: app/app`) currently deletes a subtree and results in a broken build. Emit `FileOrganizeError` in this case, while still allowing glob nesting as merge to keep compatibility behavior. Fixes #1460 Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> --- CRAFT-5309 - [ ] I've followed the [contribution guidelines](https://github.com/canonical/craft-parts/blob/main/CONTRIBUTING.md). - [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [ ] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b
Impact: 55
Quick Win: 11
Complexity: 45
Confidence: 75
Actionability: 35
needs review Fixes self-nesting in organize by raising FileOrganizeError instead of silently deleting subtrees. PR has changes_requested status with 3 unresolved review comments and some failing CI tests.

Update history

Date Change
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
created

Related work

  • Related To: craft-parts#1460 (confidence 90%)

    This PR fixes issue #1460 which describes the self-nesting bug where organize with {app: app/app} fails and breaks builds.

Related issues

Issue Project State Summary Similarity
#1544 fix: prevent organizing a directory into itself craft-parts closed PR #1544 was closed unmerged as incomplete; the solution was replaced by the organize-from-build rework in #1598 (commit cc02958b).
72%