Skip to content

Preserve process command in blocked-process D-Bus logs #149

Description

@coderabbitai

Summary

Correct the blocked-process log field mapping.

When Wayland app-ID lookup succeeds, the report path currently stores the Wayland app ID in both LogEntry.comm and LogEntry.wayland_app_id. Preserve the process command in LogEntry.comm when it is available.

Rationale

D-Bus clients need both values. comm identifies the process command. wayland_app_id identifies the Wayland application. Using the app ID for both fields loses process-command information.

Affected area

  • crates/cardwire-daemon/src/analyzer/models.rs
  • The Wayland-success path in CardwireAnalyzer::report_logger
  • report_blocked call arguments

Required changes

  • Get the process command independently of the Wayland app-ID lookup.
  • When both values are available, pass the process command as name and the Wayland app ID as wayland_app_id to report_blocked.
  • Preserve the existing fallback behavior when only one value is available.

Acceptance criteria

  • LogEntry.comm contains the process command when the command can be resolved.
  • LogEntry.wayland_app_id contains the Wayland app ID when lookup succeeds.
  • D-Bus consumers can receive distinct values for the two fields.
  • Add or update tests for the field mapping where practical.

Backlinks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions