Skip to content

[P1.17] cf stats --task is typed int but v2 task IDs are UUID strings #744

Description

@frankbria

Severity: high | Category: data-integrity | Phase: P1.17

Problem

tokens(task: Optional[int]) and export_data(task: Optional[int]) reject a UUID at Typer coercion and an int never matches a UUID-keyed row, so per-task cost/token reporting and export are broken for every real v2 task (even after P0.1 restores the table).

Evidence

codeframe/cli/stats_commands.py:80

Acceptance criteria

  • --task is str; get_task_token_summary/get_batch_token_usage accept Union[int, str].
  • Test: cf stats tokens --task <uuid> returns a saved UUID-keyed row.

Dependencies

blocked by #712 ([P0.1])


Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-high-betaHigh priority - should fix before beta for best experiencepriority:hightype:bugSomething is broken and needs fixing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions