Skip to content

fix: add changed field to read-only provider results#205

Merged
retr0h merged 1 commit intomainfrom
fix/provider-changed-field
Mar 1, 2026
Merged

fix: add changed field to read-only provider results#205
retr0h merged 1 commit intomainfrom
fix/provider-changed-field

Conversation

@retr0h
Copy link
Collaborator

@retr0h retr0h commented Mar 1, 2026

Summary

  • Add Changed bool field to read-only provider structs (mem.Stats,
    load.AverageStats, dns.Config, ping.Result, host.OSInfo)
    matching the existing command.Result pattern
  • Add "changed": false to map-based processor results (hostname,
    status, uptime, disk)
  • Update processor tests to assert changed is present and correct
    in all read-only and mutator results
  • Bump osapi-sdk to latest (orchestrator changed detection fix)

Companion to osapi-io/osapi-sdk#12 which fixes the orchestrator to
extract changed from result data instead of hardcoding true.

Test plan

  • go build ./... compiles
  • go test ./internal/... all pass
  • just go::vet 0 issues
  • Read-only ops include changed: false in results
  • Mutator ops (dns.update) include changed: true in results

🤖 Generated with Claude Code

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>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

Thank you for contributing to this project! 😊🕹️

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           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           
Files with missing lines Coverage Δ
internal/agent/processor.go 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 934ba9c...fb8988e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@retr0h retr0h merged commit 09e0c98 into main Mar 1, 2026
9 checks passed
@retr0h retr0h deleted the fix/provider-changed-field branch March 1, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant