feat(metadata): dispatch metadata.fetch to one named source #281
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 359 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.352
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #281"
general
weight: 0.35
guicassolato
Problem and behavior
Policy evaluation needs to acquire facts from one configured metadata source while preserving the executor's capability filtering and error handling.
This PR adds the typed, unphased
metadata.fetchhook. The caller resolves the source withfind_plugin_entries(name), selects itsmetadata.fetchhandler, and invokes it withinvoke_entries::<MetadataFetchHook>(). Generic engine entry points retain ordinary routing and condition filtering.Closes #240.
Changes
MetadataFetchHook,MetadataFetchRequest, andMetadataFetchResult, including the built-in hook metadata/catalog entry.MetadataFetchRequest::new()takes no instance name.invoke_entriesprimitive allows an empty entry list.APL
fetch(name)scheduling is implemented separately in #287. HTTP source implementation and changes to theAcquiredFactsrecord remain outside this PR.Validation
make lint— formatting and all supported Clippy passes.make test— default and all-feature workspace tests, including integration, resilience, security, and doctests. Live-service tests retain their documented ignore gates.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added
metadata.fetchsupport for dispatching requests to a specifically selected metadata source.Sources can return acquired facts for framework validation and installation. Requests expose only capability-filtered metadata, and denied requests return no facts.
Missing sources and sources without a compatible handler are rejected before dispatch.
Documentation
Added guidance and a configuration example for setting up and selecting metadata sources.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->