[PROVES EFT-3295 #1226] Abandon tests fail on main as it stands — do not merge#1241
Open
jimmyp wants to merge 1 commit into
Open
[PROVES EFT-3295 #1226] Abandon tests fail on main as it stands — do not merge#1241jimmyp wants to merge 1 commit into
jimmyp wants to merge 1 commit into
Conversation
Open
This branch carries the two abandon integration tests plus only the stubs needed to make them compile and run. Behaviour-bearing types are left as no-ops: - AbandonScript RPC declarations exist but the server impl returns a status snapshot without firing any abandon token. - RunningScript has no abandon-token handling; the script process keeps running until it exits naturally or the cancel kills it. - The isolation mutex is NOT released when the script abandons. The one real (non-stub) production change is the Hitman env-var check that makes the test scenario reproducible: with TentacleDebugDisableProcessKill_UNSAFE_FOR_PRODUCTION set, cancel does not kill the script process, so the test reaches the abandon path instead of the cancel-just-killed-it path. Tests run and fail with assertion errors that document the gap: - AbandonScript_WhenCancelFailsToKillProcess_ReturnsAbandonedExitCode fails with "Abandoned script did not reach Complete state within 30s" - AbandonScript_ReleasesIsolationMutexEvenWhileProcessIsStillRunning times out at IntegrationTestTimeout (the second script blocks forever waiting on the mutex the first script never released). This PR is not for merge.
34dc3c0 to
812e53a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The two abandon integration tests from #1226, plus only the empty stubs needed to make them compile and run. Behaviour-bearing code is left as no-ops:
ScriptServiceV2.AbandonScriptAsyncreturns a status snapshot but never fires the abandon token.RunningScripthas no abandon-token catch block; the script process keeps running until it exits naturally or the cancel kills it.The single real (non-stub) production change is the
Hitmanenv-var check that makes the scenario reproducible: withTentacleDebugDisableProcessKill_UNSAFE_FOR_PRODUCTIONset, cancel does not kill the script process, so the test reaches the abandon path instead of the cancel-just-killed-it path. Without that, the tests would not exercise the abandon contract at all.Running the tests against this branch produces meaningful assertion failures that document the behaviour gap #1226 closes.
Test failures
Files changed
ClientScriptExecutionAbandon.csEnvironmentVariables.csTentacleDebugDisableProcessKill_UNSAFE_FOR_PRODUCTIONconstantSilentProcessRunner.csHitman.TryKillProcessAndChildrenRecursivelyearly-returns when the env var is set, so the test can reproduce a "cancel can't kill" stateScriptExitCodes.csAbandonedExitCode = -48(the value the test asserts on)AbandonScriptCommandV2.csIScriptServiceV2.cs/IAsyncClientScriptServiceV2.cs/IAsyncScriptServiceV2.csAbandonScriptmethod signature to the three V2 interfaces so the contract compilesScriptServiceV2.csAbandonScriptAsyncSTUB: returns the current status snapshot WITHOUT firing any abandon token. This is the behaviour gap.ITentacleClient.cs/TentacleClient.csAbandonScriptmethod wired through the RPC executor; downstream is the no-op aboveTentacleClientExtensionMethods.cstentacleClient.AbandonScript(scriptTicket, CT)etc. with aScriptTicketinstead of aCommandContextScriptServiceV2DecoratorBuilder.cs/TestDecoratorsAreCalledInTheCorrectOrder.csNotImplementedException)What's deliberately NOT here (and is on #1226):
RunningScriptthat translates the token intoAbandonedExitCodeScriptServiceV2.CompleteScriptAsyncCapabilitiesServiceV2advertisement ofAbandonScriptV2RunningScript.CreateAbandonablefactoriesNot for merge
#1226 is the real PR with the real implementation. Close this one when #1226 lands.