fix(flow-debugger): final-review remediation — 2000-row trace pull, shared ExceptionHeader parser, surrogate-safe clip, wording, alarm source, register renumber (I1/I2/M1-M8)
This commit is contained in:
@@ -250,6 +250,27 @@ public class FlowDebugRunnerTests
|
||||
Assert.Single(result.Events); // just the synthesized write row
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task RunValueChange_AsksTheSiteForItsFullPage_NotTheOldFiveHundredRowCap()
|
||||
{
|
||||
// Final review I1: the site serves ORDER BY OccurredAtUtc ASC LIMIT, so the page is the
|
||||
// OLDEST rows in the window. With step logs a single traced run can emit up to 201
|
||||
// ScriptLog rows, so a 500-row request could push a later spawned run's ScriptRun row off
|
||||
// the end of the page and make this loop report a false NO_TRIGGER_WITHIN_WINDOW. Ask for
|
||||
// the site's own ceiling (SiteStreamGrpcServer.MaxTraceEventsPerPull) instead.
|
||||
var (_, _, puller) = WireValueChange();
|
||||
var maxima = new List<int>();
|
||||
puller.PullAsync("site-a", Arg.Any<IReadOnlyCollection<Guid>>(), Arg.Any<DateTime>(), Arg.Do<int>(maxima.Add), Arg.Any<CancellationToken>())
|
||||
.Returns(Array.Empty<AuditEvent>());
|
||||
|
||||
await Runner().RunValueChangeAsync(_services.BuildServiceProvider(),
|
||||
new FlowDebugRunValueChangeCommand(5, "Status", "Running", WaitSeconds: 3), Deployer, CancellationToken.None);
|
||||
|
||||
Assert.NotEmpty(maxima);
|
||||
Assert.All(maxima, m => Assert.Equal(2000, m));
|
||||
Assert.Equal(2000, FlowDebugRunner.PullTraceEventsMax);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task RunValueChange_OutOfScopeSite_IsRefused()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user