Skip to content

Python SDK: QueryResult dataclass rejects unknown response keys (breaks on v3.8+ fields) #161

Description

@salishforge

Found during adversarial review of #160 (pre-existing at HEAD, out of scope there).

python/memforge/types.py QueryResult declares a fixed field set and client.py constructs it with QueryResult(**r). The server's query response has grown fields since (context_signals, epistemic_status, evidence_count in v3.8/v3.9, explanation in v3.10), so any response carrying them raises TypeError inside the typed parse path.

Fix options: filter kwargs to declared fields in a factory, or add the missing fields (and keep a catch-all). Factory-with-filter is Hyrum-safer going forward.

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