Skip to content

task state helper can silently rewind work to queued #366

Description

@SUaDtL

Observed behavior

_taskboardlib.set_state(text, target, queued, today) is publicly documented as accepting queued, in_progress, or done. Calling it on an in-progress or done task rewinds the marker to [ ] and strips the lifecycle date.

The sanctioned taskwrite CLI exposes only start and done, so this is not reachable through the public task command and does not block #364. It remains an internal API/state-machine inconsistency.

Why investigate

The forward lifecycle is queued -> in-progress -> done. A silent rewind can erase start/completion evidence if another internal caller uses the advertised queued target.

Acceptance criteria

  • Decide whether queued is a sanctioned repair transition or unsupported target state.
  • If unsupported, reject it without mutation and narrow the public helper contract.
  • If supported, document the repair semantics and make commit classification/audit behavior explicit.
  • Add regressions for in-progress and done inputs.
  • Preserve fail-soft behavior for malformed hook input.

Provenance

Harvested as a LOW, inherited, non-blocking finding during independent review of #364.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions