Skip to content

feat(economy): derived storage ceiling caps the AE account (#53, Sprint 16.4) - #73

Merged
cubetribe merged 4 commits into
mainfrom
feat/16-4-storage-cap
Aug 10, 2026
Merged

feat(economy): derived storage ceiling caps the AE account (#53, Sprint 16.4)#73
cubetribe merged 4 commits into
mainfrom
feat/16-4-storage-cap

Conversation

@cubetribe

@cubetribe cubetribe commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Was

Sprint 16.4 (Issue #53, D-024/D-096/D-106): Das AE-Konto erhält eine aus fertigen, lebenden Gebäuden abgeleitete Obergrenze ohne neues Zustandsfeld.

  • Mindestens ein fertiges HQ gibt genau eine Kontobasis von 2.000 AE; weitere HQs stapeln sie nicht.
  • Jedes fertige Lager addiert 2.000 AE; Baustellen zählen nicht.
  • Ernte und Rückerstattungen laufen über DepositCapped; nicht passender Überschuss verfällt.
  • Vorhandener Überhang verliert alle 10 Sim-Ticks 25 % seines aktuellen Werts, abgerundet und mindestens 1 AE. Das gilt für Start/Restore sowie nach Zerstörung, Verkauf oder Verlust des letzten HQ.
  • Die Rechnung ist bis long.MaxValue überlauffrei.
  • RulesHash64 bindet Revision 1 plus 2.000/2.000/25/10; Legacy-/Current-Replay und -Lockstep werden vor Tick 1 abgelehnt.

Entscheidung und Integration

D-106 wurde unter der ausdrücklichen Entscheidungsvollmacht des alleinigen Inhabers für diese Integrationskette protokolliert. D-024 und D-096 sind für Verlustausformung, HQ-Stapelung und Replay-Kompatibilität teilweise ersetzt; Radar bleibt unverändert.

Der aktuelle main-Stand aus #71 ist integriert. Sites behalten ihre Definitionsrolle und werden in Strom-, Raffinerie- und Kapazitätsscans über das Construction-Register als unfertig ausgeschlossen. Das menschliche MVP-Manifest stimmt wieder mit D-077 und der unveränderten JSON-Quelle überein: HQ + Builder + 3.000 AE.

Nachweise auf Head fc0568a

  • C#-Build: grün, 0 Fehler / 0 Warnungen.
  • Frische Pflicht-CI: tests, docs-check, integrity, baseline-guard, external-contributor-review und Relay-Publish-Smoke grün.
  • Doku/Links: 179 Markdown-Dateien + 5 Quality-JSONs grün.
  • git diff --check: grün.
  • Spiegelparität: Construction 34/34, EconomyIntegration 14/14, Economy 35/35, Harvester 3/3, Production 21/21 Methoden.
  • Zwei unabhängige Read-only-Abschlussreviews: keine offenen P1-P3-Befunde.
  • Geschützte Determinismus-Baselines und quality/content/mvp-v1.json unverändert.
  • Die letzte vollständige lokale Suite vor der abschließenden D-106-Härtung war 671/671 grün. Der lokale Testhost des finalen Heads konnte wegen des gesperrten vstest-Sockets nicht starten und wird nicht als bestanden gezählt; die frische CI ist der ausführbare Head-Nachweis.

Spiel- und Unity-Abnahme

Nicht gespielt. Der menschliche Tester ist für diese Integrationskette nicht verfügbar. Der Unity-Batchlauf des finalen Heads wurde vom Sandbox-Profil mit „Project folder or disk is read only“ vor Teststart abgewiesen; es gibt daher keinen finalen Unity-Testnachweis.

Ersatznachweis: C#-Build, vollständige Spiegelprüfung, Dokuprüfung, unabhängige Reviews und grüne Pflicht-CI. Restrisiko: Unity-spezifische Kompilierung sowie Spielgefühl/Lesbarkeit des sekündlichen Überhangabbaus sind auf diesem Head nicht manuell bestätigt. Nach D-105 ist der PR mergebar, aber nicht als gespielt oder als Meilensteinabnahme zu werten.

Changelog / Release

Genau ein Eintrag unter [Unreleased]: #53 (D-024/D-096/D-106). Release-Auswirkung: minor; kein Release oder Tag in diesem PR.

@cubetribe
cubetribe requested a review from travelhawk as a code owner August 9, 2026 17:28
Sprint 16.4, D-024/D-096. The account gains an upper bound DERIVED from
the living building stock on every read - never stored (a stored cap
would be a state field and a format break): a completed HQ provides the
2.000 AE base per HQ, every completed Storage adds 2.000, sites hold
nothing (via the bound site lookup).

- DepositCapped(playerId, amount) is now the only income path: harvest
  deposits, production cancel, construction cancel and sell refunds all
  clamp at the ceiling - overflow is forfeit ("Ueberschuss verfaellt").
- An existing balance above the ceiling decays by 25% of the excess
  once per second (tick % 10, integer floor, minimum 1 AE). The decay
  IS the D-024 "25% loss on destruction" carried without an event: a
  destroyed or sold storage drops the ceiling and the decay is the
  loss. Stateless and restore-safe by construction.
- The destruction-rule wording is an owner decision (decay over a
  slot-bound one-time loss): the slot of a destroyed storage is not
  reconstructible inside the hard bounds (despawned entity, ownerless
  PlacementState, KillUnit in the units track).

This branch also replicates the 16.3 site-lookup mechanism
(BindSiteLookup / IsActiveSite) VERBATIM from PR #71: the capacity scan
must exclude sites once sites carry their definition role. Identical
hunks at identical locations - whichever PR merges first, the other
merges clean.

Expected: golden-byte baselines move (the Determinism10000 opening
starts 1.000 AE over the HQ ceiling and decays; deposits clamp).
Baseline reset lands in a SEPARATE PR per the standing rule and needs
an SDK-8 environment.
@cubetribe
cubetribe merged commit e1970a9 into main Aug 10, 2026
8 checks passed
@cubetribe
cubetribe deleted the feat/16-4-storage-cap branch August 10, 2026 08:20
cubetribe added a commit that referenced this pull request Aug 10, 2026
…int 16.6) (#78)

* feat(economy): low power takes radar first and halves repair (C4)

Sprint 16.6, D-030/Economy.md shutdown order:

- Radar falls FIRST at a deficit: FogOfWarSystem.GetRadarSignatures
  returns nothing while the team's balance is low power. The economy
  becomes the third required constructor dependency (the compiler
  enumerated every host and rig again). MinimapHud goes dark with it -
  same balance, same read as the 16.5 radar gate.
- Production and construction keep the exact 0.5 Q16.16 speed penalty
  (existing).
- Repair halves exactly: 10 -> 5 HP/tick under low power (Economy.md
  repair rule; 10/2 is exact, no rounding).
- NOT included, by design: the defense shutdown. Whether a tower fires
  is CombatSystem's call alone, and Simulation/Combat/ has no notion of
  power - that input would be units-track terrain. Goes to 13B as a
  finding (Issue #70).

This branch REPLICATES the Sprint 16.5 state (PR #77: FogOfWarSystem
construction dependency, MinimapHud radar gate, BuildMenuHud radar
hint, all host/rig signature updates) as its base, because 16.6 builds
directly on the 16.5 radar functions and PR-only flow forbids stacking
on a local branch. Identical hunks in both merge directions: whichever
of #77 and this PR lands first, the other merges clean.

New tests: pings stop at deficit and resume on recovery (Fog), repair
halves exactly under low power (Construction). EditMode mirrors synced.
No baseline impact: low-power effects read committed balances; the
decay of 16.4 is what moves state, and that lands with #73.

* fix(test): der zweite Kampf-Fixture reicht economy weiter, nicht factions

Der Wiedergabe-Fixture in CombatSystemTests nennt seine Wirtschaft economy;
beim Nachziehen der 16.5-Signatur blieb an einer Stelle der Name des ersten
Fixtures (factions) stehen. Die CI brach mit CS0103 ab, bevor ein Test lief.
Beide Spiegel gleich gezogen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test(construction): keep normal repair fixture powered

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant