sds: format specification v0 and golden test vectors #118
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.56)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 232 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 82% · 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.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #118"
general
weight: 0.35
justinsb
This pull request implements the normative v0 format specification for Structured Data Streams (SDS) along with golden test vectors and validation tests.
Changes
docs/sds-spec.md): Written with RFC 2119 normative language (MUST/SHOULD) and labelledv0 (draft; may change incompatibly). Covers framing and reserved type ID table,TypeDefinitionsemantics and canonical SHA-256 descriptor fingerprint algorithm, precise schema compatibility rules (compared withbuf breaking),OpRecordrow operations and canonical key encoding, raw application-typed records (keyless events), and the snapshot contract.docs/structured-data-streams.mdandsite/content/format.md): Updated design documentation and site pages to align with mergedOpRecord(type ID 5), CREATE/UPDATE/DELETE row semantics, and transaction rules, while keeping the design doc as architecture rationale and cross-linking to the normative specification.ValidateKeyBytesto check thatOpRecordkey bytes match declared primary key fields and contain no non-key or unknown fields, and ensured deterministic table row ordering by primary key.pkg/sds/testdata/vectors/): Added 12 golden test vectors covering basic CRUD, multi-row atomic transactions, schema evolution (adding fields, renaming fields, reserving deleted fields), raw application-typed records, framework frames (SnapshotPointer, Padding), and error cases (reserved type ID, use before define, incompatible schema redefinition, key mismatch, and uncommitted tail).pkg/sds/vectors_test.go): AddedTestGoldenVectorswith vector generators and validation against decoders and memtable projections, supporting regeneration via-regenerate.Fixes #106