Skip to content

feat: ship run log persistence for /retro velocity tracking#324

Open
jithinraj wants to merge 1 commit intogarrytan:mainfrom
jithinraj:feat/ship-log
Open

feat: ship run log persistence for /retro velocity tracking#324
jithinraj wants to merge 1 commit intogarrytan:mainfrom
jithinraj:feat/ship-log

Conversation

@jithinraj
Copy link

Summary

Adds structured JSONL logging to /ship and consumption in /retro, enabling shipping velocity metrics across retrospectives. Addresses the ship log persistence item from TODOS.md (P2 under Ship).

What it does

New bin/gstack-ship-log helper:

  • Append mode: gstack-ship-log '{"ts":"...","version":"..."}'
  • Read mode: gstack-ship-log read (returns NO_SHIP_LOG if empty)
  • Window filtering: gstack-ship-log read --window 7d (macOS + GNU date)
  • Follows gstack-analytics/gstack-telemetry-log conventions (set -uo pipefail, GSTACK_STATE_DIR override, ~/.gstack/analytics/ location)

Ship template (Step 8.25):

  • Appends JSONL entry after PR creation with: version, branch, repo slug, PR URL, review findings (total + auto-fixed), Greptile stats (comments, fixed, false positives), TODOs completed, test coverage before/after
  • Fail-safe: warns and continues if write fails

Retro template:

  • Step 1: reads ship log with window filtering (command 14)
  • Step 2: aggregates Ship Velocity metric (runs, PRs, avg review findings, Greptile catches, coverage delta)
  • Step 13: persists ship_velocity in JSON snapshot for trend tracking
  • Step 14: references ship log trends in Shipping Velocity narrative

Additional fix

Fixed pre-existing duplicate command numbering in retro Step 1 (two commands were both labeled # 12).

Validation

  • bun test: all tests pass (no regressions)
  • bun run gen:skill-docs --dry-run: all 26 Claude skills FRESH
  • bun run gen:skill-docs --host codex --dry-run: all 25 Codex skills FRESH
  • bun run skill:check: all 25 skills healthy, 0 missing
  • Codex path rewriting verified (~/.codex/skills/gstack/bin/gstack-ship-log)
  • Manual end-to-end test of gstack-ship-log (write, read, read --window, NO_SHIP_LOG)

Test plan

  • /ship appends JSONL entry to ~/.gstack/analytics/ship-log.jsonl after PR creation
  • /retro reads and aggregates ship log data when present
  • /retro gracefully skips ship velocity section when no log exists
  • bin/gstack-ship-log read --window 7d filters entries correctly
  • Ship workflow never blocks on log write failure

Adds structured JSONL logging to /ship and consumption in /retro,
enabling shipping velocity metrics across retrospectives.

- bin/gstack-ship-log: read/write helper with --window filtering
- ship Step 8.25: appends entry after PR creation (version, branch,
  PR URL, review findings, Greptile stats, todos completed,
  test coverage counts)
- retro Step 2: aggregates ship velocity (runs, PRs, avg findings,
  Greptile catches, coverage delta)
- retro Step 13: persists ship_velocity in JSON snapshot
- retro Step 14: references ship log trends in narrative

Also fixes pre-existing duplicate command numbering in retro Step 1
(two commands were both labeled garrytan#12).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant