Skip to content

feat: enhanced notification categorization pipeline - #15

Merged
shanselman merged 1 commit into
masterfrom
feature-notification-categories
Feb 8, 2026
Merged

feat: enhanced notification categorization pipeline#15
shanselman merged 1 commit into
masterfrom
feature-notification-categories

Conversation

@shanselman

Copy link
Copy Markdown
Collaborator

Implements the layered notification categorization system from issue #12 and the spec in PR #14.

Changes

  • Layered pipeline: structured metadata (intent/channel) → user rules → keyword fallback → default
  • Chat toggle: \NotifyChatResponses\ setting to suppress chat response toasts while keeping system notifications
  • Extended model: \OpenClawNotification\ gains \Channel, \Agent, \Intent, \Tags\ fields (ready for gateway metadata)
  • User-defined rules: regex or keyword rules with per-rule enable/disable
  • Error → urgent mapping: \�rror\ type notifications follow the urgent setting
  • 30+ unit tests covering pipeline ordering, user rules, edge cases
  • Documentation: \docs/NOTIFICATION_CATEGORIZATION.md\ with full reference

Backward Compatibility

All new settings default to preserve current behavior. If no structured metadata arrives from the gateway, the system behaves identically to before.

Closes #12
See also: #14 (spec)

Replace keyword-only classification with a layered pipeline:
structured metadata (intent/channel) > user rules > keyword fallback.

- Add Channel, Agent, Intent, Tags fields to OpenClawNotification
- Extract NotificationCategorizer class with layered pipeline
- Add NotifyChatResponses toggle to suppress chat toasts
- Add UserNotificationRule model for custom regex/keyword rules
- Map error notifications to urgent setting
- Add 30+ unit tests for categorizer pipeline
- Document categorization system in docs/
@shanselman
shanselman merged commit 199f855 into master Feb 8, 2026
1 check passed
@shanselman
shanselman deleted the feature-notification-categories branch February 8, 2026 02:22
RBrid added a commit to RBrid/openclaw-windows-node that referenced this pull request May 22, 2026
Fixes from dual-model code review on user/regisb/WSLInstall1 branch.

openclaw#1 + openclaw#2 + openclaw#6: SuppressNodeAutoApprove (process-global bool, racy, idempotency-fragile) replaced with IDisposable AcquireNodeAutoApproveSuppression() using volatile int + Interlocked counter. Token Dispose is idempotent via Interlocked.Exchange. Local-loopback URL gate scopes suppression to ws://localhost / ws://127.* so manual operator connects to remote gateways still surface their pending-approval toast.

openclaw#3: ElevatedWslPlatformInstaller.RunDefaultAsync now wraps WaitForExitAsync in try/catch(OperationCanceledException), attempts best-effort Kill(entireProcessTree:true) on the launcher (will fail for the elevated child — documented), then rethrows so the engine surfaces Cancelled cleanly.

openclaw#4: ConfigureWslInstance failure remap to wsl_firstboot_config_failed_after_install is now gated on a stderr-signature check (LooksLikePostInstallKernelIssue: WslRegisterDistribution, Hyper-V, 0x80370102, kernel, vmcompute, LxssManager, instance-is-corrupted, etc). Unrelated configure failures (apt repo issues, script bugs) keep their original error code so users don't get a misleading 'reboot to fix' suggestion.

openclaw#5 + openclaw#15: New tests — Engine_SelfHeal_ResetsCancelledStatus, Engine_ConfigureFails_AfterJustInstalled_DoesNotRemapUnrelatedFailure, LooksLikePostInstallKernelIssue_MatchesKnownKernelSignatures, PairAsync_AwaitsConfiguredDelay, PairAsync_CancellationDuringDelay_Propagates.

openclaw#7: OnboardingV2Bridge now treats LocalGatewaySetupStatus.RequiresAdmin like other terminal/blocking statuses — surfaces error message via LocalizeFailureMessage and suppresses the running-phase info card.

openclaw#8: WslPlatformInstall DefaultPostInstallProbeAttempts comment rewritten to reflect real worst case (~33s, but typically 1–2 probes) rather than the misleading '6 × 500ms = 3s'.

openclaw#9: Extracted WslInstallCycleIssueCodes static class with const issue codes + IReadOnlySet<string> All. Replaced 5 duplicated string literals (top-level self-heal RemoveAll + 4 EnsureWslEnabled outcome branches) with the constants.

openclaw#10: CreateLocalOnly factory now reads OPENCLAW_PAIR_RETRY_DELAY_MS env var at wire-up and passes it as SettingsWindowsTrayNodeProvisioner pairRetryDelay so operators can tune the retry without rebuilding.

openclaw#11: LocalizeFailureMessage now exposes an isGenericFallback signal; MaybeAppendSetupDiagnosticsHint skips the 'Setup diagnostics: …' wrap when we returned the V2_Progress_GenericFailure placeholder (the generic message already directs to logs).

openclaw#13: SetupExistingGatewayClassifier.ClassifyAsync accepts an optional IOpenClawLogger so WSL probe failures surface in the diagnostic stream instead of being silently swallowed by NullLogger.

openclaw#14: ComputeInfoMessage phase predicate tightened to (status==Running && phase<=EnsureWslEnabled) so the 'Check system' hint stops once the engine moves past EnsureWslEnabled, including transient non-Running states between phases.

openclaw#16: Preflight port-probe (host-side TCP check) now runs unconditionally rather than being gated on WSL platform.State==Installed, so users find out about host-side port conflicts before spending 30+ seconds on WSL install.

Validation: build.ps1 green; Shared 1891/29 skipped, Tray 1217 (+5), Connection 229 all pass; ARM64 publish succeeds.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhanced notification categorization system

1 participant