fix: add changed field to read-only provider results#205
Merged
Conversation
Read-only processor results were missing the changed field, causing the orchestrator to default all completed ops to changed=false (previously hardcoded true). Mutator providers (dns.update, command.exec) already included changed in their results. - Add Changed bool `json:"changed"` to mem.Stats, load.AverageStats, dns.Config, ping.Result, host.OSInfo (Go zero value = false) - Add "changed": false to map-based results in processor.go (hostname, status, uptime, disk) - Update processor tests to assert changed is present and correct - Bump osapi-sdk to latest (orchestrator changed detection fix) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Thank you for contributing to this project! 😊🕹️ |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #205 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 136 136
Lines 5035 5039 +4
=======================================
+ Hits 5032 5036 +4
Misses 2 2
Partials 1 1
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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.
Summary
Changed boolfield to read-only provider structs (mem.Stats,load.AverageStats,dns.Config,ping.Result,host.OSInfo)matching the existing
command.Resultpattern"changed": falseto map-based processor results (hostname,status, uptime, disk)
changedis present and correctin all read-only and mutator results
changeddetection fix)Companion to osapi-io/osapi-sdk#12 which fixes the orchestrator to
extract
changedfrom result data instead of hardcodingtrue.Test plan
go build ./...compilesgo test ./internal/...all passjust go::vet0 issueschanged: falsein resultschanged: truein results🤖 Generated with Claude Code