Skip to content

Fix error handling in boss-mode report generation to surface I/O errors#28

Draft
Copilot wants to merge 4 commits intofix/uncertainty-button-action-idsfrom
copilot/sub-pr-26-again
Draft

Fix error handling in boss-mode report generation to surface I/O errors#28
Copilot wants to merge 4 commits intofix/uncertainty-button-action-idsfrom
copilot/sub-pr-26-again

Conversation

Copy link

Copilot AI commented Feb 16, 2026

Boss-mode report generation silently fell back to the full LLM pipeline on any file read error, including permission/I/O failures. This masked real errors and wasted tokens.

Changes

  • Error handling: Explicitly check for os.IsNotExist vs other errors
    • File not found → log and continue to full pipeline (expected)
    • Permission/I/O errors → surface to user and abort (unexpected)
// Before: all errors treated as "file doesn't exist"
if content, readErr := os.ReadFile(teamReportPath); readErr == nil && len(content) > 0 {
    // use shortcut
}
log.Printf("no existing team report found, running full pipeline")

// After: distinguish expected from unexpected errors
content, readErr := os.ReadFile(teamReportPath)
if readErr != nil {
    if !os.IsNotExist(readErr) {
        log.Printf("Error reading team report file %s: %v", teamReportPath, readErr)
        postEphemeral(api, cmd, fmt.Sprintf("Error reading team report file: %v", readErr))
        return
    }
    log.Printf("no existing team report found, running full pipeline")
} else if len(content) > 0 {
    // use shortcut
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 16, 2026 10:58
…d from other errors

Co-authored-by: WZ <719869+WZ@users.noreply.github.com>
Co-authored-by: WZ <719869+WZ@users.noreply.github.com>
Co-authored-by: WZ <719869+WZ@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP to address feedback on uncertainty buttons Fix error handling in boss-mode report generation to surface I/O errors Feb 16, 2026
Copilot AI requested a review from WZ February 16, 2026 11:01
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