Summary
npm run lint:setup-js reports a second remediation stream in actions/setup/js around reusable error-handling patterns: rethrows without { cause }, unchecked spawnSync(...).error, unsafe caught-error property access, and places that should use getErrorMessage(err). This issue should address those related diagnostics together where they share the same root cause of inconsistent exception handling.
Affected files
Representative files from the current lint run:
actions/setup/js/apply_samples.cjs
actions/setup/js/artifact_client.cjs
actions/setup/js/assign_to_agent.cjs
actions/setup/js/awf_reflect.cjs
actions/setup/js/copilot_harness.cjs
actions/setup/js/create_issue.cjs
actions/setup/js/handle_agent_failure.cjs
actions/setup/js/merge_remote_agent_github_folder.cjs
actions/setup/js/run_evals.cjs
actions/setup/js/safe_output_handler_manager.cjs
Representative diagnostics
apply_samples.cjs:67:11 — rethrow inside catch (err) should include { cause: err }
apply_samples.cjs:97:18 — spawnSync result must check .error
artifact_client.cjs:163:18 — spawnSync result must check .error
awf_reflect.cjs:209:71 — prefer getErrorMessage(err)
copilot_harness.cjs:269:9 — unsafe direct access to caught error .code
run_evals.cjs:63:85 — unsafe direct access to caught error .message
safe_output_handler_manager.cjs:283:11 — rethrow should include { cause: error }
Expected outcome
- Rethrown errors preserve original causes
spawnSync call sites check and handle .error before relying on status
- Caught-error reporting uses safe helpers or guards
- Related
actions/setup/js files stop triggering the associated custom error-handling rules
Checklist
Source
Daily ESLint Monster remediation stream from workflow run 29538839244.
Generated by 🧹 ESLint Monster · 15.6 AIC · ⌖ 8.47 AIC · ⊞ 3.9K · ◷
Summary
npm run lint:setup-jsreports a second remediation stream inactions/setup/jsaround reusable error-handling patterns: rethrows without{ cause }, uncheckedspawnSync(...).error, unsafe caught-error property access, and places that should usegetErrorMessage(err). This issue should address those related diagnostics together where they share the same root cause of inconsistent exception handling.Affected files
Representative files from the current lint run:
actions/setup/js/apply_samples.cjsactions/setup/js/artifact_client.cjsactions/setup/js/assign_to_agent.cjsactions/setup/js/awf_reflect.cjsactions/setup/js/copilot_harness.cjsactions/setup/js/create_issue.cjsactions/setup/js/handle_agent_failure.cjsactions/setup/js/merge_remote_agent_github_folder.cjsactions/setup/js/run_evals.cjsactions/setup/js/safe_output_handler_manager.cjsRepresentative diagnostics
apply_samples.cjs:67:11— rethrow insidecatch (err)should include{ cause: err }apply_samples.cjs:97:18—spawnSyncresult must check.errorartifact_client.cjs:163:18—spawnSyncresult must check.errorawf_reflect.cjs:209:71— prefergetErrorMessage(err)copilot_harness.cjs:269:9— unsafe direct access to caught error.coderun_evals.cjs:63:85— unsafe direct access to caught error.messagesafe_output_handler_manager.cjs:283:11— rethrow should include{ cause: error }Expected outcome
spawnSynccall sites check and handle.errorbefore relying onstatusactions/setup/jsfiles stop triggering the associated custom error-handling rulesChecklist
{ cause }to rethrows that reference caught errorsspawnSync(...).errorat flagged call sitesgetErrorMessage(err)where the custom rule expects itactions/setup/jsnpm run lint:setup-jsSource
Daily ESLint Monster remediation stream from workflow run 29538839244.