Skip to content

generateIgnoreCore still swallows per-target errors (exit 0 'up to date' on a broken ignore source) #2551

Description

@dyoshikawa

Background

Finding from the PR #2550 review round. #2486 fixed the permissions feature's swallow-and-continue (warn + continue → error + rethrow) so a malformed shared config fails the run like the MCP feature. generateIgnoreCore is now the only remaining feature loop with the old pattern (src/lib/generate.ts ~791-796, pinned by the unit test "should handle errors gracefully and continue" at src/lib/generate.test.ts ~388).

Details

A throw from IgnoreProcessor (e.g. a malformed ignore source) still exits 0 with "All files are up to date", including in --check mode. Since ignore files are what keep secrets out of AI tools' reach, a silently-skipped ignore generation is the same class of fail-open bug — arguably worse.

Solution / Next Steps

Align ignore with the other eight feature cores: log at error level and rethrow (mirror the #2550 change), flip the pinning unit test, and add an e2e regression case — or document explicitly why ignore is intentionally lenient if there is a reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintainer-scrapRough notes for AI implementation. Not for human eyes.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions