Skip to content

Merge dev → main: respond-to-ci diagnostics + persona-scope hardening (#1235)#1236

Merged
zbigniewsobiecki merged 1 commit intomainfrom
dev
Apr 29, 2026
Merged

Merge dev → main: respond-to-ci diagnostics + persona-scope hardening (#1235)#1236
zbigniewsobiecki merged 1 commit intomainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Closes the diagnostic gap that hid why ucho/PR#155's CI failure didn't trigger respond-to-ci. Three coordinated fixes:

  • A: Plumb structured `skipReason` through TriggerResult → registry → webhook-processor. Webhook log decisionReason now reports the specific reason a matched handler self-skipped, instead of the generic `'No trigger matched for event'`.
  • B: `resolvePersonaCached` no longer swallows persona-token-resolution errors silently — logs ERROR + Sentry-captures under tag `persona_identity_resolution_failed`.
  • C: `check-suite-failure.ts` and `pr-conflict-detected.ts` widen their PR-author gates from "implementer only" to "any cascade persona" via the existing `isCascadeBot()` helper.

🤖 Generated with Claude Code

…ason (#1235)

PR zbigniewsobiecki/ucho#155 had a CI failure that should have triggered
respond-to-ci. The webhook arrived; cascade-router logged
"No trigger matched for event" and bailed. The trigger DID match —
something inside the handler self-skipped, but the persisted webhook log
flattened the reason into the same generic string used when no matcher
matches at all. Debugging that required trawling cascade-router process
logs.

Three coordinated fixes:

A) Diagnostic upgrade. Extend TriggerResult with `skipReason: { handler,
   message }`. Handlers can return a structured skip instead of bare null;
   the registry returns the structured skip up the stack (terminating
   dispatch, not iterating further). webhook-processor.ts surfaces
   `Trigger ${handler} skipped: ${message}` in decisionReason. Bare
   `return null` keeps the legacy "try-next-handler" semantic for
   backward compatibility.

   Converted every return-null site in check-suite-failure.ts and
   pr-conflict-detected.ts to structured skips with specific messages
   (PR # included, attempt counts spelled out, base branches named).

B) Stop swallowing persona-resolution failures in
   `GitHubAdapter.resolvePersonaCached`. The bare `catch {}` made every
   downstream gate that depends on personaIdentities silently skip
   without any signal. Now logs ERROR + Sentry-captures under tag
   `persona_identity_resolution_failed`.

C) Widen the "PR author must be implementer persona" gate in both
   check-suite-failure.ts and pr-conflict-detected.ts to use the
   existing `isCascadeBot()` helper, matching either the implementer OR
   reviewer persona. The narrow check would have silently dropped any
   future PR authored by the reviewer persona; pr-comment-mention.ts and
   review-requested.ts already had the broader semantic.

For PR #155 specifically: aaight IS the implementer for ucho, so the
gate-widening (C) doesn't change the outcome — but with (A) shipped, any
re-run will report the actual reason in the dashboard webhook log.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 90.72165% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/router/adapters/github.ts 0.00% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@zbigniewsobiecki zbigniewsobiecki merged commit e13f090 into main Apr 29, 2026
15 checks 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