Repository navigation
Compose Client through DI and plugin Hosting - #4
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 (43)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughChangesClient composition and hosting
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Plugin
participant Builder
participant Provider
participant Lifecycle
participant Modules
Plugin->>Builder: Configure activation
Builder->>Provider: Build validated service provider
Provider-->>Plugin: Resolve client and lifecycle services
Plugin->>Lifecycle: Enable activation
Lifecycle->>Modules: Enable modules in registration order
Plugin->>Lifecycle: Disable activation
Lifecycle->>Modules: Disable modules in reverse order
Lifecycle-->>Plugin: Return cleanup failures
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 23.66% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 93 functions across 19 files. (24 skipped: 24 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
3d008f3 to
02602ef
Compare
d13e201 to
eee9be3
Compare
02602ef to
8770399
Compare
eee9be3 to
b4f0f97
Compare
8770399 to
77b2803
Compare
b4f0f97 to
da651d1
Compare
77b2803 to
e4c30eb
Compare
da651d1 to
12e4ea4
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Add the activation-scoped composition and plugin hosting layers. CheatEngineClientBuilder configures explicit codecs, modules, options, logging, trusted table roots, and unsafe-Lua policy. AddCheatEngineClient wires the Core dependencies into one per-activation client. CheatEngineClientPlugin builds a validated scoped provider on enable, enables modules deterministically, rolls back failures, drains owned Cheat Engine resources while the SDK context remains valid, and disposes services on disable. The aggregate CheatEngine.Client package now re-exports Fluent and Hosting as the consumer entry point. Tests cover options, codec registration, dependency graph composition, module order, activation cleanup, and public SDK-handle boundaries. Validation: - dotnet build libs/CheatEngine.Client.Extensions.DependencyInjection/CheatEngine.Client.Extensions.DependencyInjection.csproj --configuration Release --no-restore --warnaserror - dotnet build libs/CheatEngine.Client.Hosting/CheatEngine.Client.Hosting.csproj --configuration Release --no-restore --warnaserror - dotnet test --project tests/CheatEngine.Client.Extensions.DependencyInjection.Tests/CheatEngine.Client.Extensions.DependencyInjection.Tests.csproj --configuration Release --no-build --no-restore --fail-skips on - dotnet test --project tests/CheatEngine.Client.Hosting.Tests/CheatEngine.Client.Hosting.Tests.csproj --configuration Release --no-build --no-restore --fail-skips on - dotnet test --project tests/CheatEngine.Client.Tests/CheatEngine.Client.Tests.csproj --configuration Release --no-build --no-restore --fail-skips on
Make the nullable allowed-root configuration truthful and keep the service factory defensive after generated option validation. Restrict the abstract plugin constructor to derived plugins and replace the throwing Client property with an explicit lifecycle-checked method.
751fb56 to
8c43bf3
Compare
Resolve the PR #4 DI and Hosting review findings without widening the stacked-branch scope.\n\nRemove unconsumed scan-limit settings and prevent configuration binding from activating unsafe Lua. The explicit builder opt-in now establishes the unsafe facade and Core policy together. Register lifecycle modules in the activation scope so they can consume scoped application services, and classify malformed table-root paths as validation failures.\n\nAdd stable Sonar project identifiers for the DI and Hosting assemblies, clarify lifecycle cleanup documentation, update the shipped API baseline and package guidance, and cover the configuration, scoped-module, malformed-path, and hosting-binding regressions.\n\nValidation:\n- dotnet restore CheatEngine.Client.slnx --locked-mode\n- dotnet build CheatEngine.Client.slnx --configuration Release --no-restore --warnaserror\n- DI tests: 22 passed, 0 failed, 0 skipped\n- Hosting tests: 8 passed, 0 failed, 0 skipped\n- git diff --check
12e4ea4 to
6febb6d
Compare
Resolve the PR #4 DI and Hosting review findings without widening the stacked-branch scope.\n\nRemove unconsumed scan-limit settings and prevent configuration binding from activating unsafe Lua. The explicit builder opt-in now establishes the unsafe facade and Core policy together. Register lifecycle modules in the activation scope so they can consume scoped application services, and classify malformed table-root paths as validation failures.\n\nAdd stable Sonar project identifiers for the DI and Hosting assemblies, clarify lifecycle cleanup documentation, update the shipped API baseline and package guidance, and cover the configuration, scoped-module, malformed-path, and hosting-binding regressions.\n\nValidation:\n- dotnet restore CheatEngine.Client.slnx --locked-mode\n- dotnet build CheatEngine.Client.slnx --configuration Release --no-restore --warnaserror\n- DI tests: 22 passed, 0 failed, 0 skipped\n- Hosting tests: 8 passed, 0 failed, 0 skipped\n- git diff --check
6febb6d to
0e70fc2
Compare
Complete the release-facing repository shape after the modular client layers are in place. The solution now replaces the legacy Binding project with Core, publishes the template package and a Native AOT compatibility probe, adds package/template smoke scripts, and updates CI into reusable main and pull-request workflows. The canonical ceplugin template demonstrates explicit JSON configuration, DI modules, safe Lua module registration, direct SDK reference requirements, and managed-plugin deployment. The root documentation and ADR set now describe the package graph, activation lifecycle, capability gates, delivery policy, and local authorized-process boundary. Validation: - dotnet build CheatEngine.Client.slnx --configuration Release --no-restore --warnaserror - dotnet test --solution CheatEngine.Client.slnx --configuration Release --no-build --no-restore --report-trx --results-directory artifacts/test-results --fail-skips on - dotnet pack CheatEngine.Client.slnx --configuration Release --no-build --no-restore --output artifacts/packages - eng/Invoke-PackageSmoke.ps1 -PackageSource artifacts/packages - eng/Invoke-TemplateSmoke.ps1 -PackageSource artifacts/packages - dotnet publish tests/CheatEngine.Client.AotProbe/CheatEngine.Client.AotProbe.csproj --configuration Release --runtime win-x64 --no-restore --output artifacts/aot-probe - artifacts/aot-probe/CheatEngine.Client.AotProbe.exe
Run the scanner around a locked Release build and native-MTP Cobertura test execution, then publish the reports as a retained workflow artifact. Keep the CECLIENT001 negative package smoke check strict while clearing its expected native-command exit status only after the diagnostic is verified.
Make missing TRX output a hard validation failure and move Sonar's JDK setup to the immutable Node 24-compatible setup-java v6.0.1 revision. Let generated-plugin Lua lease disposal reach the activation lifecycle for aggregation, document the generated callbacks and exports, correct the Native AOT publish invocation, and restore the façade package guidance for the required direct SDK reference.
Add delivery pipeline and ceplugin template
|



Context
This stacked PR connects the Core implementation (#2) and Fluent API (#3) to dependency injection and the Cheat Engine plugin lifecycle.
Why this exists
Cheat Engine constructs plugins with a parameterless constructor, but application services still need validated, scoped dependency injection. The Client must also guarantee that SDK-dependent resources are released before Cheat Engine tears down its Lua context.
What changed
AddCheatEngineClientand a strongly typed builder for options, codecs, modules, logging, policy, and unsafe-Lua opt-in.ICheatEngineClientfacade.CheatEngineClientPlugin, which creates a fresh provider/scope per enable epoch and performs reverse-order module cleanup on disable or rollback.CheatEngine.Clientmeta-package as the consumer entry point.CECLIENT001build-transitive validation for plugin projects that omit their required direct SDK package reference.Lifecycle guarantee
Disable closes admissions, runs application/module cleanup, drains owned CE resources while the SDK context is still valid, and only then disposes the scoped provider and configuration.
Validation
Dependency
Base branch:
client-fluent-api/ #3. Merge after #3.Summary by CodeRabbit
New Features
Documentation
Tests