Skip to content

bundle: isError stays false even when every op errors #375

@justrach

Description

@justrach

Symptom

`codedb_bundle ops=[{"tool":"codedb_outline"}]` (missing required `path`) returns top-level `isError: false` with the body containing `--- [0] codedb_outline ---\nerror: missing 'path' argument\n...`. Agents check the top-level `isError` and conclude the bundle ran fine.

Failing test

`tests.test.issue-bug11: codedb_bundle marks isError when all ops fail`

Fix

Track `ok_count` / `fail_count` per op in `handleBundle`. If `ok_count == 0 and fail_count > 0`, prepend `error: all N bundle op(s) failed\n` so the outer `is_error` check (`startsWith "error:"`) flips.

Labels

bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions