-
Notifications
You must be signed in to change notification settings - Fork 96
Description
🏥 CI Failure Investigation - Run #32188
Summary
TypeScript typecheck in the js job now fails after the change that adds a duplicateCount accumulator in close_expired_discussions.cjs. The stats return object is still declared as containing only pageCount and totalScanned, so npm run typecheck crashes before running any tests.
Failure Details
- Run: 21427643999
- Commit: 8ef509b
- Trigger: push
- Job:
js - Step:
Run tests(npm run typecheck) - Log access:
ghis unauthenticated and the API returned403 Must have admin rightswhen downloading job logs.
Root Cause Analysis
close_expired_discussions.cjs now tracks a duplicateCount value when deduplicating discussions, but the return type annotated in the JSDoc still only lists pageCount and totalScanned. TypeScript rejects the literal as it is no longer assignable to the declared type, so the typecheck script fails before the rest of the test suite executes.
Failed Jobs and Errors
js→Run tests:error TS2353: Object literal may only specify known properties, and 'duplicateCount' does not exist in type '{ pageCount: number; totalScanned: number; }'.
Investigation Findings
- Reproduced locally with
cd actions/setup/js && npm test(fails innpm run typecheck). - The error points to the return value of
searchDiscussionsWithExpirationnear the end ofclose_expired_discussions.cjs. - No prior similar failures were found in cached investigations.
Recommended Actions
- Update the JSDoc (and any TypeScript interface) for
searchDiscussionsWithExpirationto includeduplicateCountinstats. - Re-run
npm run typecheck(and dependent tests) to verify the fix.
Prevention Strategies
Keep type annotations in sync with any new properties added to returned data structures, ideally with a lint or typecheck gate that runs locally before pushing.
AI Team Self-Improvement
When extending objects returned to TypeScript tooling, simultaneously expand their documented/annotated shapes so the type system can verify the new fields.
Historical Context
No matching incidents were found in prior investigations for this exact typecheck error.
AI generated by CI Failure Doctor
To add this workflow in your repository, run
gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d. See usage guide.