registrystack / registrystack/registry-stack

Feature-gate the Evidence relying-party dependency in registry-breg

Offen
#930 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:breg area:evidence criticality:p3 enhancement rust triage:needs-implementation
Vorherrschende Sprache
Rust
Sterne
2
Forks
0
Ø Merge
2 Std. 55 Min.
Gemergte PRs (30 T.)
130

Beschreibung

Found in the 0.28.0 pre-release review (2026-09-08). Line references are as of main after #926.

`registry-evidence-client` and `registry-evidence-verifier` are the only two dependencies in `crates/registry-breg/Cargo.toml` (lines 227-228) without `optional = true`, so a `default = []` library build still links reqwest and tokio through the client. The always-compiled contract path imports their types: `action_evidence_contracts.rs` and `action_evidence_validation.rs` are ungated `pub mod` in `lib.rs`, and `compiler.rs:174` calls `compile_evidence` on every project compile.

Decision recorded in `products/breg/DECISIONS.md`: 0.28.0 ships the dependency unconditional; the gate is deferred to this ticket.

Proposed change:
- Make both dependencies optional behind an `evidence` feature that `runtime` enables.
- Gate the Evidence-typed contract compile behind the same feature, with a compile-time refusal (clear diagnostic) when a project declares evidence capabilities and the build lacks the feature.
- Collapse `action_evidence.rs`, `action_evidence_client.rs`, `action_evidence_config.rs`, `action_evidence_maintenance.rs` into one `action_evidence/` module tree so the feature has one gate.

Acceptance: `cargo check -p registry-breg` with default features links neither Evidence crate; `bregctl` and `breg` behave unchanged; a test proves the refusal diagnostic.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit crates/registry-breg/Cargo.toml in den Zeilen 227-228 und lib.rs und untersuche anschließend compiler.rs:174 sowie die genannten action_evidence-Module. Führe zuerst cargo check -p registry-breg mit den Standard-Features aus; abgeschlossen ist die Aufgabe, wenn Standard-Builds beide Evidence-Crates auslassen, Runtime und bregctl/breg unverändert bleiben und ein Test die Verweigerungsdiagnose für Evidence-Fähigkeiten ohne das Feature überprüft.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend, build-system
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.