Skip to content

[Framework] Improve discover.sh error handling — distinguish API failures from empty results #60

@Kanevry

Description

@Kanevry

Problem

discover.sh silently continues when gh search issues fails (line ~115). It returns (search failed or returned no results) without distinguishing:

  • Zero results (valid, continue)
  • API failure (should warn with details)
  • Authentication failure (should die)

Why

Found during P1 skills audit (session 2026-03-27). evaluate.sh handles this correctly (|| die "Failed to fetch"), but discover.sh is lenient. Inconsistent error handling across scripts.

Proposed Fix

Check gh exit code and stderr separately. Die on auth/API failures, continue gracefully on empty results.

References

  • Audit finding from skills session 2026-03-27
  • Compare with evaluate.sh lines 51, 99 for correct pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    frameworkWondrAIWork framework improvementsp2-mediumMedium priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions