Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Casework: description validation accepts two request entities sharing one requestRoute

Open Beginner friendly
#1,383 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend

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_entity in validate_description, and return SourceAdapterError::Invalid on 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from registrystack/registry-stack

All issues in registrystack/registry-stack

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.