Skip to content

Improve discovery presence diagnostics - #47

Merged
Boussetta merged 10 commits into
mainfrom
chore/improve-development-workspace
Sep 9, 2026
Merged

Boussetta merged 10 commits into
mainfrom
chore/improve-development-workspace

Conversation

@Boussetta

Copy link
Copy Markdown
Owner

Summary

  • Exclude inactive neighbors from the visible network map.
  • Log discovery poll counts and join/left event identities.
  • Improve diagnostics for cached Windows neighbor entries that can outlive a disconnected device.

Validation

  • MSVC Debug tray target compilation succeeded.
  • All 6 CTest tests passed.

The branch also contains the prior workspace, version metadata, logging, and CLI verbosity improvements.

Copilot AI lite review requested due to automatic review settings September 9, 2026 10:22
Copilot AI previously approved these changes Sep 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The changes appear functionally coherent and tested, with only minor formatting issues called out in review comments.

Pull request overview

This PR improves LinkPulse’s “discovery presence” diagnostics and runtime observability, primarily by filtering inactive discovery entries out of the visible network map and adding richer, more structured logging across the tray, CLI, and Windows platform adapters. It also refines version/build metadata reporting (git description vs. release tag) and adds build-time artifact reporting to support diagnostics.

Changes:

  • Filter inactive discovery neighbors before publishing map data, and log discovery poll/event details in the tray runtime.
  • Expand logging/diagnostics: timestamped core logger output, tray/update/discovery lifecycle logs, and config load/save diagnostics.
  • Improve build/version metadata: --version shows git description for local builds, add release-build mode, and emit an artifact report during builds.
File summaries
File Description
tests/test_sampler.c Adds scenario documentation comments for sampler tests.
tests/test_format.c Adds documentation comment for formatting test helpers.
tests/test_discovery.c Adds documentation comments describing discovery test intent.
tests/test_core.c Extends logging tests (including file sink) and adds clarifying comments.
tests/test_config.c Adds clarifying comments for config contract tests.
tests/test_clock.c Adds a clarifying comment for the Windows clock test.
src/ui/tray_win32.c Adds sampler/update/discovery diagnostics; filters inactive neighbors from published map state.
src/ui/network_map_win32.h Adds API comments for map creation/show calls.
src/ui/network_map_win32.c Adds internal documentation comments for map rendering helpers.
src/platform/win32/update_win32.c Adds documentation comments and logs for update parsing/flows.
src/platform/win32/shortcut_win32.c Adds documentation comment and log for toast shortcut registration.
src/platform/win32/notification_win32.c Adds documentation comments around toast/WinRT glue and fallbacks.
src/platform/win32/net_win32.c Adds documentation comments for snapshot/default-route functions.
src/platform/win32/log_win32.c Adds documentation comments for starting/stopping per-user log file.
src/platform/win32/discovery_win32.c Adds documentation comments describing neighbor filtering/enrichment steps.
src/platform/win32/config_win32.c Adds debug logs for config load/save and includes core logger header.
src/platform/win32/clock_win32.c Adds documentation comment for overflow-safe tick conversion.
src/platform/win32/autostart_win32.c Adds documentation comments for autostart registry handling.
src/platform/win32/activation_win32.c Adds documentation comments for COM activation plumbing.
src/core/status.c Adds documentation comment for status-to-string mapping.
src/core/sampler.c Adds documentation comments for sampler responsibilities and helpers.
src/core/net.c Adds documentation comments for list free/find helpers.
src/core/log.c Adds full timestamp formatting, log flushing, and minor API hardening for level setting.
src/core/format.c Adds documentation comment for rate formatting behavior.
src/core/discovery.c Adds documentation comments for baseline and reconciliation behavior.
src/core/config.c Adds documentation comments for defaults/parse/serialize helpers.
src/cli/tray_main.c Adds CLI logging arg parsing and additional tray entry logging (plus formatting fixes requested).
src/cli/main.c Adds --verbosity, emits richer mode start diagnostics, and uses git description for --version (plus formatting fixes requested).
README.md Documents git description vs. release version behavior.
packaging/build-installer.ps1 Enables release-build mode for installer builds and optionally wires clang-format.
include/linkpulse/update.h Adds API comment for installer download function.
include/linkpulse/status.h Adds API comment for status string helper.
include/linkpulse/shortcut.h Adds API comment for toast shortcut registration.
include/linkpulse/platform_log.h Adds API comments for platform log lifecycle.
include/linkpulse/notification.h Adds API comments for app ID and toast helpers.
include/linkpulse/net.h Adds API comments for snapshot free/find helpers.
include/linkpulse/log.h Adds API comments for log level/get/file sink.
include/linkpulse/discovery.h Adds API comments for init/sources/poll and platform snapshot functions.
include/linkpulse/config.h Adds API comment for defaults initializer.
include/linkpulse/activation.h Adds API comment for COM activator entrypoint.
docs/architecture.md Adds architecture documentation for module boundaries and runtime flows.
CMakeLists.txt Adds release-build option, derives git description, and adds an artifact-report custom target.
cmake/report_artifacts.cmake New script to print artifact paths/sizes/sections and version metadata.
.vscode/launch.json Changes VS Code debug configs to stop at entry.
.github/workflows/release.yml Ensures release workflow configures LINKPULSE_RELEASE_BUILD=ON.
Review details

Suppressed comments (1)

src/cli/tray_main.c:127

  • This LP_INFO block has an extra indentation level compared to the surrounding statements (it’s aligned as if it were inside another scope). That inconsistency makes later edits error-prone.
        LP_INFO("starting tray: selection=%d iface=%s virtual=%s bits=%s interval_ms=%u",
            sampler_config.mode,
            sampler_config.iface_name[0] != '\0' ? sampler_config.iface_name : "(default)",
            sampler_config.include_virtual ? "yes" : "no", config.use_bits ? "yes" : "no",
            config.interval_ms);
  • Files reviewed: 45/45 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/cli/main.c Outdated
Comment thread src/cli/tray_main.c Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Boussetta
Boussetta merged commit e8a00d3 into main Sep 9, 2026
1 of 2 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.

2 participants