Skip to content

feat: add isElevated and heciAvailable to deviceInfo - #1306

Merged
sinchubhat merged 1 commit into
mainfrom
issue1613-rpc-go
Oct 16, 2026
Merged

sinchubhat merged 1 commit into
mainfrom
issue1613-rpc-go

Conversation

@sinchubhat

@sinchubhat sinchubhat commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Accept, persist, and expose isElevated and heciAvailable in DeviceInfo so Console can distinguish unprivileged rpc-go discovery runs from genuine non-AMT/non-vPro devices.

Related to device-management-toolkit/rpc-go#1613
Companion PR:
device-management-toolkit/rpc-go#1614

@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.17%. Comparing base (46b1d54) to head (99f0ad2).

Files with missing lines Patch % Lines
internal/controller/openapi/devices.go 50.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1306   +/-   ##
=======================================
  Coverage   62.16%   62.17%           
=======================================
  Files         159      159           
  Lines       13401    13414   +13     
=======================================
+ Hits         8331     8340    +9     
- Misses       5070     5074    +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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.

🟡 Changes recommended

Exports discard heciAvailable:false, and the required Postman API contract was not updated.

2 open findings
What changed in this PR

Adds privilege and HECI availability signals to DeviceInfo for rpc-go discovery reporting.

Changes:

  • Persists and merges both nullable boolean fields.
  • Exposes them through APIs, exports, and OpenAPI examples.
  • Adds serialization and merge tests.
File Description
internal/​usecase/​devices/​usecase.go Adds partial-update field setters.
internal/​usecase/​devices/​usecase_private_test.go Tests false-value merging.
internal/​entity/​dto/​v1/​export.go Adds fields to export DTOs.
internal/​entity/​dto/​v1/​device.go Adds fields to DeviceInfo.
internal/​entity/​dto/​v1/​device_test.go Tests JSON round-tripping.
internal/​controller/​openapi/​devices.go Updates OpenAPI examples.
internal/​controller/​httpapi/​v1/​export.go Maps fields into device exports.

🧠 Review effort: Balanced


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

Comment thread internal/controller/httpapi/v1/export.go Outdated
Comment thread internal/entity/dto/v1/device.go

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.

🟡 Changes recommended

The false-valued IsElevated export path needs an analogous regression test.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced

Comment thread internal/controller/httpapi/v1/export.go
Accept, persist, and expose isElevated and heciAvailable in DeviceInfo so Console can distinguish unprivileged rpc-go discovery runs from genuine non-AMT/non-vPro devices.

Related to device-management-toolkit/rpc-go#1613

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.

🟢 Approval recommended

The implementation preserves tri-state semantics and consistently updates persistence, API contracts, exports, and tests.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@sinchubhat
sinchubhat marked this pull request as ready for review October 14, 2026 05:48
@sinchubhat
sinchubhat requested a review from a team as a code owner October 14, 2026 05:48
@sinchubhat
sinchubhat merged commit 59c10e0 into main Oct 16, 2026
40 of 43 checks passed
@sinchubhat
sinchubhat deleted the issue1613-rpc-go branch October 16, 2026 04:49
@RosieAMT

Copy link
Copy Markdown

🎉 This PR is included in version 1.46.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console does not know whether rpc-go ran with elevated privileges

5 participants