Skip to content

🤖 refactor: auto-cleanup#3629

Merged
ThomasK33 merged 1 commit into
mainfrom
auto-cleanup
Jun 25, 2026
Merged

🤖 refactor: auto-cleanup#3629
ThomasK33 merged 1 commit into
mainfrom
auto-cleanup

Conversation

@mux-bot

@mux-bot mux-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Long-lived auto-cleanup PR maintained by the Auto-Cleanup Agent. Each pass lands at most one extremely low-risk, behavior-preserving cleanup drawn from recently merged main activity, then advances the checkpoint below.

Auto-cleanup checkpoint: d3b835a

This PR currently contains one cleanup against main:

  1. src/node/services/workflows/WorkflowRunner.ts — extract the duplicated error instanceof Error && error.name === ... sentinel-error guard into a shared isErrorWithName(error, name) helper.

This pass

This is the first pass of a fresh auto-cleanup PR (the prior one, #3606, merged at checkpoint 620c2a66). Considered the new main commits since that checkpoint:

#3625 added agent graceful-timeout handling to WorkflowRunner.ts, which introduced two new sentinel-error predicates — isAgentReportWaitTimeoutError and isWorkflowAgentHardTimeoutError — each re-spelling the identical error instanceof Error && error.name === "<name>" shape already used by the pre-existing isForegroundWaitBackgroundedError. With three byte-identical guards now in the file, extracted the shared check into a module-level isErrorWithName(error, name) helper and delegated all three predicates to it.

Behavior-preserving: each predicate still returns the same boolean as before (isErrorWithName reproduces the inline expression exactly). The other instanceof Error checks in the file test error.message inline rather than error.name, so they are intentionally left untouched.

#3628 is a small, self-contained bug fix (default budget for model goals) with no low-risk dedup opportunity.

Validation

  • make static-check is green for the touched code (ESLint, tsconfig + tsconfig.main.json, Prettier). (fmt-shell-check is the only non-passing step, solely because the shfmt binary is absent in this environment; no shell files are touched.)

Risks

Minimal. The change is a pure local extraction of an identical boolean expression; no logic, types, or call semantics change.


Generated with mux • Model: anthropic:claude-opus-4-8 • Thinking: xhigh

Dedupe the three identical 'error instanceof Error && error.name === X'
sentinel-error predicates (isForegroundWaitBackgroundedError,
isAgentReportWaitTimeoutError, isWorkflowAgentHardTimeoutError) into a
single isErrorWithName(error, name) helper. Behavior-preserving local
refactor; each guard returns the same boolean as before.
@mux-bot

mux-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit ca7d581 Jun 25, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the auto-cleanup branch June 25, 2026 09:22
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