feat(economy): derived storage ceiling caps the AE account (#53, Sprint 16.4) - #73
Merged
Conversation
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
force-pushed
the
feat/16-4-storage-cap
branch
from
August 9, 2026 17:54
2ca0538 to
c9c28c6
Compare
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>
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.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.
DepositCapped; nicht passender Überschuss verfällt.long.MaxValueüberlauffrei.RulesHash64bindet 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
fc0568atests,docs-check,integrity,baseline-guard,external-contributor-reviewund Relay-Publish-Smoke grün.git diff --check: grün.quality/content/mvp-v1.jsonunverändert.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.