.NET API
StatePreflight
Tracon.Core.dllAnswers “can this build still read the state already in the database” WITHOUT writing anything and without starting the application.
public sealed class StatePreflightInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The question is normally answered in production, after the upgrade. This class moves it BEFORE the upgrade: it counts the stored schema generations across every tenant, compares them against what the running code writes, and tries to decode a small sample.
Nothing here writes. It reads through
IStatePreflightReader, which issues only SELECT
statements, and it never touches ISessionStore — restoring a
session through the normal path would stamp and save.
The decode probe builds a bare AI.ChatClientAgent over a chat
client that refuses every call. Microsoft Agent Framework’s
DeserializeSessionAsync never invokes the chat client, so a
preflight needs no model provider, no API key and no agent definition —
which is what lets it run from the CLI, against a database whose
application is not even up.
Constructors
Section titled “Constructors”StatePreflight(IStatePreflightReader)
Section titled “ StatePreflight(IStatePreflightReader)”Creates a new preflight over a read-only reader.
public StatePreflight(IStatePreflightReader reader)Parameters
Section titled “Parameters”reader IStatePreflightReader
The read-only source of stored state.
Exceptions
Section titled “Exceptions”reader is null.
Methods
Section titled “Methods”RunAsync(int, CancellationToken)
Section titled “ RunAsync(int, CancellationToken)”Runs the preflight.
public ValueTask<StatePreflightReport> RunAsync(int samplePerGeneration = 5, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”samplePerGeneration int
How many rows of EACH stored generation to decode. 0 counts
generations and decodes nothing.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<StatePreflightReport>
The report.
Exceptions
Section titled “Exceptions”samplePerGeneration is negative.