Type-check attributes values with a semconv name #174
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 274 lines diff across 3 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.336
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #174"
general
weight: 0.35
inge4pres
Follow-up to #84 and #173, now merged: now that semconv definitions have a flat shape and
declare the type of their value,
fromPairscan check values against it.What changes
fromPairsrejects a value of the wrong type for its key, at compile time.A semantic convention definition declares its value type through
examples: ?[]const V(
StringAttribute,IntAttribute,DoubleAttribute,BooleanAttribute, and the enumattributes), which is where the check reads it from. The SDK still does not import semconv: the
matching stays structural, as in #84.
semconv enums of numbers (cpython.gc.generation, rpc.grpc.status_code).
AttributeValue cannot hold an array yet.
builders.zig follows the flat enum attributes of #173: the key is read from name only
(no more base.name), and the enum of well-known values from the well_known_values
declaration, which is void for definitions that have none.
Notes
the type its key declares keeps working; code that passed a wrong one (a string port, say) no
longer builds, which is the point.
(types.AttributeWithValues(i64,void)). Naming the key would need the definition's value to
be known at the call site, which it is not for a type-level check.
failing cases. They can be covered with std.Build.Step.Compile.expect_errors in a follow-up
if wanted.