Skip to content

Comments

ref: Extract shared skill selection and validate setup-app args#208

Draft
dcramer wants to merge 2 commits intomainfrom
warden-sweep/1984f16e/code-simplifier-ed2bac3e
Draft

ref: Extract shared skill selection and validate setup-app args#208
dcramer wants to merge 2 commits intomainfrom
warden-sweep/1984f16e/code-simplifier-ed2bac3e

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 22, 2026

Two related cleanups in the CLI argument handling:

  1. Validate setup-app port/timeout: Add NaN validation for --port and --timeout parseInt results, consistent with how --parallel is validated in the run command. Previously, non-numeric values silently produced NaN causing runtime failures.

  2. Extract shared skill selection: Extract the duplicated skill selection if-else-if pattern from runAddRemote and runAdd into a shared resolveSkillName() helper, eliminating code duplication.

Automated fixes for Warden findings code-simplifier-395781e1 and code-simplifier-ed2bac3e (medium, detected by code-simplifier).

This PR was auto-generated by a Warden Sweep (run 1984f16e).
The finding has been validated through automated deep tracing,
but human confirmation is requested as this is batch work.

dcramer and others added 2 commits February 22, 2026 11:03
Warden finding code-simplifier-ed2bac3e
Severity: medium

Co-Authored-By: Warden <noreply@getsentry.com>
Warden finding code-simplifier-395781e1
Severity: medium

Co-Authored-By: Warden <noreply@getsentry.com>
@dcramer dcramer added the warden Automated fix from Warden Sweep label Feb 22, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

return options.skill;
}
if (reporter.mode.isTTY) {
reporter.blank();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactoring adds extra blank line to local add path

Low Severity

The resolveSkillName helper unconditionally calls reporter.blank() before invoking the prompt callback in TTY mode. The original runAddRemote had this reporter.blank() call, but the original runAdd (local skills path) did not. By consolidating both paths into resolveSkillName, the local runAdd interactive flow now outputs an extra blank line that wasn't there before, making this extraction not behavior-preserving.

Additional Locations (1)

Fix in Cursor Fix in Web

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

Labels

warden Automated fix from Warden Sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant