fix(surprisal): use correct filter format for level observations (#581)
The Surprisal module passes `{"level": levels}` directly to
`get_all_documents()`, but `apply_filter()` expects operator syntax:
`{"level": {"in": levels}}`.
Without the `in` operator, the filter is silently ignored, causing
`_fetch_level_observations()` to return 0 results. This makes the
entire Surprisal phase of the Dream cycle a no-op.
Fixes #559
This commit is contained in:
parent
b389627194
commit
5f9cb3f3c1
|
|
@ -261,7 +261,7 @@ async def _fetch_recent_observations(
|
|||
workspace_name=workspace_name,
|
||||
observer=observer,
|
||||
observed=observed,
|
||||
filters={"level": levels} if levels else None,
|
||||
filters={"level": {"in": levels}} if levels else None,
|
||||
limit=limit,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue