chore(miner): scaffold calibration module types (#2332)#3704
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-06 06:48:11 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
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.
|
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Add shared PredictedVerdictRecord, ObservedOutcomeRecord, CalibrationRow, and CalibrationReport shapes under packages/gittensory-miner/lib/calibration with runtime validators and unit tests. No calibration logic yet. Co-authored-by: Cursor <cursoragent@cursor.com>
65f6290 to
30c5b79
Compare
…ouched test/unit/check-miner-package.test.ts and test/unit/miner-calibration-types.test.ts are self-contained w.r.t. root src/** (same trust boundary as the existing mcpCliHarness filter), yet ran unconditionally on every PR that touched ANY backend path -- virtually all of them, since test/** alone qualifies. Every such PR paid for a real npm pack --dry-run of packages/gittensory-miner, and a miner-only breakage (#3704's nested lib/calibration/ directory) blocked every subsequent unrelated PR's CI instead of staying contained to PRs that actually touch the package. Add a minerTestHarness paths-filter output and a SKIP_MINER_TEST_HARNESS exclude branch in the "Test with coverage" step, mirroring the existing SKIP_MCP_CLI_HARNESS pattern exactly. Push events are unaffected -- the full suite always runs on main to keep the coverage baseline solid.
…3778) check-miner-package.mjs's file-list validation only ever matched flat lib/<name>.(js|d.ts) files. #3704 added lib/calibration/{index,types} as a one-level subdirectory, which both the ALLOWED regex and the "missing lib/*.js artifacts" check missed -- breaking main's validate-code check for every subsequent PR regardless of its own changes. Closes #3777
…ouched (#3775) test/unit/check-miner-package.test.ts and test/unit/miner-calibration-types.test.ts are self-contained w.r.t. root src/** (same trust boundary as the existing mcpCliHarness filter), yet ran unconditionally on every PR that touched ANY backend path -- virtually all of them, since test/** alone qualifies. Every such PR paid for a real npm pack --dry-run of packages/gittensory-miner, and a miner-only breakage (#3704's nested lib/calibration/ directory) blocked every subsequent unrelated PR's CI instead of staying contained to PRs that actually touch the package. Add a minerTestHarness paths-filter output and a SKIP_MINER_TEST_HARNESS exclude branch in the "Test with coverage" step, mirroring the existing SKIP_MCP_CLI_HARNESS pattern exactly. Push events are unaffected -- the full suite always runs on main to keep the coverage baseline solid.
#3778 widened scripts/check-miner-package.mjs's ALLOWED regex to accept one level of subdirectory under lib/, to accommodate the calibration module's nested lib/calibration/{index,types}.{js,d.ts} layout from #3704. #3772 (merged minutes earlier, independently fixing the same main-red CI break) took the opposite approach: it flattened that module to lib/calibration.js + lib/calibration-types.js instead, matching every other module in the package. With the nested directory gone, #3778's widening is dead weight -- it permanently weakens a security-relevant pack-safety allowlist (the only guard against an arbitrary nested file sneaking into the published npm package) for zero remaining benefit. Restore the strict flat-only pattern and turn the now-obsolete "accepts a subdirectory" test into a rejection test, so a future nested lib/ file is caught here instead of requiring another regex widening.
Summary
packages/gittensory-miner/lib/calibration/with sharedPredictedVerdictRecord,ObservedOutcomeRecord,CalibrationRow, andCalibrationReportshapes (field names mirrorGateEvalRow/GateEvalReportinsrc/review/parity.ts).buildscript.test/unit/miner-calibration-types.test.tswith minimal fixtures so the directory lands with coverage.Closes #2332
Test plan
npm test -- test/unit/miner-calibration-types.test.tsnpm run build --workspace @jsonbored/gittensory-minerMade with Cursor