RynthDreamWeave: pin the profile-key format and enforce its contract
Golden pins for dreamweave/coldeve alice keys, a Busy-Begin stale-window pin, and Key returns null when the result fails ServerWebOpen.IsValidProfileKey. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2522534979
commit
acfd04fa46
2 changed files with 17 additions and 3 deletions
|
|
@ -347,6 +347,13 @@ internal static class DreamWeaveWebTests
|
|||
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");
|
||||
|
||||
// A Busy Begin does not extend the stale window either.
|
||||
var y = new WebLauncher();
|
||||
y.Begin(Market, 0);
|
||||
Check.True(y.Begin(Market, 9_999) == LaunchBegin.Busy, "second begin while pending is Busy");
|
||||
y.Cancel("send failed");
|
||||
Check.True(y.OnChatLine(Line, 0x05, 70_000, out _, out _, out _) == LaunchLine.NotOurs, "a Busy Begin leaves the window anchored at the first");
|
||||
|
||||
// Window upper boundary.
|
||||
Check.Eq(LaunchWire.CodeLifetimeMs, 60_000L, "code lifetime");
|
||||
var u = new WebLauncher();
|
||||
|
|
@ -374,6 +381,11 @@ internal static class DreamWeaveWebTests
|
|||
// A 1-2 char account could appear in the server id or the hex by chance; the rest cannot.
|
||||
if (acct.Length >= 3) Check.True(!k!.Contains(acct.Trim().ToLowerInvariant()), "key never contains the account text");
|
||||
}
|
||||
Check.Eq(WebProfile.Key("dreamweave", "alice"), "dreamweave/67b613ccd746148225de235baae58eab", "key format is frozen (changing it orphans saved web logins)");
|
||||
Check.Eq(WebProfile.Key("coldeve", "alice"), "coldeve/1101ebeaa4456aba9ca33cd292d7b99c", "key format is frozen (changing it orphans saved web logins)");
|
||||
Check.True(WebProfile.Key("DreamWeave", "alice") == null, "uppercase server id -> null");
|
||||
Check.True(WebProfile.Key("dream/weave", "alice") == null, "slash in server id -> null");
|
||||
Check.True(WebProfile.Key("", "alice") == null, "empty server id -> null");
|
||||
Check.True(WebProfile.Key("dreamweave", null) == null, "null account -> null");
|
||||
Check.True(WebProfile.Key("dreamweave", "") == null, "empty account -> null");
|
||||
Check.True(WebProfile.Key("dreamweave", " ") == null, "blank account -> null");
|
||||
|
|
|
|||
Loading…
Reference in a new issue