Repository navigation
Complete all activation rollback stages and preserve original errors - #42
Conversation
Track provider and scope ownership until activation publication so partial construction cleanup independently releases scope, provider, and host-created configuration in reverse order. Preserve the original activation failure and retain cleanup diagnostics without invoking hooks for unpublished activations. Add fault-injection coverage for DI scope, provider, and configuration disposal, configure failures, and module rollback followed by successful re-enable. Document the construction ownership boundary and synchronous DI disposal responsibilities.
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe plugin now tracks activation construction resources before publication. Failed construction performs reverse-order cleanup for acquired stages, preserves the original error, and records cleanup failures. Documentation and tests cover ownership, disposal failures, and retry after module-enable failure. ChangesActivation rollback
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant CheatEngineClientPlugin
participant ActivationConstruction
participant ConfigurationManager
participant Module
CheatEngineClientPlugin->>ActivationConstruction: construct and track activation resources
ActivationConstruction->>ConfigurationManager: retain host-created configuration
ActivationConstruction-->>CheatEngineClientPlugin: construction failure
CheatEngineClientPlugin->>ActivationConstruction: clean unpublished activation
ActivationConstruction->>ConfigurationManager: dispose configuration
CheatEngineClientPlugin->>Module: skip callbacks before publication
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 13.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 2 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Summary
Completes the activation-construction rollback gap identified by architecture finding R04 / qualification scenarios T007–T008.
Validation matrix
FailedConstructionCleansEveryAcquiredStageAndAllowsANewEnableEpochasserts all three cleanup attempts, exception order, inactive state, and a later successful enable.ConfigureFailureRemainsPrimaryWhenConfigurationReleaseAlsoFailsretains the configure failure as primary.FailedModuleEnableRollsBackAndTheSamePluginCanEnableAgainvalidates compensation and a clean next epoch.Commands
dotnet restore CheatEngine.Client.slnx --locked-mode— passed.dotnet build CheatEngine.Client.slnx --configuration Release --no-restore --warnaserror— passed (0 warnings, 0 errors).dotnet test --project tests/CheatEngine.Client.Hosting.Tests/CheatEngine.Client.Hosting.Tests.csproj --configuration Release— passed (18/18).dotnet test --solution CheatEngine.Client.slnx --configuration Release --no-build— 512 passed, 1 unrelated pre-existing failure: Lua generator snapshot expects CRLF while generated output is LF. This is outside #22 and unchanged by this PR.Scope and limits
The change is managed-only, synchronous, and AOT-compatible; it does not alter SDK ownership, native cleanup, capabilities, or package contents. Hosting continues to own its manually created
ConfigurationManager, while the DI container owns services it creates.Closes #22
Summary by CodeRabbit
Bug Fixes
Documentation