Skip to content

Align process failures with dispatcher semantics - #43

Merged
AriusII merged 1 commit into
mainfrom
fix/cli-004-process-failure-semantics
Sep 21, 2026
Merged

AriusII merged 1 commit into
mainfrom
fix/cli-004-process-failure-semantics

Conversation

@AriusII

@AriusII AriusII commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • return expected current-target observations as typed results outside the dispatched callback
  • preserve callback and unexpected host exceptions exactly as the dispatcher contract requires
  • classify no target and disappeared local metadata as TargetNotAttached, inconsistent metadata as InvalidHostResult, and an attach selecting another PID as OperationRejected
  • make the ProcessClient inline test dispatcher rethrow callback exceptions and add production-dispatcher compositions with a deterministic invoker
  • document the public dispatcher and process Try... contracts

Evidence

This resolves the Client-side R02/R03 mismatch from the architecture review. The focused tests cover PID zero, a process disappearing before refresh and after attach, inconsistent metadata, selected-PID mismatch, cancellation before dispatch admission, and exception identity preservation.

Validation

  • dotnet restore CheatEngine.Client.slnx --locked-mode
  • dotnet build CheatEngine.Client.slnx --configuration Release --no-restore — 0 warnings, 0 errors
  • dotnet test --project tests\CheatEngine.Client.Core.Tests\CheatEngine.Client.Core.Tests.csproj --configuration Release --no-build — 233 passed
  • dotnet test --solution CheatEngine.Client.slnx --configuration Release --no-build — 515 passed; one pre-existing SourceGenerator snapshot failure remains (expected CRLF versus actual LF in ModuleAdapterSnapshotUsesOneAdmittedOperationAndPreflightsEveryExport), outside this PR

Scope and limits

These are deterministic managed compositions, not live Cheat Engine qualification. No target identity guarantee, automatic retry, SDK ABI mapping, or CLI-021 stale-client policy is introduced.

Closes #20

Summary by CodeRabbit

  • Bug Fixes

    • Improved process attach and refresh handling when targets disappear, metadata is unavailable, or a different process is selected.
    • Cancellations and dispatcher infrastructure failures now report predictable operation failures.
    • Unexpected callback and host exceptions continue to propagate unchanged.
    • Process selection is invalidated appropriately when refresh cannot confirm the selected target.
  • Documentation

    • Clarified failure, cancellation, exception, and selection-lifecycle behavior for process and dispatcher operations.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: dd529bbe-5845-4dc1-9faf-4e9a5054209a

📥 Commits

Reviewing files that changed from the base of the PR and between 5a40f3e and 7bd4128.

📒 Files selected for processing (5)
  • libs/CheatEngine.Client.Abstractions/Dispatching/ICheatEngineDispatcher.cs
  • libs/CheatEngine.Client.Abstractions/Processes/IProcessClient.cs
  • libs/CheatEngine.Client.Core/Domains/ProcessClient.cs
  • tests/CheatEngine.Client.Core.Tests/Dispatching/SdkMainThreadDispatcherBehaviorTests.cs
  • tests/CheatEngine.Client.Core.Tests/Domains/ProcessClientTests.cs
 _________________________________________________________________________________________________________________
< Iterate the schedule with the code. Use experience you gain as you implement to refine the project time scales. >
 -----------------------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@AriusII
AriusII merged commit b9c8b1b into main Sep 21, 2026
4 of 5 checks passed
@AriusII
AriusII deleted the fix/cli-004-process-failure-semantics branch September 21, 2026 21:15
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