fix: restore executable and trustworthy CI quality gates - #102
fix: restore executable and trustworthy CI quality gates#102akinolavictor419-sketch wants to merge 1 commit into
Conversation
- add missing test:mutation (stryker run) and sync:check npm scripts so workflow-referenced and documented gates actually exist - make format:check authoritative in CI instead of 'format:check || format', which silently rewrote the checkout - run the bundle-size gate in the main CI job, matching what the README documents - raise the full-barrel bundle budget to 16 KB with justification (14.99 KB measured; the barrel now includes batch + provenance decorators) - document the 7 undocumented BatchRiskOracle symbols so docs:check passes without warnings - give Stryker a dedicated vitest config: its runner forces the threads pool, which cannot inherit the main config's --expose-gc execArgv (worker_threads is unreliable with V8 flags), so the mutation gate now runs on every platform - use npm run sync:check in the cross-repo workflow - refresh README size table, CI summary, and scripts tree to match Closes Gryd-lock#94
|
Please update the exported RiskOracle stand‑in in the grydlock-extension repo so its public getScore signature exactly matches the canonical interface in grydlock-oracle-adapter: getScore(destination: string): Promise This fixes the cross-repo drift reported by workflow job 95642622872 (drift-report.md). What to change File: the adapter stand-in file in grydlock-extension that currently exports/declares RiskOracle. ts ts ts Run type checks and unit tests in the adapter repo. Branch name: fix/riskoracle-getscore-signature |
|
this is a suggested fix to the failing test |
Summary
Resolves #94. Several quality gates referenced by our workflows and README either did not exist, could silently pass, or could not run at all. This PR restores them so CI is an accurate, trustworthy signal.
Changes
test:mutation(stryker run) andsync:check(node scripts/check-cross-repo-sync.mjs) scripts. The mutation workflow and the sync script's own header referenced them, but they did not exist.format:checkauthoritative. Previouslynpm run format:check || npm run formatran Prettier in write mode as a fallback, masking formatting failures (the repo had 109 unformatted files). Also run thesizegate in the main job, matching what the README documents.npm run sync:checkinstead of a rawnodecall.docs:check(BatchRiskOracle.getScores,BatchRiskOracleOptions,BatchRiskOracleOptions.logger,BatchItemResult.destination,BatchItemResult.status,BatchItemStatus,BatchResult) so the docs gate passes without warnings.execArgv: ['--expose-gc'](worker_threads + V8 flags hangs the run). The dedicated config uses the threads pool, a single thread, and excludestests/benchmarks/**, making the mutation gate runnable on every platform.Verification
All gates pass locally on Windows (node 24):
typecheck,lint,format:check(whole repo),test(217 tests),build,size,docs:check,docstest:mutation(Stryker; initial run of 211 tests plus a full mutation run)sync:check(reports the expected drift below)sbom,license-check,npm audit --audit-level=high(0 vulnerabilities)Notes / follow-ups
sync:checkexits non-zero because of pre-existing contract drift: thegrydlock-extensionstand-in forRiskOracle.getScoreadds anoptions?: { timeoutMs?, signal?, bypassCache? }parameter not present in this adapter's canonical(destination: string) => Promise<number>. That drift originates ingrydlock-extensionand is out of scope here; once it lands there, this gate will pass. Worth tracking separately.test:mutationandsync:checkrun on schedule /workflow_dispatch(and, for sync, on matching paths) — not on every PR. They are now runnable and trustworthy wherever they are triggered.Closes #94