fix(ci): type-check and build the workspace root #54
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-payment!54
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/ci-typecheck-root"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What was wrong
CI's type-check and build steps ran
pnpm -r typecheck/pnpm -r build. pnpm recursivecommands exclude the workspace root package by default, so both steps only ever covered
contract/. The root package (.), which holdssrc/**(the money-handling domainlogic), has never been type-checked or built in CI since the project's first CI commit.
lefthook.json's pre-pushtype-checkandbuildjobs had the samepnpm -rgap, so alocal pre-push run gave the same false green.
This was silent:
pnpm typechecklocally (what a contributor runs by hand) does catchroot errors, but nobody runs that day to day, and CI's own signal never did. Running
tsc --noEmit -p .on HEAD surfaced 3 realTS2353errors insrc/provider/mollie.test.ts, unrelated to this fix, that had been sitting there since2026-08-05.
The fix
.forgejo/workflows/ci.yml: add--include-workspace-rootto the Type-check and Buildsteps, so both
.andcontract/are checked and built.lefthook.json: same flag on the matching pre-pushtype-checkandbuildjobs.src/provider/mollie.test.ts:refundedPaymentClient'srefundsparam was typed as{ id: string; status: string }[], missingpaymentId, which every call site's objectliteral actually includes. TypeScript's excess-property check on those literals was the
source of the
TS2353errors. Widened the type to includepaymentId: string, matchingthe real Mollie SDK
Refundshape (paymentRefunds.page()returnsRefund[], whichhas
paymentId) thatmollie.tsoperates against. Noany, no cast.How verified
Locally, in a clean worktree at the PR tip:
pnpm -r --include-workspace-root typecheck— passes for both.andcontract.pnpm eslintandpnpm format:check— clean.pnpm test— 166 tests, 11 files, all passing.pnpm -r --include-workspace-root build— succeeds for both packages.git pushran the full pre-push lefthook gate (format, eslint, type-check, drizzle-kitcheck, gitleaks, audit, test, build) — all green, including the now-fixed type-check and
build steps.