RynthDreamWeave: Task 4 review minors
Restore blank line before the pending-destination doc comment, fix the stale-window test comment, and pin that a refused Begin does not extend the stale window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dd4cbd83bb
commit
e7af2e2100
2 changed files with 9 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ internal sealed class WebLauncher
|
|||
Status = p.Label + ": DreamWeave said: " + message;
|
||||
return LaunchLine.Refused;
|
||||
}
|
||||
|
||||
/// <summary>The pending destination once, at or after Begin + ReplyTimeoutMs; null otherwise.</summary>
|
||||
public WebDestination? TakeTimedOut(long nowMs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ internal static class DreamWeaveWebTests
|
|||
var n = new WebLauncher();
|
||||
Check.True(n.OnChatLine(Line, 0x05, 10_500, out _, out _, out _) == LaunchLine.NotOurs, "no Begin ever: not ours");
|
||||
|
||||
// A consumed request leaves no stale window.
|
||||
// A consumed request's window persists: a repeat is eaten.
|
||||
var c = new WebLauncher();
|
||||
c.Begin(Market, 0);
|
||||
c.OnChatLine(Line, 0x05, 100, out _, out _, out _);
|
||||
|
|
@ -339,6 +339,13 @@ internal static class DreamWeaveWebTests
|
|||
Check.True(b.OnChatLine(Line, 0x05, 20_100, out _, out _, out _) == LaunchLine.Code, "new request takes the code while pending");
|
||||
Check.True(b.OnChatLine(Line, 0x05, 20_200, out _, out _, out _) == LaunchLine.Stale, "then a further valid code is stale");
|
||||
|
||||
// A refused Begin does not extend the stale window.
|
||||
var t = new WebLauncher();
|
||||
t.Begin(Market, 0);
|
||||
t.Cancel("send failed"); // Pending would answer Busy; TooSoon needs a free slot
|
||||
Check.True(t.Begin(Market, 2_999) == LaunchBegin.TooSoon, "second begin inside the throttle is refused");
|
||||
Check.True(t.OnChatLine(Line, 0x05, 70_000, out _, out _, out _) == LaunchLine.NotOurs, "a refused Begin leaves the window anchored at the first");
|
||||
|
||||
// Window upper boundary.
|
||||
Check.Eq(LaunchWire.CodeLifetimeMs, 60_000L, "code lifetime");
|
||||
var u = new WebLauncher();
|
||||
|
|
|
|||
Loading…
Reference in a new issue