feat(config): MatchingConfig section with AI-fallback threshold
Adds a [ConfigSection("Matching")] POCO carrying the
RankBattleAiFallbackThresholdSeconds tunable (default 15). Auto-picked
up by EnsureSeedDataAsync's reflection-based ConfigSection seeder.
Consumed by InProcessPairUp in a later task.
GameConfigurationJsonbTests.EnsureSeedData_writes_one_row_per_ConfigSection_with_ShippedDefaults_payload
updated to include the new Matching section in its expected keys.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
20
SVSim.Database/Models/Config/MatchingConfig.cs
Normal file
20
SVSim.Database/Models/Config/MatchingConfig.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace SVSim.Database.Models.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Tunables for the in-process pair-up matching service. Today: just the AI-fallback
|
||||
/// threshold for rank-battle modes. The full matching-queue API is a separate spec;
|
||||
/// this config section lives alongside the placeholder.
|
||||
/// </summary>
|
||||
[ConfigSection("Matching")]
|
||||
public class MatchingConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// How long (seconds) a viewer must have been parked in a PvpFirstThenAiFallback
|
||||
/// queue before their next /do_matching poll resolves to an AI battle.
|
||||
/// Defaults to 15 — matches the prod 4s pre-AIBattleStart pause plus a comfortable
|
||||
/// polling cycle.
|
||||
/// </summary>
|
||||
public int RankBattleAiFallbackThresholdSeconds { get; set; } = 15;
|
||||
|
||||
public static MatchingConfig ShippedDefaults() => new();
|
||||
}
|
||||
Reference in New Issue
Block a user