Skip to content

[CI Failure Doctor] Investigate js job typecheck failure #12204

@github-actions

Description

@github-actions

🏥 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: gh is unauthenticated and the API returned 403 Must have admin rights when 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

  • jsRun 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 in npm run typecheck).
  • The error points to the return value of searchDiscussionsWithExpiration near the end of close_expired_discussions.cjs.
  • No prior similar failures were found in cached investigations.

Recommended Actions

  • Update the JSDoc (and any TypeScript interface) for searchDiscussionsWithExpiration to include duplicateCount in stats.
  • 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.

Metadata

Metadata

Labels

cookieIssue Monster Loves Cookies!

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions