Skip to content

chore(ci): drive stub debt baseline to zero and remove it #2354

@alexey-pelykh

Description

@alexey-pelykh

Summary

The stub debt gate (#2353) currently tracks 12 @ts-expect-error suppressions
via .stub-debt-baseline. The gate prevents the count from growing, but the
end goal is zero tolerance: no @ts-expect-error in the scanned directories
at all.

This issue covers the full progression:

  1. Fix all existing suppressions — resolve the 12 entries currently
    baselined (6 fork-stub typing mismatches tracked in fix(test): resolve 6 fork-stub typing mismatches in agent-runner e2e test #2352, plus 6 others
    across security.test.ts, profiles.test.ts, integration.test.ts,
    and uuid.test.ts).
  2. Set baseline to 0 — decrement .stub-debt-baseline as suppressions
    are removed, reaching 0.
  3. Remove the baseline file — delete .stub-debt-baseline entirely.
  4. Simplify the gate script — update scripts/check-stub-debt.mjs to
    fail on any @ts-expect-error match (no baseline comparison needed).

Acceptance Criteria

  • All 12 @ts-expect-error suppressions resolved (types fixed, not
    replaced with @ts-ignore or any casts)
  • .stub-debt-baseline file deleted from the repository
  • scripts/check-stub-debt.mjs simplified: scans for @ts-expect-error
    and exits non-zero if any are found (no baseline file read/comparison)
  • stub-debt-gate CI job passes with the simplified script
  • No regressions in pnpm check or pnpm test

Context

Notes

This can be done incrementally — each suppression fix can decrement the
baseline in its own PR. The final PR removes the baseline file and
simplifies the script.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions