Skip to content

Add end-to-end ProcessAsync test for transient-pause (required + non-required)#436

Merged
ppXD merged 2 commits into
mainfrom
test/p1b-transient-pause-e2e
Jun 11, 2026
Merged

Add end-to-end ProcessAsync test for transient-pause (required + non-required)#436
ppXD merged 2 commits into
mainfrom
test/p1b-transient-pause-e2e

Conversation

@ppXD

@ppXD ppXD commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The P1b transient-pause fix (#434) was covered only compositionally: unit tests mock the phase to throw the transient directly, and HalibutResumeReattachTests calls the strategy directly — neither runs the real ExecuteSingleActionAsync per-action catch through the runner to the pause outcome. The non-required path (which has no per-target catch) was the exact gap the adversarial review flagged.
  • New IntegrationTransientPause drives the real pipeline: a full IDeploymentTaskExecutor.ProcessAsync over a seeded deployment (KubernetesAgent target → the real HalibutMachineExecutionStrategy records the in-flight pointer), with only the Halibut RPC transport faked (GetStatus throws a transient HalibutClientException). For both required and non-required steps it asserts: task Paused (not Failed), checkpoint preserved, in-flight pointer preserved.
  • Test only — the fix already shipped in Pause (resumable) on a transient infra failure instead of failing #434; this closes the end-to-end coverage gap.

Test plan

  • Both [InlineData(true)] (required) and [InlineData(false)] (non-required) green against the real pipeline
  • Red-green verified: neutering the ExecuteSingleActionAsync transient catch makes the NON-required case fail (PausedFailed, checkpoint deleted — the swallow bug) while the required case still passes (covered by the per-target catch) — proving the test specifically guards the non-required propagation the fix added
  • Pure test addition; Execute.cs unchanged

…required)

The P1b transient-pause fix (#434) was covered only compositionally: the
unit tests mock the phase to throw the transient directly, and
HalibutResumeReattachTests calls the strategy directly — neither runs the
real ExecuteSingleActionAsync per-action catch THROUGH the runner to the
pause outcome. The non-required path (no per-target catch) was the gap the
adversarial review flagged.

This drives the REAL pipeline: IDeploymentTaskExecutor.ProcessAsync over a
seeded deployment (KubernetesAgent target, so the real
HalibutMachineExecutionStrategy records the in-flight pointer), with only
the Halibut RPC transport faked (GetStatus throws a transient
HalibutClientException). It asserts, for BOTH required and non-required
steps: task Paused (not Failed), checkpoint preserved, and the in-flight
pointer preserved.

Red-green verified: with the ExecuteSingleActionAsync transient catch
neutered, the NON-required case fails (Paused → Failed + checkpoint
deleted) — the exact swallow bug — while the required case still passes
(the per-target catch covers it), confirming the test specifically guards
the non-required propagation the fix added.
@ppXD ppXD added this to the 1.9.0 milestone Jun 11, 2026
… contrast

Replace the brittle Contains("\"t\"") substring with the production typed
reader InFlightScriptMap.TryGet(json, DispatchSlot(...)) asserting the preserved
pointer holds the EXACT ScriptTicket the strategy dispatched (captured in the
fake) — pins slot identity + ticket value and survives a JsonPropertyName rename.

Add a permanent-failure contrast case: the same seeded path with a permanent
Halibut subtype (ServiceNotFoundHalibutClientException) must Fail terminally +
delete the checkpoint, so the Paused rows read as "Paused iff transient" and the
transient/permanent boundary is pinned end-to-end, not just in the predicate's
own unit test.
@ppXD
ppXD merged commit ac09c54 into main Jun 11, 2026
15 checks passed
@ppXD
ppXD deleted the test/p1b-transient-pause-e2e branch June 11, 2026 14:17
@ppXD ppXD added this to the 1.9.0 milestone Jun 13, 2026
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