Casework: description validation accepts two request entities sharing one requestRoute
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
The issue is in crates/registry-casework-breg/src/config.rs, specifically the validate_description function. Start by examining the existing duplicate-entity test to understand the validation pattern. Modify the function to track requestRoute in addition to requestEntity, and add a new unit test for duplicate routes. Run the existing tests to ensure the fix works.
Written by the indexing model from the issue text.
Description
Problem
validate_description in crates/registry-casework-breg/src/config.rs refuses a v1alpha2 source description that lists the same requestEntity twice, but it never compares requestRoute across entries. A description that gives two different request entities the same route therefore passes caseworkctl check, caseworkctl package, and runtime input validation (validate_description_input).
BregAdapter::new requires routes to be unique, so the same project is refused only when the runtime constructs the source adapter. An offline-approved package is undeployable.
caseworkctl source add does not produce this shape, since it copies each route from bregctl explain change-requests. It is reachable through a hand-edited or otherwise supplied description.
Expected
The description decoder refuses a repeated requestRoute in the same place it refuses a repeated requestEntity, so the offline checks and adapter construction agree.
Fix sketch
- Track the routes seen while building
by_entityinvalidate_description, and returnSourceAdapterError::Invalidon a repeat. - Add a unit test beside the existing duplicate-entity description test: two entries with distinct entities and one shared route are refused.
Found in review of #1355, after the related policy-level entity uniqueness check landed there.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- Avg merge
- 4h 26m
- Merged PRs (30d)
- 152
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from registrystack/registry-stack
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
area:breg enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
registrystack/registry-stack#1380 ·
-
area:breg enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1379 ·
-
area:casework documentation
Difficulty 1/5 Under an hour Newbie friendliness 90/100
registrystack/registry-stack#1369 ·
-
area:casework bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1368 ·
All issues in registrystack/registry-stack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
todo:ticket
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
taikoxyz/taiko-mono#22168 · 1 comment ·