fix(construction): founding Harvester is born with a field order (#43, Sprint 16.1) - #68
Merged
Merged
Conversation
Sprint 16.1, three corrections to GrantFoundingHarvester: - ORDER: the granted Harvester now spawns with a standing harvest order on the nearest field with reserve left (Chebyshev from the footprint centre, ties to the lower registration index). The economy holds the order; the existing client/AI escorts drive the legs. No new command kind, no state field — same write class as the push-out's SetTarget. - LATCH: the grant fires only while the owner has no living Harvester, derived from the unit store (a counter field would break the economy block's fixed per-slot layout). Second Refineries and rebuilds no longer hand out free Harvesters; losing every Harvester re-arms the grant, which is the dead-end insurance it exists for. - LOGGING: every failure path (full entity store, missing faction definition, no free cell in 8 rings) logs instead of returning silently. Also closes the EditMode mirror drift: the .NET lane's grant tests were never mirrored; both copies of ConstructionSystemTests are now in sync again, including four new tests (order target, no-field case, latch, re-arm). Expected: golden-byte baselines move (the Determinism10000 scenario completes a Refinery site, so the grant fires there with a different state). Baseline reset lands in a SEPARATE PR per the standing rule; it cannot be produced on this machine (global.json pins SDK 8.0.318, only 10.0.302 installed) and needs an SDK-8 environment.
cubetribe
force-pushed
the
feat/16-1-founding-harvester
branch
from
August 9, 2026 17:52
2b9fe08 to
d930a4e
Compare
Der Fixture-Konfigurator in ConstructionSystemTests registriert seit 16.1 Aetheriumfelder ueber GridPos2D. Der Typ liegt in Nova.Simulation.Pathfinding, und das using fehlte in beiden Spiegeln - die CI brach mit CS0246 ab, bevor ein einziger Test lief. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rvester # Conflicts: # CHANGELOG.md
Der geschenkte Sammler startet seit 16.1 mit stehendem Ernteauftrag, damit endet die kanonische KI-Partie in einer anderen Wirtschaftslage. Der Entscheidungstick bleibt 2548, die KI-Kennung bleibt r5.779A1B5B - es hat sich die Simulation bewegt, nicht die KI (D-101). Alter Wert: 0x14472B2B943ED2BB Neuer Wert: 0x8C0B54F31F2986B7 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was
Sprint 16.1 (Beta-Issue #43) — drei Korrekturen an
ConstructionSystem.GrantFoundingHarvester:EconomySystem.TryFindNearestField— Chebyshev-Distanz ab Footprint-Zentrum, Gleichstand zugunsten des kleineren Registrierungsindex, erschöpfte Felder übersprungen). Der Kreislauf startet von allein: Die Economy hält den Auftrag („held, not dropped"), die Fahrt übernehmen die bereits existierenden Eskorten (RtsDeviceInput.UpdateHarvesterEscortfür den lokalen Spieler,SkirmishAiSystemfür die KI) — beide lesen genau dieses Feld. Kein neuerCommandKind, kein neues Zustandsfeld; dasselbe direkte Schreibmuster wieSetTargetim Push-out desselben Systems.FindLowestIndexBuilder), nicht gespeichert. Ein Zählerfeld wäre Formatbruch im Economy-Block (TryParseStatelehntStateVersion != 2ab). Zweite Raffinerie und Wiederaufbau schenken nichts mehr; verliert der Spieler alle Sammler, rüstet die Schenkung wieder auf — genau die Dead-End-Versicherung, für die sie existiert.LogWarn-Zeile statt still zu kehren. Der Latch-Fall und der Spawn ohne registriertes Feld sindLogInfo.Betroffene Bereiche
Simulation/Construction/ConstructionSystem.cs(Grant, Latch, Logger — Netzstrang-Terrain)Simulation/Economy/EconomySystem.cs(nur additiv:TryFindNearestField)tools/Nova.SimRunner.Tests/ConstructionSystemTests.cs+ EditMode-Spiegel[Unreleased]Spiegel-Drift geschlossen: Die Grant-Tests der .NET-Lane (
GrantsTheFirstHarvesterFree,PlaceCompletedBuilding_Refinery_GrantsNothing, HelferCountUnits) waren nie in den EditMode-Spiegel gewandert. Beide Kopien sind jetzt wieder zeilensynchron (bis auf Lane-Kopf/Namespace/sealed), inklusive vier neuer Tests: Auftragsziel, Fall ohne Felder, Latch, Wiederaufrüstung.Baseline-Erwartung (wichtig)
Das Determinism10000-Drehbuch stellt eine Raffinerie per Baustelle fertig — der Grant feuert dort, und der Sammler trägt ab jetzt
HarvestFieldId != 0im serialisierten Zustand. Die Golden-Byte-Tests werden in diesem PR erwartbar rot. Das ist der dokumentierte Ablauf: Die Baseline-Neusetzung kommt als eigener PR mit altem und neuem Wert. Ich kann sie auf dieser Maschine nicht erzeugen (global.jsonpinnt SDK 8.0.318 mitrollForward: disable, installiert ist 10.0.302) — sie braucht eine SDK-8-Umgebung.Nachweis (ehrlich)
dotnet test-Lauf möglich — Nachweis läuft über die CI. Vier neue Tests decken Auftragsziel, Latch, Wiederaufrüstung und den feldlosen Fall ab; bestehende Grant-Tests bleiben unverändert gültig.Changelog
Eine Zeile unter
[Unreleased]→ „#43: Der erste Sammler erntet von allein".