You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 81e6f16
Browse filesBrowse the repository at this point in the historyBrowse files
Document process-wide child environment and discovery behavior, reject Repetition with Recovery on the dotnet test pipe, and harden acceptance paths.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject this combination until iteration identity is represented in the
339
+
protocol. Other protocols are not restricted by this check.
324
340
325
341
**Child-launch contract for every stage except the innermost:**
326
342
@@ -339,11 +355,16 @@ involved.
339
355
340
356
**Internal chain guard (not public API).** When composition is active, the
341
357
platform sets an internal environment variable before running the active
342
-
orchestrator. The variable holds the ordered list of consumed Uids, and children
343
-
inherit it. At startup, every process reads the variable and removes it from its
344
-
own environment, then skips the listed Uids before querying enablement. If a
345
-
test host controller must restart an attempt, it forwards the chain explicitly
346
-
in the child's launch environment. Test code does not inherit it. The guard has three uses:
358
+
orchestrator. The variable holds the ordered list of consumed Uids. It is
359
+
process-wide, so every child process started while the orchestrator is running
360
+
inherits it, not only the intended child that continues the composition. This
361
+
includes diagnostic/helper processes and custom launcher targets. An MTP process
362
+
consumes and clears it at startup before skipping the listed Uids; unrelated
363
+
launches must remove it if they must not continue the composition. If a test
364
+
host controller must restart an attempt, it forwards the chain explicitly in
365
+
the child's launch environment. Test code in the normal MTP test process does
366
+
not inherit it because MTP startup has already cleared it. The guard has three
367
+
uses:
347
368
348
369
- It prevents re-activation, even when an orchestrator was enabled by
349
370
configuration rather than by a command-line option it can strip.
@@ -417,7 +438,9 @@ Each of these processes repeats platform initialization.
417
438
418
439
**Implementation:**`TestHostOrchestratorManager` validates the enabled set and
419
440
selects the active stage before initializing composable orchestrators.
420
-
`TestHostBuilder` consumes the chain and bypasses composition during discovery.
441
+
`TestHostBuilder` consumes the chain and bypasses orchestration during
442
+
discovery, including factory creation and enablement checks for single-
443
+
orchestrator runs.
421
444
`TestHostOrchestratorHost` publishes the child chain only around the selected
422
445
orchestrator's execution, not around lifetime callbacks or short-circuiting
423
446
middleware. Each extension remains responsible for its exit code and artifacts;
@@ -452,6 +475,7 @@ SDK. The generated `DotnetTestPipeOrchestratorHandshake` app references
452
475
| Selection and lifecycle | 93 focused manager, builder and host cases passed on each of `net10.0`, `net11.0` and `net462`. These include discovery with incompatible orchestrators, pre-enablement duplicate-Uid rejection, stage ordering and selected-only initialization. |
453
476
| Wire and restart |`DotnetTestPipe_Orchestrator_HandshakesWithFeature` and both rows of `DotnetTestPipe_ComposedOrchestrators_EachProcessHandshakesWithItsUid` passed. The composed rows check both feature Uids, one execution id, distinct instance ids, and attempts 1 and 2, with zero or two controller handshakes respectively. |
454
477
| Counterfactual | With the original composition implementation, the direct row and Retry alone passed; the controller row failed: `The child reactivated the consumed Selection orchestrator.` The controller had dropped the consumed chain on relaunch. The same three cases passed after the fix (suite exit 2 → 0). This isolates a restart regression, not every aspect of composition. |
478
+
| Repetition with Recovery | The packed `DotnetTestPipe_RepetitionAndRecoveryOrchestrators_AreRejectedBeforeExecution` case uses a two-iteration fixture whose first test attempt fails and retries. With the pipe-mode guard removed, both the fake named-pipe consumer and SDK `11.0.100` observed the attempt reset `[1, 2, 1]`; the SDK terminated with `UnreachableException: Unexpected test result for attempt '1' while the last attempt is '2'` (exit `-2146232797`). With the guard, the packed acceptance case passed without a test-host handshake. The real-SDK run is the unguarded counterfactual; the guard path itself is verified by the packed fake named-pipe test. |
455
479
| Released SDKs | SDKs `10.0.404` and `11.0.100` each ran the packaged `net11.0` apphost with Selection, Retry and a controller restart. Both reported `FlakyTest` failed on try 1, passed on try 2, and returned 0 for one logical test. SDK 11 also reported `flaky: 1 (passed after retry)`. |
456
480
| Mixed modules | SDK `11.0.100` ran the pre-fix and fixed apphosts in one invocation. The fixed module passed after retry, the previous module failed at its controller child, and the SDK returned 1. |
457
481
@@ -484,6 +508,7 @@ claim that every proposed scenario has shipped or been executed.
484
508
| Selection with Recovery | A Selection test asset plus Retry, with one flaky test inside the selected set. Assert exit 0, that attempt 2 runs only the failed UID, the handshake order, and the retry rendering in the SDK. | Terminal at 80 and 200 columns. The zero-selected path needs the real AffectedTests package, because the SDK recognizes only its Uids. |
485
509
| Distribution with Recovery | A two-shard test asset with `--partition` and a flaky test in shard 1. Assert per-shard retry, distinct results directories and instance ids, attempt numbers, and the aggregated exit code. | No interleaved partial lines. SDK rendering of concurrent attempts remains a gap until it is run. |
486
510
| Composition rules | Two orchestrators in the same stage, and an undeclared orchestrator combined with another. Assert errors that name the Uids. | Error text. |
511
+
| Repetition with Recovery | The `dotnettestcli` pipe rejects Repetition + Recovery before any test-host handshake. The packed two-iteration counterfactual without the guard was run against SDK `11.0.100` and terminated on `[1, 2, 1]`; the guarded acceptance case verifies rejection before test-host execution. | No rendered change. The real-SDK run was the unguarded failure reproduction; the guarded path was validated with the packed fake named-pipe consumer, not a released SDK executable. |
487
512
| Cancellation | Cancel during an inner attempt. Assert exit 3 in every process and no orphaned process ids. | Nonvisual. |
488
513
| Lifetimes and middleware run once | Azure DevOps loopback publisher sees exactly one run created and finalized. A middleware marker file is written once. | The payload is proven; the live Azure DevOps UI remains a gap. |
489
514
| Recursion guard | An outer orchestrator that does not strip its option. Assert the process count is bounded. | Nonvisual. |
<value>Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</value>
1107
+
<comment>{0} is the list of orchestrator Uids. {Locked="dotnettestcli"}</comment>
Copy file name to clipboardExpand all lines: src/MTP/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1392,6 +1392,11 @@ Přečtěte si další informace o telemetrii Microsoft Testing Platform: https:
1392
1392
<targetstate="translated">Middleware {0} se úspěšně vrátil, přestože následné provádění, které spustil pomocí „next“, ve skutečnosti selhalo. Middleware nezpozoroval ani nerozšířil selhání, takže nemůže vypadat jako úspěch.</target>
1393
1393
<note>{0} is the middleware's Uid. {Locked="next"}</note>
<source>Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</source>
1397
+
<targetstate="new">Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</target>
1398
+
<note>{0} is the list of orchestrator Uids. {Locked="dotnettestcli"}</note>
Copy file name to clipboardExpand all lines: src/MTP/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1392,6 +1392,11 @@ Read more about Microsoft Testing Platform telemetry: https://aka.ms/testingplat
1392
1392
<targetstate="translated">Middleware „{0}“ wurde erfolgreich zurückgegeben, nachdem die Downstreamausführung mit dem Fehler „next“ gestartet wurde. Der Fehler wurde von der Middleware nicht erkannt oder weitergegeben, sodass es nicht aussehen kann, als wäre die Ausführung erfolgreich gewesen.</target>
1393
1393
<note>{0} is the middleware's Uid. {Locked="next"}</note>
<source>Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</source>
1397
+
<targetstate="new">Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</target>
1398
+
<note>{0} is the list of orchestrator Uids. {Locked="dotnettestcli"}</note>
Copy file name to clipboardExpand all lines: src/MTP/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1392,6 +1392,11 @@ Más información sobre la telemetría de la Plataforma de pruebas de Microsoft:
1392
1392
<targetstate="translated">El middleware "{0}" se devolvió correctamente después de la ejecución de nivel inferior que se inició con el error "next". El middleware no observó ni propagó el error, por lo que no se puede permitir que parezca correcto.</target>
1393
1393
<note>{0} is the middleware's Uid. {Locked="next"}</note>
<source>Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</source>
1397
+
<targetstate="new">Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</target>
1398
+
<note>{0} is the list of orchestrator Uids. {Locked="dotnettestcli"}</note>
Copy file name to clipboardExpand all lines: src/MTP/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1392,6 +1392,11 @@ En savoir plus sur la télémétrie de la plateforme de tests Microsoft : https
1392
1392
<targetstate="translated">L’intergiciel « {0} » s’est effectué correctement alors que l’exécution en aval qu’il avait démarrée avec « next » a effectivement généré une erreur. L’intergiciel n’a ni détecté ni propagé l’échec. Il ne peut donc pas donner l’impression que l’opération a réussi.</target>
1393
1393
<note>{0} is the middleware's Uid. {Locked="next"}</note>
<source>Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</source>
1397
+
<targetstate="new">Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</target>
1398
+
<note>{0} is the list of orchestrator Uids. {Locked="dotnettestcli"}</note>
Copy file name to clipboardExpand all lines: src/MTP/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1392,6 +1392,11 @@ Altre informazioni sulla telemetria della piattaforma di test Microsoft: https:/
1392
1392
<targetstate="translated">Il middleware '{0}' ha restituito il controllo correttamente dopo che l'esecuzione downstream avviata con 'next' ha effettivamente avuto esito negativo. Il middleware non ha rilevato né propagato l'errore, quindi non è consentito che l'esecuzione risulti completata correttamente.</target>
1393
1393
<note>{0} is the middleware's Uid. {Locked="next"}</note>
<source>Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</source>
1397
+
<targetstate="new">Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</target>
1398
+
<note>{0} is the list of orchestrator Uids. {Locked="dotnettestcli"}</note>
<source>Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</source>
1397
+
<targetstate="new">Test host orchestrators '{0}' cannot compose the 'Repetition' and 'Recovery' stages under the 'dotnettestcli' named-pipe protocol because a retry in one repeated iteration can make the next iteration report a lower attempt number to the SDK.</target>
1398
+
<note>{0} is the list of orchestrator Uids. {Locked="dotnettestcli"}</note>
0 commit comments