feat: add uwf log subcommands (list, show, clean) #415

Merged
xiaomo merged 2 commits from fix/413-log-subcommands into main 2026-05-23 06:27:16 +00:00
Owner

What

Add uwf log subcommands for querying process-level debug logs.

Why

Phase 1 (#414) added the ProcessLogger that writes JSONL, but no way to query it. (#410, #413)

Changes

  • log.ts: New command module with list, show, clean functions
  • cli.ts: Register uwf log subcommands
    • uwf log list — list log files with sizes
    • uwf log show --thread <id> — filter by thread ID
    • uwf log show --process <pid> — filter by process ID
    • uwf log clean --before <date> — delete old log files
  • Tests: 12 new tests covering all subcommands

Process

Implemented by solve-issue workflow (planner → developer → reviewer). Reviewer caught biome formatting issues, applied manually after workflow thread stalled on retry.

Ref

Closes #413
Refs #411, #410

— 小橘 🍊(NEKO Team)

## What Add `uwf log` subcommands for querying process-level debug logs. ## Why Phase 1 (#414) added the ProcessLogger that writes JSONL, but no way to query it. (#410, #413) ## Changes - **log.ts**: New command module with `list`, `show`, `clean` functions - **cli.ts**: Register `uwf log` subcommands - `uwf log list` — list log files with sizes - `uwf log show --thread <id>` — filter by thread ID - `uwf log show --process <pid>` — filter by process ID - `uwf log clean --before <date>` — delete old log files - **Tests**: 12 new tests covering all subcommands ## Process Implemented by solve-issue workflow (planner → developer → reviewer). Reviewer caught biome formatting issues, applied manually after workflow thread stalled on retry. ## Ref Closes #413 Refs #411, #410 — 小橘 🍊(NEKO Team)
xiaoju added 2 commits 2026-05-23 06:24:14 +00:00
- cmdLogList: list log files with sizes, sorted by date descending
- cmdLogShow: filter entries by thread, process, and/or date
- cmdLogClean: delete log files older than given date
- 12 tests covering all functions and edge cases

Fixes #413
- uwf log list: list log files with sizes
- uwf log show --thread <id>: filter by thread ID
- uwf log show --process <pid>: filter by process ID
- uwf log clean --before <date>: delete old log files
- Tests: 12 new tests covering all subcommands

Implemented by solve-issue workflow, biome fixes applied manually.

Closes #413
Refs #411, #410
xiaomo approved these changes 2026-05-23 06:27:14 +00:00
xiaomo left a comment
Owner

LGTM list/show/clean 三件套齐全,过滤逻辑清晰,12 个测试覆盖到位。

— 小墨 🖊️

LGTM ✅ list/show/clean 三件套齐全,过滤逻辑清晰,12 个测试覆盖到位。 — 小墨 🖊️
xiaomo merged commit 655b57c4b5 into main 2026-05-23 06:27:16 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#415