Platform names should not be allowed to contain `/` characters
Metadata
Current evaluation
Closed without a direct fix. The platform name slash character bug causing packing failures was tracked externally via Jira ticket CRAFT-4876. No pull requests or code changes were merged to resolve the issue.
Suggested action: —
No scores available.
Issue body
### Bug Description
Currently we allow `/` characters in platform names, but then packing the file fails. We should just ban them.
### To Reproduce
Pack the file below with testcraft
### part yaml
```shell
name: testerton
version: "0.1"
base: ubuntu@25.10
platforms:
"a/b/c":
build-on: [amd64, arm64, ppc64el, s390x, riscv64]
build-for: [all]
parts:
my-test:
plugin: nil
```
### Relevant log output
```shell
2025-10-15 14:52:47.973 Updating project model with {'version': '0.1'}.
2025-10-15 14:52:47.974 Packing...
2025-10-15 14:52:47.983 testcraft internal error: FileNotFoundError(2, 'No such file or directory')
2025-10-15 14:52:47.984 Traceback (most recent call last):
2025-10-15 14:52:47.984 File "/home/lengau/Work/Code/craft-application/craft_application/application.py", line 669, in run
2025-10-15 14:52:47.985 return_code = self._run_inner()
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/Work/Code/craft-application/craft_application/application.py", line 646, in _run_inner
2025-10-15 14:52:47.985 return_code = dispatcher.run() or os.EX_OK
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/Work/Code/craft-application/.venv/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run
2025-10-15 14:52:47.985 return self._loaded_command.run(self._parsed_command_args)
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/Work/Code/craft-application/craft_application/commands/base.py", line 222, in run
2025-10-15 14:52:47.985 result = self._run(parsed_args, **kwargs) or result
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/Work/Code/craft-application/craft_application/commands/lifecycle.py", line 620, in _run
2025-10-15 14:52:47.985 return self._run_real(parsed_args=parsed_args, step_name=step_name)
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/Work/Code/craft-application/craft_application/commands/lifecycle.py", line 460, in _run_real
2025-10-15 14:52:47.985 packages = self._services.package.pack(
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/Work/Code/craft-application/testcraft/services/package.py", line 46, in pack
2025-10-15 14:52:47.985 with tarfile.open(dest / tarball_name, mode="w:xz") as tar:
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/.local/share/uv/python/cpython-3.12.11-linux-x86_64-gnu/lib/python3.12/tarfile.py", line 1872, in open
2025-10-15 14:52:47.985 return func(name, filemode, fileobj, **kwargs)
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/.local/share/uv/python/cpython-3.12.11-linux-x86_64-gnu/lib/python3.12/tarfile.py", line 1980, in xzopen
2025-10-15 14:52:47.985 fileobj = LZMAFile(fileobj or name, mode, preset=preset)
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.985 File "/home/lengau/.local/share/uv/python/cpython-3.12.11-linux-x86_64-gnu/lib/python3.12/lzma.py", line 120, in __init__
2025-10-15 14:52:47.985 self._fp = builtins.open(filename, mode)
2025-10-15 14:52:47.985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-15 14:52:47.986 FileNotFoundError: [Errno 2] No such file or directory: 'testerton-0.1-a/b/c.testcraft'
2025-10-15 14:52:47.986 Full execution log: '/home/lengau/.local/state/testcraft/log/testcraft-20251015-145247.799819.log'
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without a direct fix. The platform name slash character bug causing packing failures was tracked externally via Jira ticket CRAFT-4876. No pull requests or code changes were merged to resolve the issue. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by adding validation to ban forward slashes in platform names, preventing the FileNotFoundError during packing. The bug was triaged and closed after the maintainer reported the issue. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a visible fix or merge. The issue was tracked externally via Jira ticket CRAFT-4876 to address packing failures caused by slash characters in platform names. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and triaged. Synced to Jira ticket CRAFT-4876 for tracking. No explicit fix, merge, or resolution details are documented in the provided context. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #705 Pack command errors ugly | craft-application | closed | Closed without a fix. Deferred to internal Jira ticket CRAFT-4420. The unhandled RuntimeError for invalid platform builds remains unresolved. |