[Spec 13] feat: filter notifications by conclusion (v0.6.0)#14
Merged
waleedkadous merged 9 commits intoApr 18, 2026
Merged
Conversation
…ce, scheduled) to default exclusion set
Contributor
Author
Architect Integration ReviewVerdict: APPROVE (medium risk, single-model review) SummaryClean, well-patterned feature that mirrors existing codebase conventions ( Architectural fit
Migration
Follow-ups (non-blocking)
Architect integration review |
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
Adds a
--conclusionsCLI flag (with matchingCONCLUSIONSenv var) that filtersci-channelnotifications by CI run outcome. The channel is marketed as a CI failure alerting tool, but it previously forwarded everyworkflow_run/ pipeline event regardless of outcome. This PR aligns the implementation with the stated intent.Closes #13. Ships as v0.6.0 (minor — user-visible behavior change).
Behavior change
success,skipped,neutral,manual,stale, plus in-progress states (requested,in_progress,completed,running,pending,queued,waiting,preparing) are dropped. Unknown strings are forwarded (fail-open for novel forge outcomes).--conclusions allrestores pre-0.6.0 behavior (forward everything).--conclusions failure,successforwards just those two.Values are case-insensitive and normalized for cross-forge terminology (
failed≡failure,canceled≡cancelled).Changes
Production
lib/webhook.ts— newnormalizeConclusion+isConclusionAllowedhelpers (forge-agnostic)lib/config.ts— newconclusions: string[] | nullfield,--conclusionsflag,CONCLUSIONSenv var, normalization + mixed-allrejection at load timelib/handler.ts— new filter step 6 (between workflow filter and notification)lib/bootstrap.ts—formatConclusionsSummaryhelper; startup banner includes the active filter descriptionREADME.md,INSTALL.md,CLAUDE.md,AGENTS.mdupdated with flag docs + v0.6.0 upgrade notepackage.json/package-lock.json→0.6.0Tests (237 total, +36 new, 0 failures)
tests/webhook.test.ts— 16 pure-function tests coveringnormalizeConclusion+ all default / explicit /all/ cross-forge / unknown-value casestests/config.test.ts— 8 config-layer integration tests (precedence, normalization,all-sentinel validation, env-over-.env)tests/integration.test.ts— 4 handler-integration tests covering filter on/off for success + failure eventstests/integration-gitlab.test.ts— 1 cross-forge test (GitLab'sfailed/runningnormalizes through filter correctly)tests/bootstrap.test.ts— 4 tests coveringformatConclusionsSummary+ banner integrationconclusionsfield added to 7 existingConfigfixturesTesting
npm run build— passes (TypeScript compilation clean)npm test— 237 passed, 0 failed, 2 pre-existing skippednpx tsx server.ts --conclusions failure,allerrors with the documented message;--conclusions failureloads cleanlyDocs
codev/specs/13-feat-filter-notifications-by-c.mdcodev/plans/13-feat-filter-notifications-by-c.mdcodev/reviews/13-feat-filter-notifications-by-c.mdUpgrade note
Pre-0.6.0 users who relied on the prior "every event forwarded" behavior: add
--conclusions allto your.mcp.jsonargs. This is the documented escape hatch and is the only backwards-compatibility knob.