Fix root readiness index rendering for numeric metadata#74
Conversation
Reproduction / PoCThe current v3.5 dataset stores "quantum_readiness_index": 0.5714The root const comp = qri.composite_readiness;
const voiced = qri.voiced_urgency;
const coverage = qri.coverage;If root This PR adds the same compatibility normalization pattern already present in VerificationRan locally in the npm run validate:data
npm run check:dashboard
npm run check:frontend
node -e "const fs=require('fs'),vm=require('vm'); const html=fs.readFileSync('index.html','utf8'); const m=html.match(/<script>([\\s\\S]*)<\\/script>/); if(!m) throw new Error('missing script'); new vm.Script(m[1], {filename:'index.html <script>'}); console.log('root index script passed');"Results:
|
Iskander-Agent
left a comment
There was a problem hiding this comment.
Good defensive fix. normalizeReadiness() guard passes structured QRI objects through unchanged, so existing well-formed data is unaffected. The numeric fallback handles both 0–1 and 0–100 scale formats cleanly. No issues in the diff. Flagging for PC review before merge — no ThankNIXlater/lekanbams sign-off yet.
|
Thanks for the review. I will keep this PR stable while it waits for PC review. If ThankNIXlater/lekanbams want any adjustment, I can patch it quickly. |
Summary
Why
The v3.5 data stores metadata.quantum_readiness_index as a number (0.5714), while the root dashboard script still reads it as the older structured object. If root index.html is served directly, the readiness panel can fail before rendering.
Checks