Validate retained review producer bindings at startup

Open
#1,221 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Start in crates/registry-casework/src/runtime.rs at serve_from_path and trace validate_retained_completion_destinations, then read producer_for_actor in crates/registry-casework/src/review.rs. Inspect how non-erased pending and retained review requests store producer identities. Done means startup reports the incompatible producer identity and refuses to start when it no longer resolves against the loaded package; otherwise startup continues normally.

Written by the indexing model from the issue text.

Description

area:casework bug rust

An automated review of #1189 flagged that Casework runtime startup does not validate review producer identity against retained requests. serve_from_path in crates/registry-casework/src/runtime.rs (around line 356) calls validate_retained_completion_destinations, which only checks that each retained casework_review_completion_outbox.destination_id is present in the configured completion destinations; it never checks whether the package's reviewProducers still match the producers recorded on pending or retained review requests. producer_for_actor in crates/registry-casework/src/review.rs resolves a producer only by exact (profile, issuer, subject) match against the currently loaded package, and stored requests are keyed by the original producer_id/producer_issuer/producer_subject.

Failure scenario: an operator updates the policy package to remove a review producer, or changes its id, issuer, or subject, while that producer still owns pending or retained review requests. Startup succeeds because only completion destinations are validated. After the update, the producer can no longer be resolved by producer_for_actor, so it can no longer create, poll, or cancel requests, or consume its result feed, for anything submitted under the old identity.

Suggested fix:

  • At startup, additionally validate that every producer identity referenced by non-erased review requests still resolves against the loaded package's reviewProducers.
  • Refuse to start with a named diagnostic identifying the incompatible producer when it does not.

Filed from the review of #1189; not merge-blocking.

Dominant language
Rust
Stars
2
Forks
0
Avg merge
3h 45m
Merged PRs (30d)
134

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.