Skip to content

Remediate Mihomo platform grant handling#7

Merged
luoshuijs merged 13 commits intomainfrom
feature/unified-platform-remediation
Apr 28, 2026
Merged

Remediate Mihomo platform grant handling#7
luoshuijs merged 13 commits intomainfrom
feature/unified-platform-remediation

Conversation

@luoshuijs
Copy link
Copy Markdown
Contributor

Summary

  • Implement platform consumer grant invalidation persistence and RPC handling.
  • Move Mihomo runtime credentials/devices/profiles to binding-first semantics with migration prechecks.
  • Enforce binding-wide profile mutations, align advertised scopes, and harden stale-ticket checks.

Test Plan

  • GOWORK=off go test ./...
  • GOWORK=off go test -tags=integration ./integration/...

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 47.95082% with 127 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.77%. Comparing base (7babc70) to head (e65f236).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/usecase/management_usecase.go 11.11% 28 Missing and 4 partials ⚠️
internal/usecase/profile_usecase.go 6.66% 28 Missing ⚠️
internal/service/platform_service_adapter.go 45.94% 12 Missing and 8 partials ⚠️
internal/data/management_repo.go 34.61% 11 Missing and 6 partials ⚠️
internal/data/profile_repo.go 12.50% 14 Missing ⚠️
internal/data/device_repo.go 56.25% 6 Missing and 1 partial ⚠️
cmd/platform-mihomo-service/main.go 0.00% 3 Missing ⚠️
internal/data/grant_invalidation_repo.go 92.00% 1 Missing and 1 partial ⚠️
internal/data/ticket_verifier.go 85.71% 1 Missing and 1 partial ⚠️
internal/service/mihomo_credential_service.go 50.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   27.93%   29.77%   +1.84%     
==========================================
  Files          27       28       +1     
  Lines        2950     3140     +190     
==========================================
+ Hits          824      935     +111     
- Misses       1997     2060      +63     
- Partials      129      145      +16     
Flag Coverage Δ
unit 29.77% <47.95%> (+1.84%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@luoshuijs luoshuijs merged commit c4f9e87 into main Apr 28, 2026
4 checks passed
@luoshuijs luoshuijs deleted the feature/unified-platform-remediation branch April 28, 2026 10:31
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.

1 participant