fix(project): Use an annotated type for duration strings
Metadata
Current evaluation
Merged #5213, adding an annotated DurationString type and stricter duration regex for project model fields; landed as commit b71e72ac4.
Resolution: closed resolved
Reason: PR #5213 was merged as commit b71e72ac4. It defines DurationString with validation and applies the stricter TIME_DURATION_REGEX to project timeout and restart fields.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Inspired by: https://github.com/canonical/snapcraft/pull/5210
This makes an annotated type for duration strings and uses a stricter regex.
- [ ] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `tox run -m lint`?
- [ ] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`)
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #5213, adding an annotated DurationString type and stricter duration regex for project model fields; landed as commit b71e72ac4. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged stricter duration-string validation into Charmcraft using an annotated type and a tightened regex; merge conflicts were resolved in commit 1f47e37. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#5213, adding an annotated duration-string type and stricter regex; it superseded the unmerged approach in #5210 for GHSL-2024-323. | |
| qwen/qwen3.6-35b-a3b |
Impact:
35
Quick Win:
16
Complexity:
25
Confidence:
75
Actionability:
60
|
needs review | Adds an annotated type for duration strings with stricter regex, inspired by snapcraft#5210 (ReDoS fix). Approved by 1 reviewer with 4 unresolved comments; CI passing. | |
| qwen/qwen3.6-35b-a3b |
Impact:
35
Quick Win:
26
Staleness:
75
Complexity:
25
Confidence:
65
|
needs review | PR introduces an annotated type for duration strings with stricter regex validation, inspired by snapcraft PR #5210 (ReDoS fix). Has 1 approval but 4 unresolved review comments and has been open for 596 days. | |
| qwen/qwen3.8-27b |
Impact:
55
Quick Win:
36
Staleness:
5
Complexity:
35
Confidence:
80
|
needs review | Adds an Annotated pydantic type for duration strings with a stricter regex in the project model, superseding ReDoS fix PR #5210 (GHSL-2024-323). Approved by one reviewer, CI green, 4 unresolved review comments; author requested a second review. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
85
Complexity:
15
Confidence:
80
|
close stale | Adds an annotated type for duration strings with a stricter regex. Approved by one reviewer but has two unresolved comments and has been inactive for ~10 months. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
65
Complexity:
20
Confidence:
80
|
keep open | Adds an annotated type with stricter regex for duration strings. Currently in draft state, awaiting CI verification and maintainer review. |
Update history
| Date | Change |
|---|---|
| merged | |
| updated | |
| updated | |
| updated | |
| updated |
Related work
-
Related To:
canonical/snapcraft#5210
(confidence 96%)
The earlier ReDoS fix was closed unmerged after its author deferred to #5213, which incorporated the stricter validation.
Related issues
No related issues found above the similarity threshold.