Skip to content

Add dedicated abandoned outcome enum + consistent episode filtering #50

@tfatykhov

Description

@tfatykhov

From PR #47 Code Review (P2 findings)

P2-1: Fragile abandoned sentinel for decisions

Currently abandoned decisions use outcome="failure" + confidence=0.0 as a sentinel. This is fragile - a real failed decision with legitimately 0% confidence would be misclassified as abandoned.

Episodes already have a dedicated outcome="abandoned" value. Decisions should align:

  • Add "abandoned" to the Decision outcome enum
  • Update Brain.abandon() to set outcome="abandoned" directly
  • Simplify the filter in _query() from NOT (outcome="failure" AND confidence=0.0) to outcome != "abandoned"

P2-2: Inconsistent episode filtering

_list_recent() accepts an outcome param that allows overriding the abandoned filter, but _search() and _search_recent_by_embedding() always hardcode outcome != "abandoned" with no override.

All three methods should have consistent filterability — either all allow override or none do.

Related

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