Repository navigation
Conversation
Pull request dashboard statusWaiting on the author · refreshed 2026-12-06 05:49 UTC Respond to 2 review items (e.g. link a commit, explain why not, ask a follow-up): Status above doesn't look right?
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1975 +/- ##
=====================================
Coverage 88.1% 88.1%
=====================================
Files 169 169
Lines 19574 19574
=====================================
Hits 17263 17263
Misses 2311 2311 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The README’s rule example uses id instead of resolved attributes’ name, preventing it from reporting removed attributes.
1 open issue
What changed in this PR
Documents Weaver’s Rego policy inputs and context, and adds live-check advice input schemas to support policy authors.
Changes:
- Documents v1 and v2 policy stages and corrects stale examples.
- Adds schema-generation commands and a committed v2 schema checked in CI.
- Separates v2 matched signal types while preserving serialized policy input.
| File | Description |
|---|---|
src/registry/json_schema.rs |
Adds advice input schema commands. |
schemas/live-check.advice-input.v2.json |
Defines the v2 advice input schema. |
docs/usage.md |
Documents new schema options. |
crates/weaver_live_check/src/sample_span.rs |
Updates matched span handling. |
crates/weaver_live_check/src/sample_metric.rs |
Updates matched metric handling. |
crates/weaver_live_check/src/sample_log.rs |
Updates matched event handling. |
crates/weaver_live_check/src/matcher.rs |
Adapts matching and tests to v2 types. |
crates/weaver_live_check/src/live_checker.rs |
Updates signal construction and lookup. |
crates/weaver_live_check/src/lib.rs |
Introduces schema-capable matched signal types. |
crates/weaver_live_check/src/advice/type_advisor.rs |
Adapts advice checks to v2 types. |
crates/weaver_live_check/src/advice/rego_advisor.rs |
Adds input schema generation and key tests. |
crates/weaver_live_check/src/advice/mod.rs |
Exports advice input schema types. |
crates/weaver_live_check/README.md |
Explains advice input and policy data. |
crates/weaver_checker/README.md |
Documents policy stages and relocates comparison example. |
CONTRIBUTING.md |
Adds schema regeneration instructions. |
CHANGELOG.md |
Records schemas and documentation updates. |
.github/workflows/ci.yml |
Checks committed schema consistency. |
Review effort: Balanced
050950e to
331c0df
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The README misstates policy input formats before resolution and for pre-resolved v2 registries, which could lead readers to write policies against incorrect fields and silently miss findings.
2 open issues
Review effort: Balanced
| verification of policies against semantic conventions and telemetry schemas. | ||
| | Package | Properties | | ||
| |---------|------------| | ||
| | `before_resolution` | `input`: unresolved [semconv files](/schemas/semconv-syntax.md) | |
| receive the v2 materialized registry. Without it, policies get the v1 resolved | ||
| registry, even for `definition/2` files. |

Fixes #694
inputanddataof each policy stage, and replace the stale examples with a working v2 example and links to shared policies.weaver registry json-schema -j live-check-advice-input-v2).Follow-ups: #1972, #1973, #1974.