Skip to content

fix(streaming): use public mot.cancelled property in streaming.py:437 #1219

Closed

Description

@ajbozarth

Discovered during #1197 audit (Appendix A item 2). Independent of #909.

Summary

mellea/stdlib/streaming.py:437 reads self._mot._cancelled instead of the public mot.cancelled property that #942 added. One-line fix.

Current

# mellea/stdlib/streaming.py:436-440
thunk = ModelOutputThunk(value=self.full_text)
thunk._cancelled = self._mot._cancelled    # <-- reads private attr
thunk.generation = copy(self._mot.generation)
thunk.parsed_repr = thunk.value
return thunk

Fix

thunk._cancelled = self._mot.cancelled     # public property

The write side stays as thunk._cancelled = ... because the public surface is read-only — backends still need write access to the underlying attribute. Only the right-hand side changes.

Acceptance

  • Single line in streaming.py:437 updated
  • Existing tests still pass; no behavior change

Sequencing

Standalone. Not blocking on anything; not blocking anything.

Activity

  1. added
    bug
    good first issue
    area/streaming
    on Jun 5, 2026
  2. psschwei commented on Jun 8, 2026

    @psschwei
    Contributor

    PR #1220 will fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/streamingbuggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions