feat: port SK test branch (2026.10.18.24) onto sk

Squash of test/hotbuild-2026-10-16 as merged onto aelrynth main 2026.10.17.1, matching the
2026.10.18.24 test installer. The test branch wins where both changed the same lines; sk-only
changes kept; duplicate features cut to the test branch's copy. RynthAi HandWrittenVersion stays
0.5.0-legacy-ui on sk.

Highlights: RynthOracle 0.6.0 (Legendary, Markers, Dynamic Stamps and Temple guardians merged into
the Quests list, RynthNav Go to), RynthILT 0.2.20 (ub-IT auto-chunk rules, rating level,
RynthILT.Data v3), RynthAi ub-IT /ub and VT/MT meta compatibility and the loot attribute checklist,
RynthNav destination alternatives. Changelog/2026-10-18-sk-port-test-branch-2026.10.18.24.md.
This commit is contained in:
BlankenshipG 2026-10-18 16:22:40 -04:00
commit 7797901d69
287 changed files with 22602 additions and 1090 deletions

View file

@ -6,16 +6,25 @@ namespace RynthILT.Tests;
// The Lugian-hammer aetheria rules (Hub/IltChunkClap.cs): Infinite Leaftide aetheria goes up to
// level 10, and aetheria carrying a C, CD or CDR rating is kept unless its keep switch is off.
// Only the Lugian Aetheria Hammer chunks, and ILT's result lines name the item and the tool.
// The cap covers Coalesced Aetheria too, and /clap needs a colour with its own trinket.
// The cap covers levelled Coalesced Aetheria; an unlevelled one chunks, as in ub-IT. Corrupted
// weapons follow ub-IT's hard rules and its optional keep rules, and /clap needs a colour with its
// own trinket.
internal static class AetheriaChunkTests
{
public static void Register(Runner r)
{
r.Add("aetheria: the chunk cap runs to one past ILT's level 10", Cap);
r.Add("aetheria: C / CD / CDR ratings are kept by default, each with its own switch", Ratings);
r.Add("aetheria: rating level - at or above keeps, below chunks (Coalesced too)", RatingLevel);
r.Add("chunk: only the Lugian Aetheria Hammer is the tool, never a Lugian Hammer weapon", HammerOnly);
r.Add("chunk: ILT's result lines (item and tool named) end the wait; combat lines don't", ResultLines);
r.Add("aetheria: the level cap applies to Coalesced Aetheria too; no level read = never chunked", CoalescedCap);
r.Add("aetheria: the level cap applies to levelled Coalesced Aetheria; unlevelled Coalesced chunks (ub-IT)", CoalescedCap);
r.Add("aetheria: never-chunk, tinker / imbue, item XP, ratings and the cap each keep a piece", AetheriaRules);
r.Add("chunk: kind by class and name; chunks and powder are clap material", Kinds);
r.Add("corrupted: ub-IT hard rules (workmanship, cleave 1, or 2 on two-handed non-thrust)", CorruptedHardRules);
r.Add("corrupted: ub-IT keep rules, all off by default", CorruptedKeepRules);
r.Add("chunk: busy blocks peace mode, not combat with chunk-in-combat on (ub-IT v2.0.1059)", BusyGate);
r.Add("chunk: a target that leaves the pack counts as chunked; still carried after 10 s times out", WaitOutcome);
r.Add("clap: the server's WCIDs, each colour paired with its trinket, Coalesced only unrevealed level 1-3", ClapPairs);
}
@ -29,7 +38,110 @@ internal static class AetheriaChunkTests
Check.False(IltChunkClap.UnderChunkCap(9, 9), "level 9 is not below 9");
Check.False(IltChunkClap.UnderChunkCap(10, 9), "a level 10 Coalesced piece is kept");
Check.True(IltChunkClap.UnderChunkCap(10, 11), "11 chunks every level");
Check.False(IltChunkClap.UnderChunkCap(0, 11), "no level read: never chunked");
Check.False(IltChunkClap.UnderChunkCap(0, 11), "revealed aetheria with no level read: never chunked");
Check.False(IltChunkClap.UnderChunkCap(9, 9, coalesced: true), "a levelled Coalesced piece keeps the cap");
Check.True(IltChunkClap.UnderChunkCap(0, 4, coalesced: true), "an unlevelled Coalesced piece chunks (it used to be kept forever)");
Check.True(IltChunkClap.UnderChunkCap(0, 1, coalesced: true), "even with the lowest cap");
}
private static readonly IltChunkClap.AetheriaFacts PlainCoalesced = new(
Coalesced: true, MaxLevel: 0, NeverChunk: false, ItemXp: 0, Tinkers: 0, Imbue: 0, Crit: 0, CritDamage: 0, CritDamageResist: 0);
private static void AetheriaRules()
{
var g = new IltGearState();
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced), null, "a plain unlevelled Coalesced piece chunks");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { MaxLevel = 3 }), null, "level 3 under the default cap of 4");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { MaxLevel = 4 }), "level at or above the cap", "level 4 at the default cap");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { NeverChunk = true }), "never-chunk flag", "bool 9030");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { Tinkers = 1 }), "tinkered or imbued", "tinkered");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { Imbue = 4 }), "tinkered or imbued", "imbued");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { ItemXp = 100 }), "has item XP", "levelled by use");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { Crit = 2 }), "kept for its C / CD / CDR rating", "a C 2 piece is kept by default");
g.KeepAetheriaWithCrit = false;
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { Crit = 2 }), null, "C switch off: a C 2 piece chunks");
Check.Eq(IltChunkClap.AetheriaSkip(g, PlainCoalesced with { Coalesced = false }), "no level read", "revealed aetheria needs a level");
}
private static void Kinds()
{
var gem = RynthCore.Loot.AcObjectClass.Gem;
Check.Eq(IltChunkClap.KindOf(gem, "Coalesced Aetheria"), IltChunkClap.ChunkKind.Aetheria, "Coalesced");
Check.Eq(IltChunkClap.KindOf(gem, "Blue Aetheria"), IltChunkClap.ChunkKind.Aetheria, "revealed sigil");
Check.Eq(IltChunkClap.KindOf(gem, "Red Aetheria Chunk"), IltChunkClap.ChunkKind.None, "chunk");
Check.Eq(IltChunkClap.KindOf(gem, "Aetheria Powder"), IltChunkClap.ChunkKind.None, "powder");
Check.Eq(IltChunkClap.KindOf(RynthCore.Loot.AcObjectClass.MeleeWeapon, "Corrupted Greatsword"), IltChunkClap.ChunkKind.Corrupted, "melee");
Check.Eq(IltChunkClap.KindOf(RynthCore.Loot.AcObjectClass.MissileWeapon, "Corrupted Bow"), IltChunkClap.ChunkKind.Corrupted, "missile");
Check.Eq(IltChunkClap.KindOf(RynthCore.Loot.AcObjectClass.WandStaffOrb, "Corrupted Orb"), IltChunkClap.ChunkKind.None, "casters are not chunked (ub-IT)");
Check.Eq(IltChunkClap.KindOf(RynthCore.Loot.AcObjectClass.MeleeWeapon, "Greatsword"), IltChunkClap.ChunkKind.None, "not corrupted");
}
private static readonly IltChunkClap.CorruptedFacts PlainSword = new() { Workmanship = 6, AttackType = 4, WieldSkill = 45 };
private static void CorruptedHardRules()
{
var g = new IltGearState();
Check.Eq(IltChunkClap.CorruptedSkip(g, PlainSword), null, "a plain corrupted sword chunks");
Check.Eq(IltChunkClap.CorruptedSkip(g, PlainSword with { Workmanship = 0 }), "no workmanship", "workmanship 0");
Check.Eq(IltChunkClap.CorruptedSkip(g, PlainSword with { Tinkers = 1 }), "tinkered or imbued", "tinkered");
Check.Eq(IltChunkClap.CorruptedSkip(g, PlainSword with { Imbue = 1 }), "tinkered or imbued", "imbued");
Check.Eq(IltChunkClap.CorruptedSkip(g, PlainSword with { NeverChunk = true }), "never-chunk flag", "bool 9030");
Check.Eq(IltChunkClap.CorruptedSkip(g, PlainSword with { Cleaving = 1 }), null, "one-handed cleave 1");
Check.Eq(IltChunkClap.CorruptedSkip(g, PlainSword with { Cleaving = 2 }), "cleave over the limit", "one-handed cleave 2");
var twoHanded = PlainSword with { WieldSkill = 41, Cleaving = 2 };
Check.Eq(IltChunkClap.CorruptedSkip(g, twoHanded), null, "two-handed cleave 2 chunks (it never did before)");
Check.Eq(IltChunkClap.CorruptedSkip(g, twoHanded with { Cleaving = 3 }), "cleave over the limit", "two-handed cleave 3");
Check.Eq(IltChunkClap.CorruptedSkip(g, twoHanded with { AttackType = 2 }), "cleave over the limit", "a two-handed thrust weapon keeps the 1 limit");
Check.Eq(IltChunkClap.MaxChunkCleave(0, 11, 4), 2, "WeaponType TwoHanded counts too");
Check.Eq(IltChunkClap.MaxChunkCleave(45, 0, 4), 1, "one-handed");
}
private static void CorruptedKeepRules()
{
var g = new IltGearState();
var loaded = PlainSword with
{
CritFrequency = 0.1, CritMultiplier = 1.5, IgnoreArmor = 0.2, Slayer = 5, AttackType = 160,
ElementalBonus = 10, MaxDamage = 400, Spells = new[] { 2072 },
};
Check.Eq(IltChunkClap.CorruptedSkip(g, loaded), null, "every keep rule is off by default");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedCrushingBlow = true }, loaded), "kept: Crushing Blow", "Crushing Blow");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedBitingStrike = true }, loaded), "kept: Biting Strike", "Biting Strike");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedArmorCleaving = true }, loaded), "kept: Armor Cleaving", "Armor Cleaving");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedAnySlayer = true }, loaded), "kept: slayer", "slayer");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedMultiStrike = true }, loaded), "kept: multi-strike", "multi-strike 160");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedMultiStrike = true }, PlainSword), null, "a single slash is not multi-strike");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedElementalBonus = true }, loaded), "kept: elemental bonus", "elemental");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedMaxDamageAtLeast = 400 }, loaded), "kept: max damage", "max damage at the limit");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedMaxDamageAtLeast = 401 }, loaded), null, "max damage under the limit");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedAnySpell = true }, loaded), "kept: has a spell", "any spell");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedSpellIds = "100, 2072" }, loaded), "kept: listed spell", "listed spell id");
Check.Eq(IltChunkClap.CorruptedSkip(new IltGearState { KeepCorruptedSpellIds = "100 200" }, loaded), null, "other spell ids");
Check.Eq(IltChunkClap.ParseSpellIds("1, 2;3 x -4 0").Count, 3, "positive ids only, any separator");
Check.Eq(IltChunkClap.ParseSpellIds(null).Count, 0, "no list");
}
/// <summary>
/// Silentkelpie 2026-10-18: a Coalesced piece was chunked (Red Aetheria Chunk arrived) with no
/// result line, and it was filed as skipped after 10 s instead of counted.
/// </summary>
private static void WaitOutcome()
{
Check.Eq(IltChunkClap.WaitOutcome(500, targetStillCarried: true), IltChunkClap.ChunkWait.Waiting, "still carried, within the wait");
Check.Eq(IltChunkClap.WaitOutcome(1_100, targetStillCarried: false), IltChunkClap.ChunkWait.Gone, "gone from the pack: chunked");
Check.Eq(IltChunkClap.WaitOutcome(12_000, targetStillCarried: false), IltChunkClap.ChunkWait.Gone, "gone beats the timeout");
Check.Eq(IltChunkClap.WaitOutcome(10_000, targetStillCarried: true), IltChunkClap.ChunkWait.TimedOut, "still carried at 10 s: timed out");
}
private static void BusyGate()
{
Check.True(IltChunkClap.AllowsChunkWhileBusy(isBusy: false, isPeace: true, chunkInCombat: false), "idle in peace");
Check.False(IltChunkClap.AllowsChunkWhileBusy(isBusy: true, isPeace: true, chunkInCombat: true), "busy in peace waits");
Check.True(IltChunkClap.AllowsChunkWhileBusy(isBusy: true, isPeace: false, chunkInCombat: true), "busy swinging with chunk-in-combat");
Check.False(IltChunkClap.AllowsChunkWhileBusy(isBusy: true, isPeace: false, chunkInCombat: false), "busy in combat without it");
}
/// <summary>
@ -117,4 +229,35 @@ internal static class AetheriaChunkTests
g.KeepAetheriaWithCritDamageResist = false;
Check.False(IltChunkClap.KeptForRatings(g, 3, 3, 3), "every switch off: ratings don't protect");
}
/// <summary>
/// The rating level: a C / CD / CDR rating at or above it keeps the piece, a lower one chunks
/// (if the level cap allows). The default of 1 keeps any rating, as before.
/// </summary>
private static void RatingLevel()
{
var g = new IltGearState();
Check.Eq(g.KeepAetheriaRatingAtLeast, 1, "default: any rating keeps");
Check.True(IltChunkClap.KeptForRatings(g, 1, 0, 0), "C 1 kept at the default");
g.KeepAetheriaRatingAtLeast = 2;
Check.False(IltChunkClap.KeptForRatings(g, 1, 0, 0), "C 1 below level 2: chunks");
Check.True(IltChunkClap.KeptForRatings(g, 2, 0, 0), "C 2 at level 2: kept");
Check.True(IltChunkClap.KeptForRatings(g, 3, 0, 0), "C 3 above level 2: kept");
Check.True(IltChunkClap.KeptForRatings(g, 1, 0, 2), "CDR 2 keeps a C 1 + CDR 2 piece");
Check.False(IltChunkClap.KeptForRatings(g, 1, 1, 1), "every rating below the level: chunks");
g.KeepAetheriaWithCrit = false;
Check.False(IltChunkClap.KeptForRatings(g, 5, 0, 0), "a switch that is off ignores the level");
Check.Eq(IltChunkClap.ClampRatingLevel(0), 1, "below 1 clamps to 1");
Check.Eq(IltChunkClap.ClampRatingLevel(99), IltChunkClap.MaxRatingLevel, "clamped to the maximum");
var coalescedC1 = PlainCoalesced with { Crit = 1 };
var level2 = new IltGearState { KeepAetheriaRatingAtLeast = 2 };
Check.Eq(IltChunkClap.AetheriaSkip(level2, coalescedC1), null, "an unlevelled C 1 Coalesced piece chunks at rating level 2");
Check.Eq(IltChunkClap.AetheriaSkip(level2, PlainCoalesced with { Crit = 2 }), "kept for its C / CD / CDR rating", "a C 2 one is kept");
Check.Eq(IltChunkClap.AetheriaSkip(level2, coalescedC1 with { MaxLevel = 6 }), "level at or above the cap",
"a low rating does not override the level cap");
}
}

View file

@ -12,7 +12,7 @@ namespace RynthILT.Tests;
// The pet breeding tracker (IltBreedingRules / IltBreedingEssence / IltBreedingSupplies / IltPetBreeding):
// the server's rules and where each value came from, the parsers for ACECustom's appraisal block,
// chat and "@breed-debug" (formats copied from PetDevice_Breeding.cs / PetDevice_Maturity.cs), each
// breeding gate, the pair planner's odds, the supply refusals, and the "RynthILT.Data" v2 reader JSON.
// breeding gate, the pair planner's odds, the supply refusals, and the JSON RynthOracle reads.
internal static class BreedingTests
{
public static void Register(Runner r)
@ -26,7 +26,7 @@ internal static class BreedingTests
r.Add("breeding: each gate (charges, rest, growth, neutered, shiny, bond, tier, ID)", Gates);
r.Add("breeding: pair planner blocks wrong sexes and ranges the inherited mutations", Planner);
r.Add("breeding: supplies are refused where the server would refuse them", Supplies);
r.Add("breeding: reader JSON round-trips through the shared reader view", ReaderJson);
r.Add("breeding: reader JSON round-trips through RynthOracle's view", ReaderJson);
r.Add("breeding: saved state survives the hub.json source-generated serializer", StateJson);
r.Add("breeding: RynthILT.Data v2 keeps v1 readers working", DataApiVersion);
}
@ -363,12 +363,15 @@ internal static class BreedingTests
private static unsafe void DataApiVersion()
{
Check.Eq(RynthIltDataApiV1.InterfaceVersion, 2u, "version 2");
Check.True(RynthIltDataApiV1.V1Size < (uint)sizeof(RynthIltDataApiV1), "v2 appends to v1");
// Version 3 (the Temple guardians) appends after the breeding pair; a v2 reader sees the same breeding layout.
Check.Eq(RynthIltDataApiV1.InterfaceVersion, 3u, "version 3");
Check.True(RynthIltDataApiV1.V1Size < RynthIltDataApiV1.V2Size && RynthIltDataApiV1.V2Size < (uint)sizeof(RynthIltDataApiV1),
"v2 appends to v1, v3 to v2");
Check.Eq(RynthIltDataApiV1.V1Size, (uint)(8 + 4 * sizeof(IntPtr)), "v1 = two uints and four function pointers");
Check.True(DataInterface.Query(RynthIltDataApiV1.InterfaceName, 1) != IntPtr.Zero, "v1 readers still get the table");
Check.True(DataInterface.Query(RynthIltDataApiV1.InterfaceName, 2) != IntPtr.Zero, "v2 readers too");
Check.True(DataInterface.Query(RynthIltDataApiV1.InterfaceName, 3) == IntPtr.Zero, "a future version isn't claimed");
Check.True(DataInterface.Query(RynthIltDataApiV1.InterfaceName, 3) != IntPtr.Zero, "v3 readers too");
Check.True(DataInterface.Query(RynthIltDataApiV1.InterfaceName, 4) == IntPtr.Zero, "a future version isn't claimed");
var t = (RynthIltDataApiV1*)DataInterface.Query(RynthIltDataApiV1.InterfaceName, 1);
Check.True(t->GetPetBreedingJson != null && t->PetBreedingCommand != null, "breeding functions filled");
Check.Eq(RynthIltHub.SectionPetBreeding, "pets-breeding", "section id");

View file

@ -19,6 +19,7 @@ internal static class DataApiTests
r.Add("data: the bank JSON reads back whole: characters (current first), choices, notes, log", BankRoundTrip);
r.Add("data: the bank verb lines carry their fields in RunVerb's order", BankVerbs);
r.Add("data: bad bank JSON reads as nothing", BankBadJson);
r.Add("data: the Temple guardian JSON reads back whole (switches, answer, hand-in, rows)", GuardianRoundTrip);
// Last: Release() switches the table off for the rest of the process.
r.Add("data: the RynthILT.Data table: query, functions, release", DataTable);
}
@ -82,17 +83,53 @@ internal static class DataApiTests
Check.True(empty.Loaded && !empty.Available && empty.Enabled == -1 && empty.Characters.Count == 0, "missing fields read as nothing known");
}
/// <summary>
/// Version 3: the guardian JSON RynthILT builds (IltGuardian.BuildJson) read back by the reader
/// RynthOracle's Quests tab uses, quotes and all.
/// </summary>
private static void GuardianRoundTrip()
{
var rows = new[]
{
new IltTempleAttrStatus("Strength", "Fiun \"Big\" Strongarm", 3, "Ready", "", true, true),
new IltTempleAttrStatus("Focus", "Fiun Thinker", 1, "Cooldown", "in 5h 2m", false, false),
};
string json = IltGuardian.BuildJson("InfiniteLeaftide", chat: true, auto: false, buy: true, cooldownHours: 20,
answer: "Pyreal", npc: "Guardian of Attribute Enlightenment", answerAgeSec: 42, heard: "What is \"coin\"?",
running: true, status: "handing Pyreal to Guardian...", syncedUtc: new DateTime(2026, 10, 18, 19, 5, 0, DateTimeKind.Utc), rows);
Check.True(json.All(c => c >= 0x20 && c <= 0x7E), "plain printable ASCII");
IltGuardianView v = IltGuardianView.Parse(json);
Check.True(v.Loaded && v.Available && v.World == "InfiniteLeaftide", "loaded, the world");
Check.True(v.Chat && !v.Auto && v.Buy && v.CooldownHours == 20, "the switches");
Check.True(v.Answer == "Pyreal" && v.Npc == "Guardian of Attribute Enlightenment" && v.AnswerAgeSec == 42 && v.Heard == "What is \"coin\"?",
"the last answer");
Check.True(v.Running && v.Status.StartsWith("handing Pyreal"), "the hand-in");
Check.Eq(v.SyncedUtc, new DateTime(2026, 10, 18, 19, 5, 0, DateTimeKind.Utc), "the /qb read time");
Check.Eq(v.Rows.Count, 2, "both rows");
Check.True(v.Rows[0].Npc == "Fiun \"Big\" Strongarm" && v.Rows[0].Count == 3 && v.Rows[0].Ready && v.Rows[0].Exact, "an exact, ready row");
Check.True(v.Rows[1].Eta == "in 5h 2m" && !v.Rows[1].Ready && !v.Rows[1].Exact, "an estimated row on cooldown");
IltGuardianView none = IltGuardianView.Parse(IltGuardian.BuildJson("x", false, false, false, 1, "", "", -1, "", false, "idle",
DateTime.MinValue, Array.Empty<IltTempleAttrStatus>()));
Check.True(none.Answer.Length == 0 && none.AnswerAgeSec == -1 && none.SyncedUtc == DateTime.MinValue && none.Rows.Count == 0,
"no answer, no /qb read, no rows");
}
private static unsafe void DataTable()
{
Check.Eq(DataInterface.Query("RynthILT.Hub", 1), IntPtr.Zero, "another interface's name: not ours");
Check.Eq(DataInterface.Query(RynthIltDataApiV1.InterfaceName, 3), IntPtr.Zero, "a newer version than we have: none");
Check.Eq(DataInterface.Query(RynthIltDataApiV1.InterfaceName, 4), IntPtr.Zero, "a newer version than we have: none");
var t = (RynthIltDataApiV1*)DataInterface.Query(RynthIltDataApiV1.InterfaceName, 1);
Check.True(t != null, "v1 is served");
Check.Eq(t->Version, 2u, "Version 2 (v1 readers take it: it starts with the v1 table)");
Check.Eq(t->Version, 3u, "Version 3 (v1 and v2 readers take it: it starts with their tables)");
Check.Eq(t->StructSize, (uint)sizeof(RynthIltDataApiV1), "StructSize");
Check.Eq(sizeof(RynthIltDataApiV1), 8 + 6 * IntPtr.Size, "header + 6 functions (v1's 4, then the breeding pair)");
Check.Eq(sizeof(RynthIltDataApiV1), 8 + 8 * IntPtr.Size, "header + 8 functions (v1's 4, the breeding pair, the guardian pair)");
Check.Eq(RynthIltDataApiV1.V1Size, (uint)(8 + 4 * IntPtr.Size), "a v1 table ends before the breeding pair");
Check.Eq(RynthIltDataApiV1.V2Size, (uint)(8 + 6 * IntPtr.Size), "a v2 table ends before the guardian pair (readers still see breeding on it)");
Check.True(t->GetCharmsJson != null && t->GetBankJson != null && t->ToggleCharm != null && t->BankCommand != null
&& t->GetPetBreedingJson != null && t->PetBreedingCommand != null, "every function is filled in");
&& t->GetPetBreedingJson != null && t->PetBreedingCommand != null
&& t->GetGuardianJson != null && t->GuardianCommand != null, "every function is filled in");
Check.Eq((IntPtr)t, DataInterface.Query(RynthIltDataApiV1.InterfaceName, 1), "the same table each time");
// No plugin instance here (not logged in): nothing to report, every action refused.
@ -104,6 +141,8 @@ internal static class DataApiTests
Check.Eq(t->BankCommand(verb), 0, "no bank command before login");
Check.Eq(t->GetPetBreedingJson(buf, 64), 0, "no breeding JSON before login");
Check.Eq(t->PetBreedingCommand(verb), 0, "no breeding command before login");
Check.Eq(t->GetGuardianJson(buf, 64), 0, "no guardian JSON before login");
Check.Eq(t->GuardianCommand(verb), 0, "no guardian command before login");
DataInterface.Release();
Check.Eq(t->Version, 0u, "Release zeroes Version (readers re-query)");

View file

@ -1,21 +1,24 @@
using System;
using System.Text;
using System.Text.Json;
using RynthCore.Plugin.RynthILT;
using RynthCore.Plugin.RynthILT.Hub;
using RynthCore.RynthAiTests.Harness;
namespace RynthILT.Tests;
// Leaftide feature list (IltFeatureCatalog): every feature the player asked RynthILT to cover is
// listed and the states follow the server bits. Also the NUL-terminated copy RynthILT's interfaces
// ("RynthServer.Profile", "RynthILT.Data") hand their JSON out with.
// Leaftide feature list (IltFeatureCatalog) and the "RynthILT.Server" profile it builds: every
// feature the player asked RynthILT to cover is listed, states follow the server bits, and the JSON
// other plugins read (RynthOracle's Fellowship tab) is valid ASCII with the fellowship rules.
internal static class FeatureCatalogTests
{
public static void Register(Runner r)
{
r.Add("features: banking, guardian, attributes, augs, paragon x3, split arrows, T11 and fellowship are listed", Listed);
r.Add("features: state follows the server bit on ILT, built-ins are on, nothing is known off ILT", States);
r.Add("features: profile JSON is valid ASCII with features and the fellowship rules", ProfileJson);
r.Add("features: the interface copies the JSON only when it fits, NUL-terminated", InterfaceWrite);
r.Add("features: the /qb list rides the profile JSON on ILT worlds only", QuestBonusJson);
r.Add("features: the ILT profile is on with the world; a refusal in chat turns a feature off", ProfileOnWithTheWorld);
r.Add("features: probed features read checking; options ILT runs off are off until chat shows them", ProbedAndOffInIlt);
r.Add("features: charms are on with the ILT world unless refused; rows describe themselves", Charms);
@ -86,6 +89,27 @@ internal static class FeatureCatalogTests
Check.Eq(IltFeatureCatalog.Describe("something_new").Group, IltFeatureCatalog.GroupOther, "an unknown bit goes to Other");
}
private static void QuestBonusJson()
{
var qb = new IltQuestBonusInfo(false, 2, 41, "2 completed, 1 incomplete",
new[] { "flag\"one", "flagTwo" }, new[] { "flagThree" });
string json = IltFeatureCatalog.BuildProfileJson(true, "Infinite Leaftide", false, "probe", DateTime.MinValue, _ => IltTri.On, qb);
using JsonDocument doc = JsonDocument.Parse(json);
JsonElement q = doc.RootElement.GetProperty("questBonus");
Check.False(q.GetProperty("disabled").GetBoolean(), "enabled");
Check.Eq(q.GetProperty("generation").GetInt32(), 2, "generation");
Check.Eq(q.GetProperty("count").GetInt64(), 41L, "count");
Check.Eq(q.GetProperty("status").GetString(), "2 completed, 1 incomplete", "status");
Check.Eq(q.GetProperty("completed").GetArrayLength(), 2, "completed flags");
Check.Eq(q.GetProperty("completed")[0].GetString(), "flag\"one", "quotes in a flag survive");
Check.Eq(q.GetProperty("incomplete")[0].GetString(), "flagThree", "incomplete flags");
Check.True(doc.RootElement.TryGetProperty("fellowship", out _), "the fellowship rules are still there");
string off = IltFeatureCatalog.BuildProfileJson(false, "", false, "", DateTime.MinValue, _ => IltTri.On, qb);
using JsonDocument d2 = JsonDocument.Parse(off);
Check.False(d2.RootElement.TryGetProperty("questBonus", out _), "off ILT: no /qb list");
}
private static readonly string[] Requested =
{
"bank", "guardian", "attributes", "augmentations", "paragon_armor", "paragon_weapons",
@ -121,19 +145,45 @@ internal static class FeatureCatalogTests
Check.Eq(IltFeatureCatalog.FellowshipMax(false), 9, "retail fellowships hold 9");
}
private static void ProfileJson()
{
string json = IltFeatureCatalog.BuildProfileJson(true, "Infinite \"Leaftide\"", false, "probe",
new DateTime(2026, 10, 13, 21, 25, 37, DateTimeKind.Utc),
key => key == IltFeature.FBlackjack ? IltTri.Off : IltTri.On);
bool ascii = true;
foreach (char c in json) if (c < 0x20 || c > 0x7E) ascii = false;
Check.True(ascii, "plain printable ASCII");
using JsonDocument doc = JsonDocument.Parse(json);
JsonElement root = doc.RootElement;
Check.True(root.GetProperty("ilt").GetBoolean(), "ilt");
Check.Eq(root.GetProperty("world").GetString(), "Infinite \"Leaftide\"", "quotes in the world name survive");
Check.Eq(root.GetProperty("checked").GetString(), "2026-10-13T21:25:37Z", "checked time in UTC");
Check.Eq(root.GetProperty("features").GetArrayLength(), IltFeatureCatalog.All.Length, "every feature in the JSON");
JsonElement fel = root.GetProperty("fellowship");
Check.Eq(fel.GetProperty("maxMembers").GetInt32(), 29, "fellowship size");
Check.Eq(fel.GetProperty("zoneShare").GetInt32(), 1, "Zone Share on (built in)");
Check.Eq(fel.GetProperty("blackjack").GetInt32(), 0, "Fellowship Blackjack off (server bit)");
string off = IltFeatureCatalog.BuildProfileJson(false, "", false, "", DateTime.MinValue, _ => IltTri.On);
using JsonDocument d2 = JsonDocument.Parse(off);
Check.Eq(d2.RootElement.GetProperty("fellowship").GetProperty("maxMembers").GetInt32(), 9, "off ILT: retail size");
Check.Eq(d2.RootElement.GetProperty("checked").GetString(), "", "never checked: empty time");
}
private static unsafe void InterfaceWrite()
{
const string json = "{\"ilt\":true}";
byte* small = stackalloc byte[4];
small[0] = 0x55;
Check.Eq(ProfileInterface.Write(json, small, 4), json.Length, "too small: the length is returned");
Check.Eq(ServerInterface.Write(json, small, 4), json.Length, "too small: the length is returned");
Check.Eq(small[0], (byte)0x55, "too small: nothing written");
byte* exact = stackalloc byte[json.Length];
Check.Eq(ProfileInterface.Write(json, exact, json.Length), json.Length, "no room for the NUL: too small");
Check.Eq(ServerInterface.Write(json, exact, json.Length), json.Length, "no room for the NUL: too small");
byte* big = stackalloc byte[64];
int n = ProfileInterface.Write(json, big, 64);
int n = ServerInterface.Write(json, big, 64);
Check.Eq(n, json.Length, "fits: the length without the NUL");
Check.Eq(big[n], (byte)0, "NUL-terminated");
Check.Eq(Encoding.UTF8.GetString(big, n), json, "the JSON copied whole");

View file

@ -1,20 +1,23 @@
using System;
using System.Linq;
using RynthCore.Plugin.RynthAi.Huds;
using RynthCore.Plugin.RynthILT.IltFellowship;
using RynthCore.Plugin.Shared;
using RynthCore.RynthAiTests.Harness;
namespace RynthILT.Tests;
// ILT's fellowship commands (IltFellowship/IltFellowshipCommands.cs, ACECustom /fship) and the
// "servercommands" format they are kept in (Plugins/Shared/ServerCommandShare.cs), checked together.
// ILT's fellowship commands (IltFellowship/IltFellowshipCommands.cs, ACECustom /fship), the
// "servercommands" format both plugins compile (Plugins/Shared/ServerCommandShare.cs), and
// RynthAi's store for it (Huds/ServerCommandModel.cs), checked together.
internal static class FellowshipCommandTests
{
public static void Register(Runner r)
{
r.Add("ilt fellowship: the /fship list round-trips through the servercommands format", RoundTrip);
r.Add("ilt fellowship: the /fship list round-trips to RynthAi", RoundTrip);
r.Add("ilt fellowship: chat lines quote multi-word names and need a name for create", Compose);
r.Add("ilt fellowship: bad commands and payloads are dropped", Rejects);
r.Add("ilt fellowship: RynthAi drops a list that is cleared or stops arriving", Store);
r.Add("ilt fellowship: RynthCore's verdict decides, else the world name", Active);
}
@ -83,6 +86,28 @@ internal static class FellowshipCommandTests
Check.Eq(c.Tooltip, "line one line two", "newline in a field becomes a space");
}
private static void Store()
{
ServerCommandModel.Clear();
long t = 1_000_000;
ServerCommandModel.Apply(IltFellowshipCommands.Payload(active: true), t);
Check.True(ServerCommandModel.For("fellowship", t + 1000) != null, "current");
Check.True(ServerCommandModel.For("FELLOWSHIP", t + 1000) != null, "section id ignores case");
Check.True(ServerCommandModel.For("char", t + 1000) == null, "other sections empty");
Check.True(ServerCommandModel.For("fellowship", t + ServerCommandModel.StaleMs + 1) == null, "stale after the window");
ServerCommandModel.Apply(IltFellowshipCommands.Payload(active: true), t + 10_000);
Check.True(ServerCommandModel.For("fellowship", t + ServerCommandModel.StaleMs + 1) != null, "a re-send keeps it");
ServerCommandModel.Apply(IltFellowshipCommands.Payload(active: false), t + 12_000);
Check.True(ServerCommandModel.For("fellowship", t + 12_000) == null, "the clear removes it");
ServerCommandModel.Apply(IltFellowshipCommands.Payload(active: true), t);
ServerCommandModel.Apply("garbage", t);
Check.True(ServerCommandModel.For("fellowship", t) != null, "garbage changes nothing");
ServerCommandModel.Clear();
Check.True(ServerCommandModel.For("fellowship", t) == null, "logout clears");
}
private static void Active()
{
Check.True(IltFellowshipCommands.IsActive(true, "Coldeve"), "RynthCore says ILT");

View file

@ -2,82 +2,110 @@ using System;
using System.Collections.Generic;
using System.Linq;
using RynthCore.Plugin.RynthILT.IltSettingsView;
using RynthCore.Plugin.Shared;
using RynthCore.RynthAiTests.Harness;
namespace RynthILT.Tests;
// RynthILT's copy of the ILT settings (IltSettingsView/IltSettingsModel.cs): RynthCore's server
// list (plugin API v86, GetServerStateJson: verdict, override, reason), the Hub's feature read, the
// engine verdict the Hub follows (IltEngineVerdict), and the RynthCore commands the view sends.
// RynthILT's copy of the ILT settings (IltSettingsView/IltSettingsModel.cs): RynthCore's "servermenu"
// push (verdict, override, world names), the Hub's feature read (and the older "iltfeatures" text),
// the engine verdict the Hub follows (IltEngineVerdict), and the RynthCore commands the view sends.
internal static class IltSettingsTests
{
public static void Register(Runner r)
{
r.Add("ilt settings: RynthCore's server list gives the ILT verdict, override and reason", ServerList);
r.Add("ilt settings: a list without ILT, or no list at all, reads as such", NoIlt);
r.Add("ilt settings: the Hub's feature read is published whole", FeatureRead);
r.Add("ilt settings: RynthCore's push gives the ILT verdict, override, reason and world names", EnginePush);
r.Add("ilt settings: an older RynthCore push (no reason, no names) still reads", OlderEnginePush);
r.Add("ilt settings: malformed or foreign payloads publish nothing", Malformed);
r.Add("ilt settings: the Hub's feature read and the older text form both read", FeatureRoundTrip);
r.Add("ilt settings: the Hub follows RynthCore's ILT verdict once one arrives", EngineVerdict);
r.Add("ilt settings: override and world-name commands are checked before sending", Commands);
r.Add("ilt settings: logout clears the copy", ClearOnLogout);
}
// GetServerStateJson as RynthCore writes it (UI/Sections/ServerStateJson.cs, schema 1).
private const string State =
"{\"schema\":1,\"revision\":3,\"host\":\"infiniteleaftide.online\",\"world\":\"InfiniteLeaftide\",\"pick\":\"auto\"," +
"\"active\":\"ilt\",\"activeName\":\"Infinite Leaftide\",\"activePlugin\":\"RynthILT\",\"servers\":[" +
"{\"id\":\"ilt\",\"name\":\"Infinite Leaftide\",\"active\":true,\"detected\":false,\"force\":\"on\",\"builtIn\":true," +
"\"plugin\":\"RynthILT\",\"reason\":\"forced on for this character\"}," +
"{\"id\":\"aelrynth\",\"name\":\"Aelrynth\",\"active\":false,\"detected\":false,\"force\":\"auto\",\"builtIn\":true," +
"\"plugin\":\"\",\"reason\":\"not detected\"}]}";
private const string Push =
"V\tilt\tInfinite Leaftide\t1\ton\t0\tforced on for this character\n" +
"V\taelrynth\tAelrynth\t0\tauto\t0\tnot detected\n" +
"X\tchar\tChar\n" +
"S\tilt\tInfinite Leaftide\t1\t/rc server ilt on\n" +
"I\tBounties\t/rc bounties toggle\tBounties.\t\n" +
"N\tilt\tInfiniteLeaftide\tengine.json\n" +
"N\tilt\t*Frost*\tengine.json\n" +
"N\taelrynth\tAel*\tdefault\n";
private const string NoIltState =
"{\"schema\":1,\"revision\":1,\"active\":\"\",\"servers\":[" +
"{\"id\":\"aelrynth\",\"name\":\"Aelrynth\",\"active\":true,\"detected\":true,\"force\":\"auto\"}]}";
private static void ServerList()
private static void EnginePush()
{
IltEngineView? v = IltSettingsModel.FromServerState(EngineServerState.Parse(State));
Check.True(v?.Server != null, "the ILT server is there");
Check.Eq(v!.Server!.Name, "Infinite Leaftide", "name");
IltEngineView? v = IltSettingsModel.ParseEngine(Push);
Check.True(v != null, "parsed");
Check.True(v!.Server != null, "the ILT server is there");
Check.Eq(v.Server!.Name, "Infinite Leaftide", "name");
Check.True(v.Server.Active, "active");
Check.False(v.Server.Detected, "not detected (forced)");
Check.Eq(v.Server.Force, "on", "override");
Check.Eq(v.Server.Reason, "forced on for this character", "reason");
IltEngineView? odd = IltSettingsModel.FromServerState(EngineServerState.Parse(
"{\"schema\":1,\"servers\":[{\"id\":\"ILT\",\"force\":\"WEIRD\"}]}"));
Check.True(odd?.Server != null, "the id ignores case");
Check.Eq(odd!.Server!.Force, "auto", "an unknown override shows as auto");
Check.Eq(odd.Server.Name, "Infinite Leaftide", "a missing name gets the server's");
Check.False(odd.Server.Active, "a missing flag is off");
Check.Eq(string.Join(",", v.Names), "InfiniteLeaftide,*Frost*", "only ILT's world names");
Check.False(v.NamesDefault, "from engine.json");
}
private static void NoIlt()
private static void OlderEnginePush()
{
IltEngineView? none = IltSettingsModel.FromServerState(EngineServerState.Parse(NoIltState));
Check.True(none != null && none.Server == null, "a list without ILT says so (not 'waiting')");
Check.True(IltSettingsModel.FromServerState(null) == null, "no list: nothing");
Check.True(EngineServerState.Parse("") == null && EngineServerState.Parse("{\"schema\":2}") == null, "empty or another schema: no list");
IltEngineView? v = IltSettingsModel.ParseEngine("V\tilt\tInfinite Leaftide\t0\tWEIRD\t0\n");
Check.True(v?.Server != null, "parsed");
Check.Eq(v!.Server!.Reason, "", "no reason field");
Check.Eq(v.Server.Force, "auto", "an unknown override shows as auto");
Check.Eq(v.Names.Length, 0, "no names");
var model = new IltSettingsModel();
model.ApplyServerState(EngineServerState.Parse(State));
model.ApplyServerState(null);
Check.True(model.Engine?.Server?.Active == true, "no answer keeps the last list");
IltEngineView? none = IltSettingsModel.ParseEngine("V\taelrynth\tAelrynth\t1\tauto\t1\tx\n");
Check.True(none != null && none.Server == null, "a push without ILT says so (not 'waiting')");
}
private static void FeatureRead()
private static void Malformed()
{
Check.True(IltSettingsModel.ParseEngine(null) == null, "null");
Check.True(IltSettingsModel.ParseEngine("") == null, "empty");
Check.True(IltSettingsModel.ParseEngine("S\tilt\tx\t1\t\nI\ta\tb\tc\td\n") == null, "RynthAi-only lines aren't a verdict");
Check.True(IltSettingsModel.ParseEngine("V\tilt\n\t\t\n") == null, "short V line skipped");
Check.True(IltSettingsModel.ParseEngine(new string('V', IltSettingsModel.MaxPayload + 1)) == null, "oversized");
Check.True(IltSettingsModel.ParseFeatures("F\tbank\tnotanumber\n") == null, "bad value skipped");
var model = new IltSettingsModel();
var read = new IltFeatureView("Infinite Leaftide", "probe", "12:00:00", Checking: true, IltLike: true,
model.ApplyEngine(Push);
model.ApplyEngine("garbage");
Check.True(model.Engine?.Server?.Active == true, "garbage keeps the last good push");
}
private static void FeatureRoundTrip()
{
// The older "iltfeatures" text form (W / R / F lines) still parses.
const string payload =
"W\tInfinite Leaftide\n" +
"R\tprobe\t12:00:00\t0\t1\n" +
"F\tbank\t1\n" +
"F\tpowerball\t0\n" +
"F\tcharm:guardianhand\t-1\n" +
"F\tclamped\t5\n";
IltFeatureView? f = IltSettingsModel.ParseFeatures(payload);
Check.True(f != null, "parsed");
Check.Eq(f!.World, "Infinite Leaftide", "world");
Check.Eq(f.Source, "probe", "source");
Check.Eq(f.LastCheck, "12:00:00", "last check");
Check.True(f.IltLike, "ilt-like");
Check.False(f.Checking, "not checking");
Check.Eq(f.Features.Length, 4, "every feature");
Check.Eq(f.Features.Single(k => k.Key == "bank").Value, 1, "on");
Check.Eq(f.Features.Single(k => k.Key == "powerball").Value, 0, "off");
Check.Eq(f.Features.Single(k => k.Key == "charm:guardianhand").Value, -1, "unknown");
Check.Eq(f.Features.Single(k => k.Key == "clamped").Value, 1, "out-of-range value clamped");
Check.Eq(IltSettingsModel.StateText(0), "off", "0 is off (not unknown)");
Check.Eq(IltSettingsModel.StateText(-1), "unknown", "-1 is unknown");
// The Hub's own read is published as a whole snapshot; null clears it.
var model = new IltSettingsModel();
var read = new IltFeatureView("Infinite Leaftide", "dump", "", Checking: true, IltLike: true,
new[] { new KeyValuePair<string, int>("bank", 1) });
model.PublishFeatures(read);
Check.True(ReferenceEquals(model.Features, read), "published as is");
model.PublishFeatures(null);
Check.True(model.Features == null, "cleared while there is no Hub");
Check.Eq(IltSettingsModel.StateText(1), "on", "1 is on");
Check.Eq(IltSettingsModel.StateText(0), "off", "0 is off (not unknown)");
Check.Eq(IltSettingsModel.StateText(-1), "unknown", "-1 is unknown");
}
private static void EngineVerdict()
@ -86,13 +114,13 @@ internal static class IltSettingsTests
try
{
IltEngineVerdict.Attach(model);
Check.False(IltEngineVerdict.Pushed, "nothing sent yet");
Check.False(IltEngineVerdict.Pushed, "nothing pushed yet");
Check.True(IltEngineVerdict.Active == null, "no verdict: RynthILT's own list decides");
model.ApplyServerState(EngineServerState.Parse(State));
Check.True(IltEngineVerdict.Pushed, "sent");
model.ApplyEngine(Push);
Check.True(IltEngineVerdict.Pushed, "pushed");
Check.True(IltEngineVerdict.Active == true, "RynthCore says ILT");
model.ApplyServerState(EngineServerState.Parse(NoIltState));
Check.True(IltEngineVerdict.Pushed && IltEngineVerdict.Active == null, "a list without ILT gives no ILT verdict");
model.ApplyEngine("V\taelrynth\tAelrynth\t1\tauto\t1\tx\n");
Check.True(IltEngineVerdict.Pushed && IltEngineVerdict.Active == null, "a push without ILT gives no ILT verdict");
model.Clear();
Check.False(IltEngineVerdict.Pushed, "logout forgets it");
}
@ -105,7 +133,6 @@ internal static class IltSettingsTests
Check.Eq(IltSettingsModel.ForceCommand("on"), "/rc server ilt on", "on");
Check.Eq(IltSettingsModel.ForceCommand("auto"), "/rc server ilt auto", "auto");
Check.Eq(IltSettingsModel.ForceCommand("maybe"), "", "unknown mode sends nothing");
Check.Eq(IltSettingsModel.NamesListCommand, "/rc server names ilt", "the names are listed by RynthCore");
Check.Eq(IltSettingsModel.NamesCommand(true, " *Frost* ", out _), "/rc server names ilt add *Frost*", "add, trimmed");
Check.Eq(IltSettingsModel.NamesCommand(false, "Infinite Leaftide", out _), "/rc server names ilt remove Infinite Leaftide", "remove");
@ -119,8 +146,8 @@ internal static class IltSettingsTests
private static void ClearOnLogout()
{
var model = new IltSettingsModel();
model.ApplyServerState(EngineServerState.Parse(State));
model.PublishFeatures(new IltFeatureView("w", "", "", false, true, Array.Empty<KeyValuePair<string, int>>()));
model.ApplyEngine(Push);
model.ApplyFeatures("F\tbank\t1\n");
Check.True(model.Engine != null && model.Features != null, "both copies");
model.Clear();
Check.True(model.Engine == null && model.Features == null, "cleared");

View file

@ -32,9 +32,8 @@ internal static class MoveTests
r.Add("move: the interface structs have the agreed layout", InterfaceLayout);
r.Add("move: server-list status lines", DescribeLines);
r.Add("move: off ILT nothing is sent, no tab or section shows; on ILT the login probe runs", DormantOffIlt);
r.Add("move: the charms JSON for RynthILT.Data readers carries the Guardian Hands", CharmsReaderJson);
r.Add("move: Character redirects to RynthOracle; Charms and Banking stay RynthILT's tabs", MovedSections);
r.Add("sections: RynthILT's manifest (rates, /fship, /qb) is valid schema-1 JSON with its own surfaces", SectionsManifest);
r.Add("move: Character / Charms / Banking redirect to RynthOracle and Global Inventory", MovedSections);
r.Add("move: the charms JSON RynthOracle reads carries the Guardian Hands", CharmsReaderJson);
// Last: Release() switches the table off for the rest of the process.
r.Add("move: the RynthILT.Hub table: query, functions, release", HubTable);
}
@ -365,8 +364,8 @@ internal static class MoveTests
Check.Eq(sizeof(IltTabV1), 24 + 32 + 4 + 4 + 4, "IltTabV1: id, label, width, height, flags");
Check.Eq((int)Marshal.OffsetOf<IltTabV1>(nameof(IltTabV1.Flags)), 64, "IltTabV1.Flags offset");
Check.Eq(sizeof(RynthIltHubApiV1), 8 + 9 * IntPtr.Size, "RynthIltHubApiV1: header + 9 functions");
// SessionStatsMore was appended (2026-10-13); readers accept any table at least
// BaseStructSize long, so an older RynthAi still connects.
// 10 functions in the first release, then SessionStatsMore appended (2026-10-13); readers accept
// any table at least BaseStructSize long, so an older RynthAi still connects.
Check.Eq(sizeof(RynthAiHubApiV1), 8 + 11 * IntPtr.Size, "RynthAiHubApiV1: header + 11 functions");
Check.Eq((int)RynthAiHubApiV1.BaseStructSize, 8 + 10 * IntPtr.Size, "RynthAiHubApiV1.BaseStructSize: the first release's 10 functions");
Check.Eq(RynthAiHubApiV1.SessionStatsMoreOffset, (int)RynthAiHubApiV1.BaseStructSize, "SessionStatsMore right after the base table");
@ -401,6 +400,21 @@ internal static class MoveTests
while (DateTime.UtcNow < until) { hub.Tick(); System.Threading.Thread.Sleep(50); }
}
/// <summary>The Mini Remote tabs that moved out (2026-10-13) map to their new homes' commands.</summary>
private static void MovedSections()
{
Check.Eq(IltSections.MovedCommand(IltSection.Character), IltSections.OracleCharacterCommand, "Character -> RynthOracle Character");
Check.Eq(IltSections.MovedCommand(IltSection.Charms), IltSections.OracleCharacterCommand, "Charms -> RynthOracle Character");
Check.Eq(IltSections.MovedCommand(IltSection.Banking), IltSections.GlobalBankCommand, "Banking -> Global Inventory Banking");
Check.True(IltSections.MovedCommand(IltSection.Gear) == null && IltSections.MovedCommand(IltSection.Games) == null,
"Gear and Games are still Mini Remote tabs");
Check.True(IltSections.Tabs.SequenceEqual(new[] { IltSection.Gear, IltSection.Games }), "the tab list is Gear, Games");
foreach (var moved in new[] { IltSection.Character, IltSection.Charms, IltSection.Banking })
Check.False(IltSections.IsTab(moved), $"{IltSections.Label(moved)} isn't a tab");
Check.Eq(IltSections.OracleCharacterCommand, "/ro character", "Oracle command");
Check.Eq(IltSections.GlobalBankCommand, "/ginv bank", "Global Inventory command");
}
/// <summary>
/// The charms JSON behind "RynthILT.Data" is valid JSON; on ILT it has a "hands" array (empty
/// with no hand carried) that the shared reader parses, off ILT it has none and still parses.
@ -428,48 +442,6 @@ internal static class MoveTests
Check.True(IltCharmsView.Parse(offJson).Hands.Count == 0, "and the reader shows none");
}
/// <summary>The Character tab moved out (2026-10-13); every other ILT tab is still RynthILT's.</summary>
private static void MovedSections()
{
Check.Eq(IltSections.MovedCommand(IltSection.Character), IltSections.OracleCharacterCommand, "Character -> RynthOracle Character");
foreach (var kept in new[] { IltSection.Banking, IltSection.Gear, IltSection.Charms, IltSection.Games })
{
Check.True(IltSections.MovedCommand(kept) == null, $"{IltSections.Label(kept)} is still RynthILT's");
Check.True(IltSections.IsTab(kept), $"{IltSections.Label(kept)} is a Mini Remote tab");
}
Check.True(IltSections.Tabs.SequenceEqual(new[] { IltSection.Banking, IltSection.Gear, IltSection.Charms, IltSection.Games }),
"the tab list is Banking, Gear, Charms, Games");
Check.False(IltSections.IsTab(IltSection.Character) || IltSections.IsTab(IltSection.Guardian), "Character and the Guardian aren't tabs");
Check.True(IltSections.TryParse("char", out IltSection c) && c == IltSection.Character, "old Character names still parse (for the redirect)");
Check.Eq(IltSections.OracleCharacterCommand, "/ro character", "Oracle command");
}
/// <summary>
/// RynthILT's RynthPluginGetSectionsJson: schema 1 (UI/Sections/SectionManifest.cs in RynthCore),
/// every view an ILT one, each surface one RenderEmbed answers.
/// </summary>
private static void SectionsManifest()
{
using var doc = System.Text.Json.JsonDocument.Parse(RynthILTPlugin.SectionsJson);
var root = doc.RootElement;
Check.Eq(root.GetProperty("version").GetInt32(), 1, "schema 1");
var sections = root.GetProperty("sections");
Check.Eq(sections.GetArrayLength(), 1, "one section of RynthILT's own");
Check.Eq(sections[0].GetProperty("id").GetString(), "quests", "a Quests section (the /qb list)");
var surfaces = new System.Collections.Generic.List<string>();
foreach (var c in root.GetProperty("contributions").EnumerateArray())
{
Check.Eq(c.GetProperty("server").GetString(), "ilt", "an Infinite Leaftide view");
surfaces.Add(c.GetProperty("surface").GetString() ?? "");
}
Check.True(surfaces.SequenceEqual(new[] { RynthILTPlugin.RatesSurface, RynthILTPlugin.FellowshipSurface, RynthILTPlugin.QuestBonusSurface }),
"rates, fellowship, quest bonus: " + string.Join(",", surfaces));
Check.True(surfaces.All(s => s.StartsWith("section:ilt-", StringComparison.Ordinal) && s.Length <= 64), "short section:ilt-* surfaces");
Check.True(RynthILTPlugin.SectionsJson.All(ch => ch < 128), "ASCII only");
Check.True(RynthILTPlugin.IsParsedRemoteAction("servermenu") && RynthILTPlugin.IsParsedRemoteAction("ServerMenu")
&& !RynthILTPlugin.IsParsedRemoteAction("prog"), "RynthCore's servermenu push is answered, never queued as a verb");
}
private static void DormantOffIlt()
{
var off = NewHub("Aeshnidae", "dormant");
@ -492,11 +464,10 @@ internal static class MoveTests
Check.True(RynthCore.RynthAiHostTests.Fakes.FakeHost.ChatCommands.Count > 0, "on ILT the login probe asks the server");
Check.False(RynthCore.RynthAiHostTests.Fakes.FakeHost.ChatCommands.Any(c => c.Contains("/ilt features", StringComparison.OrdinalIgnoreCase)),
"the server is never asked for a feature list (the ILT profile is Rynth-side)");
// Character moved out of the Mini Remote (RynthOracle's Character tab, Session Stats);
// Charms and Banking are Infinite Leaftide's own screens and stay RynthILT's tabs.
Check.False(on.TabShown(IltSection.Character), "Character is no Mini Remote tab any more");
// Character, Charms and Banking moved out of the Mini Remote (RynthOracle / Global Inventory).
foreach (var moved in new[] { IltSection.Character, IltSection.Charms, IltSection.Banking })
Check.False(on.TabShown(moved), $"{IltSections.Label(moved)} is no Mini Remote tab any more");
Check.Eq(on.TabShown(IltSection.Gear), on.Available, "Gear shows once the server features are known");
Check.Eq(on.TabShown(IltSection.Charms), on.Available, "Charms too");
on.OnLogout();
var forced = NewHub("Aeshnidae", "forced");

View file

@ -39,15 +39,12 @@ internal static class Program
SigilChainTests.Register(runner);
BankCommandTests.Register(runner);
MoveTests.Register(runner);
ChunkTests.Register(runner);
ProfileTests.Register(runner);
FeatureCatalogTests.Register(runner);
IltSettingsTests.Register(runner);
FellowshipCommandTests.Register(runner);
AetheriaChunkTests.Register(runner);
RingChainTests.Register(runner);
// Before DataApiTests: its last test releases the RynthILT.Data table, which the breeding version test queries.
BreedingTests.Register(runner);
// Last: its table test calls DataInterface.Release(), which switches the table off for the rest of the run.
DataApiTests.Register(runner);
return runner.Run("RynthILT tests", args.Length > 0 ? args[0] : null);
}

View file

@ -35,6 +35,9 @@
</ItemGroup>
<ItemGroup>
<!-- ILT's /fship commands: RynthILT's list and the shared "servercommands" format (both in the
plugin above) checked against RynthAi's store for them. -->
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthAi\Huds\ServerCommandModel.cs" Link="RynthAi\ServerCommandModel.cs" />
<!-- The RynthAi test tools' check/runner harness and fake engine host (no plugin code in them). -->
<Compile Include="..\RynthCore.RynthAiTests\Harness\Check.cs" Link="Harness\Check.cs" />
<Compile Include="..\RynthCore.RynthAiTests\Harness\Runner.cs" Link="Harness\Runner.cs" />