feat(organize): support build pseudo-partition source
Metadata
Current evaluation
Merged PR adding (build) as a source-only pseudo-partition for organize. Enables copying build artifacts to install partitions without moving originals. Approved by two reviewers, passed tests, and merged.
Suggested action: —
No scores available.
Issue body
## Summary
Add support for using `(build)` as an `organize` source pseudo-partition.
This allows files generated in the part build directory to be copied into install partitions during build organization, without moving/removing the original build artifacts.
The change keeps `(build)` source-only:
- `(build)` is accepted as an `organize` source
- `(build)` is rejected as an `organize` destination
- `build` is reserved and cannot be used as a real partition name
- `part_install_dirs` is not globally polluted with `build`; the build directory is only injected into the organize call path
## Tests
- `git diff --check`
- `uv run --group lint --group types ruff check ...`
- `uv run --group lint --group types ruff format --check ...`
- `uv run --group dev python -m pytest -q tests/integration/features/partitions/lifecycle/test_lifecycle.py::test_organize_from_build_with_partitions -rs`
- `uv run --group dev python -m pytest -q tests/unit/executor/test_organize.py tests/unit/features/partitions/executor/test_organize.py tests/unit/features/overlay_partitions/test_executor_organize.py tests/unit/executor/test_part_handler.py tests/unit/features/partitions/executor/test_part_handler.py tests/unit/features/partitions/test_parts.py tests/unit/features/overlay_partitions/test_parts.py tests/unit/test_infos.py tests/unit/utils/test_partition_utils.py -rs`
Final targeted result: `1107 passed, 1 xfailed`.
---
CRAFT-5181
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged PR adding (build) as a source-only pseudo-partition for organize. Enables copying build artifacts to install partitions without moving originals. Approved by two reviewers, passed tests, and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds build as a source-only pseudo-partition for organize, enabling file copying from build to install partitions without moving artifacts. Refactored path resolution, reserved the build name, and added tests. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1535 feat: organize files from build | craft-parts | merged | Merged following reviewer approval, adding support for organizing files from a part's build directory via the (build) pseudo-partition and improving trailing slash destination handling. Resolves #1521. | |
| #1592 Refactor and integrate organize from build | craft-parts | closed | Implemented in PR #1598 (commit cc02958b). The organize_files function now accepts build as a source partition, copying files to destinations instead of moving them. This resolves the regression and removes the need for a separate Craft Parts branch. | |
| #1254 feat: allow parts to organize to overlay | craft-parts | merged | Merged. Introduces an overlay target for file organization, moving part build files to the mounted overlay stack. Approved by three reviewers and passed all CI checks. Documentation will be added later when the base creation feature is complete. |