Skip to content

feat(guild-ledger): validate human_stop events and add touches report - #72

Merged
rymiwe merged 1 commit into
mainfrom
t3/ledger-human-touches-per-pr
Nov 23, 2026
Merged

rymiwe merged 1 commit into
mainfrom
t3/ledger-human-touches-per-pr

Conversation

@rymiwe

@rymiwe rymiwe commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Why

Unit 1 of #28: let the outcome ledger compute human touches per merged PR per repo for a window from ledger events alone, without relaxing the event schema for PR-less route asks.

What changed

  • In bin/guild-ledger, validate decision events with data.action == "human_stop": require data.stop from {split_decision, posting_go, manual_merge, ack_loop, one_way_ack, brief_approval} and optional data.answered_at as ISO 8601 time (or null); reject unknown stops with exit 2.
  • Add guild-ledger touches [--days 7] [--repo OWNER/NAME ...] to join human_stop decisions to merged pr-lifecycle outcomes by (repo, pr) in the window from the ledger file alone (no GitHub calls) and print merged PRs, human stops, touches per merged PR, and counts by stop name per repo.
  • Document human_stop and guild-ledger touches in docs/outcome-ledger.md.

Verification

  • /home/linuxbrew/.linuxbrew/bin/python3 -m unittest -v tests/test_guild_ledger.py (24 tests pass, covering good/bad stop validation, touches join math, and zero-stop PRs).

@rymiwe
rymiwe merged commit 224e360 into main Nov 23, 2026
1 check passed
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