[kimi] Implement quick health snapshot before coding (#710) #828

Merged
kimi merged 1 commits from kimi/issue-710 into main 2026-03-21 21:53:41 +00:00
Collaborator

Fixes #710

Summary

Implemented timmy_healthcheck that produces a fast status summary before coding.

Changes

New Module

  • timmy_automations/daily_run/health_snapshot.py - Core health snapshot functionality

API Endpoint

  • GET /health/snapshot - Returns JSON health snapshot

CLI Command

  • timmy healthcheck - Run from command line with --json, --verbose, --quiet flags

Automations Registry

  • Added health_snapshot automation to automations.json

Tests

  • Added comprehensive tests in tests/timmy_automations/test_health_snapshot.py
  • Added smoke tests for /health/snapshot endpoint

Health Checks

  1. CI Status - Checks recent commit status via Gitea API
  2. Critical Issues - Counts P0/P1 labeled open issues
  3. Flakiness - Calculates failure rate from cycle retrospective data
  4. Token Economy - Shows token mint/burn temperature

Output Formats

  • Default: Human-readable status table with emojis
  • --json: Machine-readable JSON
  • --quiet: Single status line
  • --verbose: Includes issue details

Acceptance Criteria

  • Healthcheck runs fast (< 5 seconds) and clearly shows major red/green signals
  • Healthcheck can be invoked standalone or as part of Daily Run (trigger: pre_cycle)

Testing

  • All unit tests pass (2793 passed)
  • Lint clean
  • Manual testing verified all output modes work correctly
Fixes #710 ## Summary Implemented `timmy_healthcheck` that produces a fast status summary before coding. ## Changes ### New Module - `timmy_automations/daily_run/health_snapshot.py` - Core health snapshot functionality ### API Endpoint - `GET /health/snapshot` - Returns JSON health snapshot ### CLI Command - `timmy healthcheck` - Run from command line with `--json`, `--verbose`, `--quiet` flags ### Automations Registry - Added `health_snapshot` automation to `automations.json` ### Tests - Added comprehensive tests in `tests/timmy_automations/test_health_snapshot.py` - Added smoke tests for `/health/snapshot` endpoint ## Health Checks 1. **CI Status** - Checks recent commit status via Gitea API 2. **Critical Issues** - Counts P0/P1 labeled open issues 3. **Flakiness** - Calculates failure rate from cycle retrospective data 4. **Token Economy** - Shows token mint/burn temperature ## Output Formats - Default: Human-readable status table with emojis - `--json`: Machine-readable JSON - `--quiet`: Single status line - `--verbose`: Includes issue details ## Acceptance Criteria - [x] Healthcheck runs fast (< 5 seconds) and clearly shows major red/green signals - [x] Healthcheck can be invoked standalone or as part of Daily Run (trigger: pre_cycle) ## Testing - All unit tests pass (2793 passed) - Lint clean - Manual testing verified all output modes work correctly
kimi added 1 commit 2026-03-21 21:53:08 +00:00
feat: implement quick health snapshot before coding (#710)
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
42329a31e9
Add timmy_healthcheck that produces a fast status summary:
- CI pipeline status (pass/fail/unknown) via Gitea API
- P0/P1 critical issues count and details
- Test flakiness rate from cycle retrospective data
- Token economy temperature indicator

Usage:
  python3 timmy_automations/daily_run/health_snapshot.py
  timmy healthcheck

API:
  GET /health/snapshot - JSON health snapshot

Features:
- Runs in < 5 seconds for quick pre-work checks
- Can be invoked standalone or as part of Daily Run
- Graceful degradation when services unavailable
- JSON and verbose output modes

Fixes #710
kimi merged commit 2f15435fed into main 2026-03-21 21:53:41 +00:00
kimi deleted branch kimi/issue-710 2026-03-21 21:53:41 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#828