test(lab): count and repair the profiles and log-group entries of the probe, and read the whole series
Test-MatrixCleanup.ps1 now also counts and removes the profiles and the
profile folders C:\Users\NtfsProbe* (retried, because a profile that the
last task used stays loaded for a few seconds) and the entries of the
account probe in Performance Log Users. net.exe lists a local user by its
bare name and a deleted domain account by its SID or its cached name, so
the check matches NtfsProbe anywhere in the line or a SID.
Export-CellTimeline.ps1 takes the account of a cell that stopped before its
tests from the snapshot of its fixture, so that the series can include
such a cell, and reports SameNameAsPreviousCell and SameAccountAsPreviousCell
instead of one column that compared names only.
Test-StaleAuthzModel.ps1 computes its grid of lifetimes by index (the
accumulated step lost the grid point 10.25), prints a range as segments,
and prints the range of one lifetime for both tests.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: AI Assistant <ai@example.com>
# The timeline of the cells of the operating-system matrix (Decision 24): for each cell and edition, in the order in which the cells ran, the module under
# test, the account of case 3 (its name and its relative ID, which tells two accounts of one name apart within a domain), when the previous fixture was
# removed, when the accounts were created, when the Admin role started, the minutes between
# them, and the three effective-access tests of case 3 in the Admin role (result, milliseconds, and the rights that a failing test received). A failing
# effective-access test of the Admin role is easy to blame on the module or on the environment; this table puts it beside the module, the position of
# the cell in the sequence, and the age of the accounts. The times come from the logs of Run-MatrixSequence.ps1 and of the controller (UTC). It reads
# files only; Windows PowerShell 5.1 or PowerShell 7.
# The timeline of the cells of the operating-system matrix (Decision 24): for each cell and edition in which the Admin role ran, in the order in which the
# cells ran, the module under test, the account of case 3 (its name and its relative ID, which tells two accounts of one name apart within a domain),
# whether the previous cell had the same name and the same account, when the previous fixture was removed, when the accounts were created, when the
# Admin role started, the minutes between them, and the three effective-access tests of case 3 in the Admin role (result, milliseconds, and the rights
# that a failing test received). A failing effective-access test of the Admin role is easy to blame on the module or on the environment; this table
# puts it beside the module, the position of the cell in the sequence, and the age of the accounts. Pass every label of a series, also a run that
# stopped before its tests (it writes no row, but it created and removed the accounts, which the next cell reports as the previous removal). The
# times come from the logs of Run-MatrixSequence.ps1 and of the controller (UTC). It reads files only; Windows PowerShell 5.1 or PowerShell 7.
$ErrorActionPreference='Stop'
# -File passes an array as one string, so a list may arrive as 'A,B'.
# The entries of the probe in Performance Log Users go by SID or name through the cmdlet: net.exe doesn't take the SID of an account that its name cache still resolves.
$messages.Add(('stage items, probe folders, probe users, their entries in the log group, and scheduled tasks of the kit removed; profile items left: {0} after {1} attempt(s)'-f$left,$attempt))
# controller that reuses the name would have met a stale entry. -Permutations N asks how often a random assignment of the observed outcomes to the runs
# (the same number of failures, a fixed random seed) reaches the best agreement of the real outcomes for some L: if the position of a cell decides the
# outcome, it should almost never.
#
# The lifetimes are those of a grid with the step -StepMinutes, so a range is known to within one step (use 0.05 to see the ranges of the record). The model
# doesn't know that a computer restarted. If the state lives in the memory of the computer, a restart would clear it; for the real account names of the series
# of Decision 24, no restart of the client or of a file server changes a prediction (the entry that a restart would have cleared had expired, or the run that
# read it had the same account). For -AsIfSameSubject it matters once: the client restarted between ab6 and ab7.
'{0} ({1}): the model predicts {2} of {3} outcomes for L from {4:N2} to {5:N2} minutes; {6} runs failed'-f$test,
$(if($test-eq'Test1'){'the name of the file server'}else{'the default server name, the client'}),$best,$rows.Count,$bestResults[0].Minutes,$bestResults[-1].Minutes,$failures
'{0} ({1}): the model predicts {2} of {3} outcomes for L from {4} minutes; {5} runs failed'-f$test,
$(if($test-eq'Test1'){'the name of the file server'}else{'the default server name, the client'}),$best,$rows.Count,(Get-Range-Result$bestResults),$failures
@ -127,3 +163,10 @@ foreach ($test in 'Test1', 'Test2') {
' {0} of {1} random assignments of the outcomes to the runs reach {2} of {3} for some L; the best of them reaches {4}'-f$reached,$Permutations,$best,$rows.Count,$highest
}
}
# One lifetime for both tests: the range of L at which the model predicts the most outcomes of the two tests together.
'Both tests with one L: the model predicts {0} of {1} outcomes for L from {2} minutes'-f$bestTogether,(2*$rows.Count),(Get-Range-Result@($together|Where-Object-FilterScript{$_.Agree-eq$bestTogether}))