Problem
Protected main c85d710804139c0697d7ef8fa47d02b1389e6d84 reads retained KPI NDJSON in scripts/check-kpi.mjs through non-fatal UTF-8 decoding. Byte-invalid /exchange records can therefore be replacement-normalized before failure-rate, latency and required-window semantics.
This is separate from #122/#123 (kpi:compute) and #104/#105 (strict provenance/snapshot orchestration): exact-byte authentication does not make lossy semantic decoding safe.
RCA
- First failing boundary: retained/snapshotted KPI bytes -> threshold-check JSON semantics.
- Immediate cause: ordinary UTF-8 decoding replaces malformed byte sequences.
- Root cause: threshold checking lacked an explicit valid-byte/text boundary before metric and window evaluation.
- Systemic risk: corrupted evidence can normalize into a different JSON record and influence PASS/FAIL.
Active test-first repair
PR #127 (fix(kpi): reject malformed threshold input bytes) is the current direct-main repair.
- protected/live base:
c85d710804139c0697d7ef8fa47d02b1389e6d84;
- RED head:
85a9ce68f346a4281b539bcc45df607a6e4ea66d;
- current exact GREEN head:
85463e4e18750af27aac8ea35ee1680e7b360661;
- current compare: 2 commits ahead / 0 behind live
main, merge base exactly the protected head;
- PR state: Ready, mergeable, direct
main.
GREEN reads exact bytes and applies fatal TextDecoder decoding before line, JSON or required-window semantics. Existing thresholds, route/latency behavior and non-JSON filtering remain unchanged.
Exact current proof
For unchanged #127 head 85463e4e18750af27aac8ea35ee1680e7b360661:
- application
ci 31443518948: terminal success;
reviewer-ci 31443518901: terminal success;
- eligible central
Security Scan 31443518918: terminal success;
- formal reviews: 0;
- inline review threads: 0;
- CodeRabbit was rate-limited on this exact base/head and is non-passing/non-approval evidence.
Acceptance
Repository-owned implementation on #127 current exact head
Remaining protected integration / operation
Related: #3, #27, #29, #104, #105, #122, #123, #127
Problem
Protected
mainc85d710804139c0697d7ef8fa47d02b1389e6d84reads retained KPI NDJSON inscripts/check-kpi.mjsthrough non-fatal UTF-8 decoding. Byte-invalid/exchangerecords can therefore be replacement-normalized before failure-rate, latency and required-window semantics.This is separate from #122/#123 (
kpi:compute) and #104/#105 (strict provenance/snapshot orchestration): exact-byte authentication does not make lossy semantic decoding safe.RCA
Active test-first repair
PR #127 (
fix(kpi): reject malformed threshold input bytes) is the current direct-mainrepair.c85d710804139c0697d7ef8fa47d02b1389e6d84;85a9ce68f346a4281b539bcc45df607a6e4ea66d;85463e4e18750af27aac8ea35ee1680e7b360661;main, merge base exactly the protected head;main.GREEN reads exact bytes and applies fatal
TextDecoderdecoding before line, JSON or required-window semantics. Existing thresholds, route/latency behavior and non-JSON filtering remain unchanged.Exact current proof
For unchanged #127 head
85463e4e18750af27aac8ea35ee1680e7b360661:ci31443518948: terminal success;reviewer-ci31443518901: terminal success;Security Scan31443518918: terminal success;Acceptance
Repository-owned implementation on #127 current exact head
/exchangerecord fail before metric output.Remaining protected integration / operation
mainafter integration.Related: #3, #27, #29, #104, #105, #122, #123, #127