registrystack / registrystack/registry-stack

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

Abierto
#930 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:breg area:evidence criticality:p3 enhancement rust triage:needs-implementation
Lenguaje dominante
Rust
Estrellas
2
Forks
0
Merge medio
2 h 55 min
PR fusionados (30 d)
130

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con crates/registry-breg/Cargo.toml en las líneas 227-228 y lib.rs; después inspecciona compiler.rs:174 y los módulos action_evidence mencionados. Ejecuta primero cargo check -p registry-breg con las features predeterminadas; se considera terminado cuando las compilaciones predeterminadas omiten ambos crates Evidence, runtime y bregctl/breg permanecen sin cambios, y una prueba verifica el diagnóstico de rechazo para las capacidades Evidence sin la feature.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
backend, build-system
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bien especificado
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.