Make monitoring feedback actionable - #9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9610395c33
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Task { @MainActor in | ||
| health.noteEvent() | ||
| if envelope.kind == .hook { | ||
| health.noteEvent(agent: envelope.agent) |
There was a problem hiding this comment.
Move verification persistence off the sync hook path
For PreToolUse/PermissionRequest, the bridge waits for store.handleEnvelope to invoke reply(.empty), but this new call runs before that and noteEvent can synchronously persistVerification() on the first event and then once per minute. If the config-file write is slow or stuck, these sync hooks are delayed or can hit the bridge timeout even though Perch is supposed to observe without blocking agent actions; record the event after the handler replies or persist asynchronously.
AGENTS.md reference: AGENTS.md:L38-L42
Useful? React with 👍 / 👎.
Summary
Why
Static hook configuration could look healthy before Perch had received a real event. Notifications also lacked useful destinations, while setup results and mixed Doctor checks could communicate success too broadly.
Impact
Monitoring state is more honest and easier to act on without changing Perch's observe-only boundary. Hook changes invalidate prior delivery verification, and notifications now lead directly to the relevant local context.
Validation