feat: post-merge wrap-up — run reflect skill after PR merge, ntfy notification#80
Merged
Conversation
review.py was removed in the event-driven refactor (PR #76). Port merge detection and wrap-up invocation to _handle_issue() in orchestrator.py. On each cycle, if the issue has a pr_url, check pr.merged before processing reviews. On first merge detection, set merged=True in state and run wrap_up.run() (errors caught, DONE not affected). Subsequent cycles skip wrap-up and return immediately. Unmerged PRs fall through to normal work invocation as before.
04bf4ad to
5a39121
Compare
max-tet
requested changes
May 26, 2026
| _notify(title=ntfy_title, body=ntfy_body, success=success, settings=settings) | ||
|
|
||
|
|
||
| def _notify(*, title: str, body: str, success: bool, settings) -> None: |
Collaborator
There was a problem hiding this comment.
There should already be a helper for that called during the pebble webhook.
- Inbox filename now includes topic slug ({{ today }}-wrap-up-{{ topic }}.md)
so multiple invocations on the same day don't clobber each other.
- Replace inline _notify/_requests.post with send_ntfy_sync from
webhook.notify — the shared helper that already existed for Pebble.
- Update tests to mock send_ntfy_sync; drop TestNotify class that
tested the now-removed _notify helper.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
Addressed both review comments: (1) updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
review.run()fetches the PR on every cycle and checkspr.merged. On merge, sets status →doneand runs the wrap-up task. The oldAPPROVED-without-comments → doneshortcut is removed.tasks/wrap_up.py. Invokes Claude Code CLI with the knowledge base as cwd and a prompt that runs thewrap-upskill (which chains toreflect→capture). Non-interactive constraints in the prompt ensure proposals go toinbox/instead of auto-editingCLAUDE.mdor settings. Worklog entry is written directly to the daily note.requests.postat the end of wrap-up sends an ntfy notification with title/body extracted from Claude's fenced JSON output tail. Falls back gracefully on bad JSON or invoke errors. Only fires ifCLAYDE_NTFY_TOPICis configured.WrapUpResponsePydantic model inresponses.py,get_pull()helper ingithub.py,wrap_up.j2Jinja2 template.wrap_up.py, 4 updated + 2 new intest_tasks_review.py). 378 total passing.Test Plan
uv run python -m pytest -qstate.jsontransitions todone, KB gets a worklog entry and inbox proposals file, ntfy fires🤖 Generated with Claude Code