Skip to content

[PR Feedback] Error Handling and Event Parsing #13

Description

@tinkermonkey

Based on consolidated PR review, address the following in Error Handling and Event Parsing:

  • Broad catch block masks all exceptions as spawn_error: The catch-all at /workspace/src/process/CliProcess.ts:274-279 converts every exception — including programmer bugs like TypeError and ReferenceError — into a generic spawn_error ErrorEvent. A bug in the event parser would be reported as "spawn_error", actively misleading. Should use a distinct error code (e.g., internal_error) or re-throw unexpected errors.
  • Copilot ACP parser silently drops unrecognized message structures: At /workspace/src/events/EventParser.ts:300-309, if a parsed JSON-RPC message doesn't match any recognized pattern, the function returns an empty events array — zero events emitted, zero logging. This violates the "no events are ever silently lost" principle explicitly documented in the Claude parser (line 200). Should add a fallback RawEvent emission matching the Claude parser's approach.

Created by PR Review Stage - Consolidation Phase


Concurrent Fix Issues (Same Review Cycle)

The following issues are being fixed simultaneously in this review cycle. Check these issues for any files they modify before making your own changes to avoid introducing conflicts:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions