Skip to content

fix: make mihomo runtime artifacts binding-first#8

Merged
luoshuijs merged 2 commits intomainfrom
feature/unified-platform-remediation-v2
Apr 29, 2026
Merged

fix: make mihomo runtime artifacts binding-first#8
luoshuijs merged 2 commits intomainfrom
feature/unified-platform-remediation-v2

Conversation

@luoshuijs
Copy link
Copy Markdown
Contributor

Summary

  • Add binding-first runtime artifact schema, migration, and repository behavior.
  • Enforce default profile invariants and invalidate binding-scoped artifacts on bind/rebind.
  • Update integration coverage and CI Redis setup for binding-first runtime state.

Test Plan

  • go test ./...
  • go test -tags=integration ./integration/...
  • git diff -- go.mod go.sum produced no output

Signed-off-by: luoshui <luoshuijs@outlook.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 55.71429% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.44%. Comparing base (c4f9e87) to head (ebe0bfb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/data/artifact_repo.go 42.85% 55 Missing and 5 partials ⚠️
internal/data/profile_repo.go 72.88% 11 Missing and 5 partials ⚠️
internal/data/management_repo.go 69.69% 5 Missing and 5 partials ⚠️
internal/usecase/bind_usecase.go 40.00% 3 Missing and 3 partials ⚠️
cmd/platform-mihomo-service/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
+ Coverage   29.77%   32.44%   +2.66%     
==========================================
  Files          28       28              
  Lines        3140     3292     +152     
==========================================
+ Hits          935     1068     +133     
  Misses       2060     2060              
- Partials      145      164      +19     
Flag Coverage Δ
unit 32.44% <55.71%> (+2.66%) ⬆️

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.

MySQL 8.0 rejects SIGNAL inside PREPARE/EXECUTE with ER_UNSUPPORTED_PS (1295), so the binding-first migration prechecks always crashed with 'This command is not supported in the prepared statement protocol yet' instead of surfacing the descriptive '45000' error. The integration suite caught this for migration 000007 because those tests assert on the precheck message.

Move every precheck into a temporary stored procedure (CREATE PROCEDURE ... CALL ... DROP) where SIGNAL is fully supported, keeping the same SQLSTATE and human-readable messages. The static SQL guard regexes are updated for the new (single-quoted) SIGNAL form.

Signed-off-by: luoshui <luoshuijs@outlook.com>
@luoshuijs luoshuijs merged commit 2f467bc into main Apr 29, 2026
4 checks passed
@luoshuijs luoshuijs deleted the feature/unified-platform-remediation-v2 branch April 29, 2026 07:08
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