Add regression coverage for base-files/usrmerge staging collisions
Metadata
Current evaluation
Adds regression integration test for base-files/usrmerge staging collisions (issue #1001). Fresh PR with no reviews, CI passing.
Suggested action: needs review
Reason: Brand new PR (0 days old) adding regression tests for issue #1001. No maintainer reviews yet. The test is minimal and focused, but needs maintainer assessment before merging, especially since it references 'Fixes #1001' while only adding tests rather than fixing the underlying bug.
Impact:
25
Quick Win:
21.25
Staleness:
0
Complexity:
15
Confidence:
70
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 |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b |
Impact:
25
Quick Win:
21.25
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 |
|---|---|
| created |
Related work
-
Related To:
craft-parts#1001
(confidence 95%)
PR explicitly references this issue as the regression target for the base-files/usrmerge collision bug
Related issues
No related issues found above the similarity threshold.