fix(engine): reject malformed historical replay calibration scores - #3466
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 5286f3b | Commit Preview URL Branch Preview URL |
Jul 05 2026, 08:18 AM |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 08:25:22 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
compositeScorecould propagateNaNinto the combined calibration accuracy and allow the autonomy-increase gate to fail open, violating the intended fail-closed behavior.Description
extractHistoricalReplayScoreto returnnullfor missing/non-finite values and to return anumber | nullso malformed scores are explicitly rejected instead of producingNaNviaroundScore.accuracyisnull, mark the replay as held (replayHarnessHold = true), record the hold reasoninvalid_replay_score, and add a rejected source entry so malformed replay signals cannot contribute tocontributingSources.NaN, andInfinitycompositeScoreinputs and asserts the replay source is rejected,autonomyIncreasePermittedremainsfalse, and theinvalid_replay_scorehold is recorded.Testing
npm --workspace @jsonbored/gittensory-engine run build, which completed successfully.node --test packages/gittensory-engine/test/phase7-calibration-loop.test.ts, and all tests in that file passed (new regression included).npm run test:coverage, but the unsharded full test suite did not complete due to unrelated timeouts/failures in other tests during this environment run; therefore full-coverage validation in this environment did not finish.Codex Task