test: add regression coverage for base-files/usrmerge staging collisions
Metadata
Current evaluation
Adds focused integration regression coverage for base-files-style bin/lib usrmerge symlinks staging alongside a usr-merged part. Relevant slow CI passes; maintainer review is pending.
Suggested action: needs review
Reason: The focused 53-line integration test passed the reported Ubuntu 24.04 x86-64 and arm slow-test suites, along with lint and policy checks, with no failures or review comments. Thirteen checks and maintainer approval remain pending, so it is ready for final review rather than immediate landing.
Evaluated by: mr-cal-bot
Impact:
35
Quick Win:
21
Complexity:
22
Confidence:
92
Actionability:
76
Issue body
Staging can fail when one part exposes top-level `bin`/`lib` as `usr`-merge symlinks (as `base-files` does) and another part produces files under those paths, which is the shape behind the npm plugin failure. This change adds focused regression coverage for that interaction using a minimal reproducer.
- **What this covers**
- Exercises the stage-time collision path where:
- one part provides `bin -> usr/bin` and `lib -> usr/lib`
- another part is `usr`-merged and installs content through `bin/` and `lib/`
- Verifies the combination stages successfully instead of reporting a directory/symlink conflict
- **Test shape**
- Adds an integration test in `tests/integration/executor/test_collisions.py`
- Uses two `nil` parts to keep the reproducer minimal and local to collision handling:
- a `base-files` stand-in that creates the symlinks
- an app part with `build-attributes: [enable-usrmerge]` that writes files under `bin/` and `lib/`
- **Assertions**
- Confirms the staged tree preserves:
- `bin -> usr/bin`
- `lib -> usr/lib`
- Confirms the app payload ends up under:
- `usr/bin/www`
- `usr/lib/app.js`
```yaml
parts:
base-files-part:
plugin: nil
override-build: |
mkdir -p "${CRAFT_PART_INSTALL}/usr/bin" "${CRAFT_PART_INSTALL}/usr/lib"
ln -s usr/bin "${CRAFT_PART_INSTALL}/bin"
ln -s usr/lib "${CRAFT_PART_INSTALL}/lib"
app-part:
plugin: nil
build-attributes: [enable-usrmerge]
override-build: |
mkdir -p "${CRAFT_PART_INSTALL}/bin" "${CRAFT_PART_INSTALL}/lib"
touch "${CRAFT_PART_INSTALL}/bin/www"
touch "${CRAFT_PART_INSTALL}/lib/app.js"
```
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes #1001
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
35
Quick Win:
21
Complexity:
22
Confidence:
92
Actionability:
76
|
needs review | Adds focused integration regression coverage for base-files-style bin/lib usrmerge symlinks staging alongside a usr-merged part. Relevant slow CI passes; maintainer review is pending. | |
| stealth/space-bunny-alpha |
Impact:
20
Quick Win:
13
Complexity:
12
Confidence:
90
Actionability:
76
|
needs review | Adds a focused integration regression test for staging base-files-style bin/lib symlinks with usr-merged content; awaiting review, with current CI green but many jobs pending. | |
| stealth/space-bunny-alpha |
Impact:
30
Quick Win:
12
Complexity:
20
Confidence:
84
Actionability:
50
|
needs review | Adds a 53-line integration regression test for base-files-style bin/lib symlink collisions with usrmerge payloads. Open and unreviewed; title and lint checks fail, and many tests are pending. Test-only, with no staging-logic changes. | |
| qwen/qwen3.6-35b-a3b |
Impact:
25
Quick Win:
21
Staleness:
0
Complexity:
15
Confidence:
70
|
needs review | Adds regression integration test for base-files/usrmerge staging collisions (issue #1001). Fresh PR with no reviews, CI passing. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| created |
Related work
-
Related To:
canonical/craft-parts#1001
(confidence 99%)
The PR explicitly references this still-open issue and reproduces its npm/base-files staging-collision scenario, but changes only test coverage.
Related issues
No related issues found above the similarity threshold.