chore(info): Adding invocation_method and in-flight status_info#86
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances enterprise telemetry reporting by adding (1) an invocation_method field to distinguish scheduled vs. manual runs and (2) in-flight status_info progress snapshots (phase completions + elapsed time) posted to the run-status endpoint and embedded in the final telemetry payload.
Changes:
- Add invocation-method detection (
installvsone_time) and include it in both run-status posts and the final telemetry payload. - Introduce phase tracking with periodic heartbeats and phase-boundary progress upserts via
/telemetry/run-status. - Add scanner sub-progress hooks (Python/Node) to surface in-phase detail in
status_info, plus new unit tests for tracker/hook/shutdown behavior.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/telemetry/telemetry.go | Adds invocation detection, phase tracking, heartbeat progress posting, and payload stamping. |
| internal/telemetry/telemetry_test.go | Updates uploadToS3 tests for new function signature. |
| internal/telemetry/run_status.go | Adds runStatusBody, invocation_method, progress posting (status_info), and heartbeat interval constants. |
| internal/telemetry/run_status_test.go | Updates existing tests for new signature and adds new tests for invocation/progress behavior. |
| internal/telemetry/progress_hook_test.go | New test validating ProgressHook → tracker detail propagation. |
| internal/telemetry/phase_tracker.go | New PhaseTracker + RunStatusInfo model for progress snapshots. |
| internal/telemetry/phase_tracker_test.go | New unit tests covering tracker behavior, copying, and concurrency safety. |
| internal/telemetry/invocation.go | New invocation-method detection logic across darwin/linux/windows. |
| internal/telemetry/invocation_test.go | New tests for invocation detection and fileExists helper. |
| internal/telemetry/heartbeat_shutdown_test.go | New regression test for correct cancel-then-wait heartbeat shutdown pattern. |
| internal/systemd/systemd.go | Exposes TimerUnitPath for invocation detection. |
| internal/schtasks/schtasks.go | Adds IsTaskRegistered for Windows invocation detection. |
| internal/launchd/launchd.go | Exposes launchd plist paths for invocation detection and hardens home-dir resolution. |
| internal/detector/pythonscan.go | Adds ProgressHook to emit sub-progress from Python global package scanning. |
| internal/detector/nodescan.go | Adds ProgressHook to emit sub-progress during Node global/project scans. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ashishkurmi
approved these changes
May 22, 2026
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.
What does this PR do?
Type of change
Testing
./stepsecurity-dev-machine-guard --verbose./stepsecurity-dev-machine-guard --json | python3 -m json.toolmake lintmake testRelated Issues