Skip to content

.NET: Python: [Bug]: EditTableV2 replaces falsey item values with None #7379

Description

@hsusul

Description

Python declarative EditTableV2 treats a falsey value in its documented item field as though the field were missing. For example, adding item: false appends None instead of False. The same truthiness fallback affects other valid falsey list items such as 0, an empty string, and empty containers.

Expected: the explicit item value is added to the target table. The legacy value field should only be used when item is missing or None.

Code Sample

state.set("Local.items", [True])
executor = EditTableV2Executor({
    "kind": "EditTableV2",
    "table": "Local.items",
    "operation": "add",
    "item": False,
})
await executor.handle_action(ActionTrigger(), context)
assert state.get("Local.items") == [True, False]

Error Messages / Stack Traces

assert [True, None] == [True, False]
At index 1 diff: None != False

Package Versions

agent-framework-declarative at upstream main commit 33bc9c063c42d457fff5b1017c765e271474cc99.

Python Version

Python 3.13.5

Additional Context

The cause is self._action_def.get("item") or self._action_def.get("value") in EditTableV2Executor. Targeted issue/PR searches found only .NET EditTableV2 work involving code generation, table-state mutation, and YAML fixtures; none cover this Python falsey-item behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETUsage: [Issues, PRs], Target: .NetpythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions