Skip to content

fix(scripts): propagate top-level failures - #84003

Open
RerankerGuo wants to merge 1 commit into
anthropics:mainfrom
RerankerGuo:fix/propagate-script-failures
Open

fix(scripts): propagate top-level failures#84003
RerankerGuo wants to merge 1 commit into
anthropics:mainfrom
RerankerGuo:fix/propagate-script-failures

Conversation

@RerankerGuo

Copy link
Copy Markdown

Summary

  • return a failing process status when either duplicate-maintenance script rejects at the top level
  • keep logging the original error while allowing pending output to flush

Problem

Both scripts used .catch(console.error). That reports startup and API failures but resolves the rejection, so the Bun process exits successfully. In CI, a missing token or top-level GitHub API failure can therefore look like a successful maintenance run.

Verification

  • GITHUB_TOKEN= node scripts/auto-close-duplicates.ts returns 1
  • GITHUB_TOKEN= node scripts/backfill-duplicate-comments.ts returns 1
  • both scripts return 0 with a stubbed successful GitHub API response containing an empty result set
  • git diff --check

Scope

Per-issue failures in auto-close-duplicates.ts remain best-effort so one issue does not stop the batch. This only changes unhandled top-level failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant