Skip to content

Fix feature-discovery workflow boolean input defaults for scheduled runs#324

Merged
lgallard merged 1 commit intomasterfrom
claude/debug-github-actions-workflow-26BXk
Apr 6, 2026
Merged

Fix feature-discovery workflow boolean input defaults for scheduled runs#324
lgallard merged 1 commit intomasterfrom
claude/debug-github-actions-workflow-26BXk

Conversation

@lgallard
Copy link
Copy Markdown
Owner

Summary

Fixed the feature-discovery workflow to properly handle boolean inputs when triggered by schedule events, where input parameters are not provided and default to empty strings.

Key Changes

  • Updated dry_run input to default to 'false' when empty: ${{ inputs.dry_run || 'false' }}
  • Updated force_scan input to default to 'false' when empty: ${{ inputs.force_scan || 'false' }}
  • Added clarifying comment explaining the default behavior for schedule triggers

Implementation Details

When the workflow is triggered by a schedule event (as opposed to manual dispatch), the inputs.dry_run and inputs.force_scan parameters are not provided and evaluate to empty strings. This caused the subsequent boolean validation checks to fail. By providing explicit 'false' defaults using the || operator, the workflow now correctly handles both manual and scheduled triggers without validation errors.

https://claude.ai/code/session_017SXfmbZDnAhbfd8umPzX5D

…riggers

When triggered by cron schedule, `inputs.dry_run` and `inputs.force_scan`
are empty strings (not "true"/"false"), causing the validation step to fail
with "Invalid dry_run value". Use `|| 'false'` fallback expressions to
default boolean inputs when not provided by workflow_dispatch.

https://claude.ai/code/session_017SXfmbZDnAhbfd8umPzX5D
@lgallard
Copy link
Copy Markdown
Owner Author

codebot hunt

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Feb 20, 2026

Claude finished @lgallard's task —— View job


🔍 Bug Hunt Analysis

Todo List:

  • Read and analyze the workflow file changes
  • Check for potential bugs and edge cases
  • Validate GitHub Actions workflow patterns
  • Provide actionable feedback

🎯 Analysis Results

Change Summary: Fixed boolean input handling for scheduled triggers by adding || 'false' defaults to prevent empty string validation failures.

Critical Issues Found: ⚠️ NONE - This is a solid defensive fix.

✅ Validation Results

GitHub Actions Pattern Compliance:

  • ✅ Proper input parameter defaulting for scheduled triggers
  • ✅ Maintains existing validation logic
  • ✅ Preserves workflow_dispatch manual input functionality
  • ✅ No security vulnerabilities introduced

Edge Case Analysis:

  • ✅ Schedule trigger: inputs.dry_run → empty string → now defaults to 'false'
  • ✅ Manual trigger with false: inputs.dry_run = false'false'
  • ✅ Manual trigger with true: inputs.dry_run = true'true'
  • ✅ Manual trigger omitted: inputs.dry_run → empty → now defaults to 'false'

Security Assessment:

  • ✅ No command injection risks (string literal defaults)
  • ✅ Input validation remains unchanged and secure
  • ✅ Boolean validation logic preserved

🔬 Technical Details

Lines 80-81 (.github/workflows/feature-discovery.yml:80-81):

DRY_RUN_INPUT="${{ inputs.dry_run || 'false' }}"
FORCE_SCAN_INPUT="${{ inputs.force_scan || 'false' }}"

Root Cause: When triggered by schedule, GitHub Actions sets inputs.* to empty strings, causing downstream validation to fail since """false".

Fix Quality: Excellent - uses GitHub Actions || operator correctly to provide string literals that pass validation.

🏁 Final Assessment

VERDICT:SHIP IT - No bugs found, solid defensive programming fix.

This PR correctly addresses the GitHub Actions scheduled trigger issue without introducing any new problems. The fix is minimal, targeted, and follows best practices.


@lgallard lgallard merged commit 4018a84 into master Apr 6, 2026
39 checks passed
@lgallard lgallard deleted the claude/debug-github-actions-workflow-26BXk branch April 6, 2026 21:34
@github-actions github-actions bot mentioned this pull request Apr 6, 2026
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.

2 participants