test: replace campaign labels with behavior names
This commit is contained in:
parent
e6fab96f12
commit
9c6b143a03
30 changed files with 135 additions and 97 deletions
|
|
@ -1,74 +0,0 @@
|
|||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace AcDream.App.Tests.World;
|
||||
|
||||
/// <summary>
|
||||
/// C3c-R1 F3 (coordinator resolution, 2026-08-02): the create-authority
|
||||
/// drift probes in the expectation-item 6/8 tests
|
||||
/// (LiveEntityHydrationControllerTests + LiveEntityCreateSupersessionRecoveryTests)
|
||||
/// hand-call <c>record.Canonical.AdvanceCreateAuthority()</c> as an HONEST
|
||||
/// MODEL of the executor drain's advance — the SOLE remaining production
|
||||
/// site that advances create authority for an existing incarnation. A
|
||||
/// nested production OnCreate can no longer produce that drift:
|
||||
/// post-residence ExistingGeneration registration is description-only
|
||||
/// (RuntimeEntityObjectLifetime gates the advance on
|
||||
/// <c>!beginInitialResidence</c>) and <c>ConsumeExecuted</c> removes the
|
||||
/// completed residence entry at Released, closing the FIFO-adoption path
|
||||
/// (empirically confirmed: the restored nested-OnCreate probe produced no
|
||||
/// drift and no CreateSupersessionRecovery). This pin flags the model as
|
||||
/// STALE if the production site ever moves or loses the advance — the
|
||||
/// item 6/8 probes must be re-derived from wherever it goes.
|
||||
/// </summary>
|
||||
public sealed class C3cR1F3DriftModelSourcePinTests
|
||||
{
|
||||
[Fact]
|
||||
public void HandCalledDriftProbe_StillModelsTheExecutorDrainAdvance()
|
||||
{
|
||||
string executor = ReadRuntimeSource(
|
||||
"Entities",
|
||||
"RuntimeInitialCreateContinuationExecutor.cs");
|
||||
|
||||
// Exactly one production advance, and it lives inside the
|
||||
// WeenieDescription drain stage the probes model.
|
||||
Assert.Single(
|
||||
Regex.Matches(executor, @"_entities\.AdvanceCreateAuthority\(")
|
||||
.Cast<Match>());
|
||||
Assert.Matches(
|
||||
new Regex(
|
||||
@"private bool ApplyWeenieDescriptionAction[\s\S]{0,6000}?"
|
||||
+ @"_entities\.AdvanceCreateAuthority\(canonical\);"),
|
||||
executor);
|
||||
|
||||
// The registration-time advance stays gated OFF the residence
|
||||
// route — the reason a nested production OnCreate cannot reach the
|
||||
// modeled drift.
|
||||
string lifetime = ReadRuntimeSource(
|
||||
"Entities",
|
||||
"RuntimeEntityObjectLifetime.cs");
|
||||
Assert.Matches(
|
||||
new Regex(
|
||||
@"if \(!beginInitialResidence\)\s*"
|
||||
+ @"Entities\.AdvanceCreateAuthority\(retained\);"),
|
||||
lifetime);
|
||||
}
|
||||
|
||||
private static string ReadRuntimeSource(params string[] relativePath)
|
||||
{
|
||||
DirectoryInfo? directory = new(AppContext.BaseDirectory);
|
||||
while (directory is not null)
|
||||
{
|
||||
if (File.Exists(Path.Combine(directory.FullName, "AcDream.slnx")))
|
||||
{
|
||||
return File.ReadAllText(Path.Combine(
|
||||
directory.FullName,
|
||||
"src",
|
||||
"AcDream.Runtime",
|
||||
Path.Combine(relativePath)));
|
||||
}
|
||||
|
||||
directory = directory.Parent;
|
||||
}
|
||||
|
||||
throw new DirectoryNotFoundException("Could not find AcDream.slnx.");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue