Add runtime-aware fitness scoring to metrics collector#47
Conversation
Code Review: Add runtime-aware fitness scoring to metrics collector❌ Blockers — must resolve before merge1. Out-of-scope files inflate the diff by ~27,000 lines The PR body itself flagged this risk but the branch was not cleaned. The diff contains content completely unrelated to runtime scoring:
Do not merge until these are removed. Cherry-pick the collector commits onto a clean branch from 2. It appears three times in the diff, which means it is not currently excluded. Add it to 🟠 Should-fix3. Re-export indirection should be removed ( // collectMetrics.ts — this re-export exists only to satisfy the test file
export { classifyRuntimeMetrics, computeRuntimeFitness, parseSloThresholds } from "./runtimeScoring";The test file imports from 4. Hardcoded personal machine path in documentation ( # This is a personal machine path — will not work for any other contributor
cd /Users/oleksii_makieiev/Documents/startups/Lined/fitness-metrics-collectorReplace with a repo-relative path: cd fitness-metrics-collector🟡 Nice-to-have5. Document the evidence-source/readiness In This is intentional per the docs, but it is non-obvious from the code alone. A short inline comment on the 6. Guard Making 7. Missing test coverage for two throw paths
OverallThe runtime scoring logic itself ( |
|



Purpose
Implement
experiment/runtime-aware-scoringas an additive, versioned runtime score in the fitness metrics collector while preserving the existing structuralfitnessScore.Type
Changes
runtimeFitnessScore,runtimeFitnessScoreVersion, andruntimeFitnessmetadata to the collector output.fitnessScoreas the historical structural CI score; runtime evidence is not mixed into it.RUNTIME_METRICS_JSONandRUNTIME_BASELINE_METRICS_JSON.slo-thresholds-v1.json.METRICS_OUTPUT_JSON.experiment/runtime-aware-scoringas implemented.Files changed
fitness-metrics-collector/scripts/collectMetrics.tsfitness-metrics-collector/scripts/runtimeScoring.tsfitness-metrics-collector/scripts/collectMetrics.test.tsdocs/runtime-aware-scoring.mddocs/README.mddocs/experiment-tasks.mdexperiment/runtime-aware-scoringas implementedExpected result
Runtime score is emitted separately from the structural CI score. Existing structural metrics should remain neutral unless CI reports change due to unrelated noise.
Additional runtime output:
runtimeFitnessScorenumberwhen current and baseline runtime summaries are comparable, otherwisenullruntimeFitnessScoreVersionruntime-aware-v1runtimeFitness.eligibleForStableComparisonfalsewhen hard SLO evidence is invalid or unknownVerification
npm testpasses locally fromfitness-metrics-collector/npm run buildpasses locally fromfitness-metrics-collector/git diff --checkpassesMETRICS_OUTPUT_JSON./gradlew checkpasses locally./gradlew jacocoTestReportpasses locallyReview note
The runtime-aware scoring changes are intended to be the PR scope. Before opening or merging, confirm the branch does not include unrelated web/mobile scaffold, IDE, or
.DS_Storefiles.