Skip to content

[ultra-review] actor set-value KEY with no value does not delete the record #1193

@l2ysho

Description

@l2ysho

Severity: HIGH
Location: src/commands/actor/set-value.ts:59-72
Parent: #1188

Problem

const recordValue = value || process.stdin; — when the value argument is omitted (documented behavior: delete the record), recordValue becomes the (already-drained) process.stdin stream. The deletion check only matches undefined / null / '' / 'null' / 'undefined', never a stream object, so the code calls setRecord() with a junk/empty value instead of deleteRecord().

Impact

actor set-value OUTPUT (no value arg) is documented to delete the record, but instead creates/overwrites it with an empty/invalid value — violating the documented contract.

Suggested fix

Detect the omitted-argument / empty-stdin case explicitly before falling back to the stream, and route it to deleteRecord().

Generated by an ultra code review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-dxIssues owned by the DX team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions