Skip to content

[Repo Assist] fix: ClassifyByKeywords recognises CI/CD patterns (ci/ prefix)#147

Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/fix-classify-ci-cd-2026-04-05-4394ca0f5d6376db
Draft

[Repo Assist] fix: ClassifyByKeywords recognises CI/CD patterns (ci/ prefix)#147
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/fix-classify-ci-cd-2026-04-05-4394ca0f5d6376db

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 5, 2026

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

NotificationCategorizer.ClassifyByKeywords checked for "ci " (trailing space) to detect CI-related build notifications, but missed the common "CI/CD" pattern where CI is immediately followed by a slash.

Root Cause

// Before: only matches "ci " — misses "CI/CD pipeline completed"
text.Contains("ci ", StringComparison.OrdinalIgnoreCase) ||

A message like "CI/CD pipeline completed" contains "ci/" but not "ci ", so it fell through to the default "info" category instead of "build".

Fix

// After: also matches "CI/CD ..." patterns
text.Contains("ci ", StringComparison.OrdinalIgnoreCase) ||
text.Contains("ci/", StringComparison.OrdinalIgnoreCase) ||

False-positive analysis: Common English words containing cirecipe, social, special, facial, official — are never followed by / in normal usage, so the new check introduces no false matches.

Priority note: The keyword fallback is the last-resort path. Structured metadata (Intent/Channel) takes priority and is unaffected. The fix only improves backwards-compatible plain-text message classification.

Regression Tests

Two new InlineData entries added to KeywordFallback_BackwardCompatible:

  • "CI/CD pipeline completed""build"
  • "CI/CD workflow triggered""build"

Test Status

Suite Before After
OpenClaw.Shared.Tests 525 passed, 20 skipped 527 passed, 20 skipped (+2)
OpenClaw.Tray.Tests 99 passed 99 passed (no change)

All tests pass. Only NotificationCategorizer.cs (production) and NotificationCategorizerTests.cs (test) were modified.

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64

'CI/CD pipeline completed' was not classified as build because
ClassifyByKeywords only checked for 'ci ' (trailing space), missing
the 'CI/CD' style where a slash follows 'CI'.

Adding the 'ci/' check catches:
  - 'CI/CD pipeline completed'
  - 'CI/CD workflow triggered'
  - Any pattern where 'CI' is immediately followed by a slash

False-positive analysis: common English words containing 'ci' (recipe,
social, special, facial...) are followed by letters, not '/', so the
new check introduces no false matches.

Regression tests: two new InlineData entries in KeywordFallback_BackwardCompatible.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants