"name" validation is broken for names with 2 characters
Metadata
Current evaluation
Validation failure for two-character names was fixed and merged in pull request #957. The issue is now closed.
Suggested action: —
No scores available.
Issue body
### Bug Description
When packing a rock with a 2-characters name, Rockcraft will raise a project validation exception, claiming the `name` is invalid, but with the wrong reasons.
Relevant code:
https://github.com/canonical/rockcraft/blob/f5d1ebb189890519a37e3e1d3cce347cee5eee36/rockcraft/models/project.py#L50
### To Reproduce
Pack the rockcraft.yaml below.
### Environment
Tested with the `latest/edge` and `latest/stable` versions of Rockcraft
### rockcraft.yaml
```yaml
name: jq
# see https://documentation.ubuntu.com/rockcraft/en/latest/explanation/bases/
# for more information about bases and using 'bare' bases for chiselled rocks
base: ubuntu@24.04 # the base environment for this rock
version: '0.1' # just for humans. Semantic versioning is recommended
summary: Single-line elevator pitch for your amazing rock # 79 char long summary
description: |
This is my-rock-name's description. You have a paragraph or two to tell the
most important story about it. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the
container registries out there.
platforms: # the platforms this rock should be built on and run on
amd64:
parts:
my-part:
plugin: nil
```
### Relevant log output
```shell
Bad rockcraft.yaml content:
- invalid name for rock: Names can only use ASCII lowercase letters, numbers, and hyphens. They must start with a lowercase letter, may not end with a hyphen, and may not have two hyphens in a row. (in field 'name')
For more information, check out: https://documentation.ubuntu.com/rockcraft/en/latest/reference/rockcraft.yaml
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Validation failure for two-character names was fixed and merged in pull request #957. The issue is now closed. | |
| qwen/qwen3.8-27b |
Impact:
40
Quick Win:
32.0
Staleness:
35
Complexity:
20
Confidence:
80
Support Request:
0
|
close stale | Rockcraft rejected valid 2-character rock names (e.g. 'jq') with a misleading validation error. Maintainer triaged it as a bug; a later commit allowed single/two-char names and recent testing on current main (1.17.0+) shows 'jq' is now accepted, so the issue appears no longer reproducible. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
10
Confidence:
90
Support Request:
0
|
close stale | Validation for 2-character rock names incorrectly fails with a misleading error. The bug appears fixed in current main, as 2-character names are now accepted without errors. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
20
Complexity:
10
Confidence:
95
Support Request:
0
|
close stale | Validation error for 2-character rock names like jq is no longer reproducible on current main. Maintainer verified the fix and suggests closing unless someone can still reproduce. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
5
Confidence:
90
Support Request:
0
|
close stale | Validation incorrectly rejects 2-character names. Recent testing confirms the bug is no longer reproducible on current main, indicating it was fixed. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
10
Confidence:
90
Support Request:
0
|
close stale | Rockcraft incorrectly rejects 2-character project names with a misleading validation error. The bug is verified as fixed on current main. Unable to reproduce on recent versions. Issue is ready to close. |
Update history
| Date | Change |
|---|---|
| closed |
Related issues
No related issues found above the similarity threshold.