diff --git a/docs/aetheria-gravity-map.md b/docs/aetheria-gravity-map.md index 0ea6bf841..4a948f331 100644 --- a/docs/aetheria-gravity-map.md +++ b/docs/aetheria-gravity-map.md @@ -29,7 +29,13 @@ All read at c6519383 in the detached worktree `C:\aeth-wt\ag2-docs` on 2026-10-1 - **B9. What drag means for orbits.** Holding a circular orbit at speed v costs a tangential thrust of Drag·v against drag, plus whatever radial thrust the field mismatch needs. At v = 6.3 (today's rail speed) that is 0.63 u/s² for a Longinus (2-6% of its range), 1.26 for a Djinni (14-37%); at v = 17.5 it is 1.75 (5-16%) and 3.5 (39-100%). No free orbit exists for any hull with Drag > 0; with honest wells a ship in orbit needs only the drag term, where today it also fights a radial mismatch of 17-30% of thrust (probe F2). - **B10. Tide under superposed 1/r tails** (computed, `hill.py`, over the probe's bodies). 2D tidal radius of a parent at R from its own parent: d_H = R·sqrt(c_p/(2c_g)). Fraction of the 17,864 children of non-root parents that orbit inside 0.5·d_H: 11% if c ∝ mass, 35% for m^0.5, 59% for m^0.25, 66% for m^0.175; children of planets 1%, 10%, 30%, 38%. Speeds: if a median sun's field is 0.5 u/s² at 610 u, v_circ = 17.5 u/s around it and 12.4 around a median planet (m^0.175). - **B11. The flow has curl.** `FlowField.Slope` (FlowField.cs:53-59) adds a swirl term, the downhill direction rotated 90 degrees, and `Global` is a noise field: neither is a gradient, so no height can show them as slopes. No ship reads `Zone.Flow`; it drives stardust and nebula (shader) and, by ruling, fauna. -- **B12. A ruling in force contradicts the target.** `aetheria-release:ruling:one-gravity-law` (Defaulted, 2026-10-07) fixes the slope-squared law and "the feel ships have today". The target replaces both. Self supersedes it; this map does not. +- **B12. A ruling in force contradicts the target.** `aetheria-release:ruling:one-gravity-law` (Defaulted, 2026-10-07) fixes the slope-squared law and "the feel ships have today". The target replaces both. Superseded by Self on 2026-10-14. +- **B13. Removing a persisted member is compatible drift.** CultCache resolves a persisted schema against the local one slot by slot (`CultLib/src/GameCult.Caching/CultCache.cs`, `CompareSchemaShapes`, read 2026-10-14): a persisted slot the local type no longer has is listed in `IgnoredExtraSlots` with a warning, not an error. So deleting `GasGiantData` keys 14-17 (the wave fields) loads old run caches with a `content_hash_drift` warning. The shipped catalog `GameData/Aetheria.cc` holds no `aetheria.gasgiantdata` documents (B8's type listing); generated zone packs in run caches do. +- **B14. The zone bowl is exactly one well at the origin.** Bowl: `-PowerPulse(r/(2·Pack.Radius), ZoneDepthExponent)·ZoneDepth`. Well: `-PowerPulse(r/GravityWellRadius, GravityDepthExponent)·GravityWellDepth`, zero at and beyond half the radius either way (PowerPulse doubles then clamps). A `PlanetData` on a parentless orbit at `FixedPosition` zero, with `GravityRadius` constant 2·Pack.Radius, `GravityDepth` constant ZoneDepth and `GravityDepthExponent` = ZoneDepthExponent, gives the same height and force at every point. The five test fixtures that dig a bowl to get a slope (FloatingBodyTests.cs:233, LootTests.cs:289, MineTests.cs:121, FlowFieldTests.cs:49-51, FireControlTests.cs:380-381) can therefore keep every expected number. Such a fixture must also set `BodyRadius`, `GravityRadius`, `GravityDepth` and `OrbitPeriod` (null curves throw in `Planet.CalculateProperties` and the `Orbit` constructor). +- **B15. Where the drawn bowl and ripples live in Unity YAML** (scan `yamlgo.py`). `Gas Giant.prefab`: GameObject `Gravity Waves` lines 223-240, Transform 241-255, MeshFilter 256-263, MeshRenderer 264-305, parent's child entry line 34, `GasGiantObject.GravityWaves` reference line 56. `Sun.prefab`: GameObject 60-77, Transform 78-92, MeshFilter 93-100, MeshRenderer 101-142, child entry 34, reference 57. `ARPG.unity`: GameObject `Boundary` 22642-22659, Transform 22660-22674, MeshRenderer 22675-22723, MeshFilter 22724-22731, child entry 16867 (parent transform 1037490739), `ZoneRenderer.SectorBoundaryBrush` reference 16325. Neither prefab is a variant (no PrefabInstance documents). +- **B16. Unity-side code compiles only on Starfire.** The Yggdrasil verify job builds and tests `Aetheria.Shared.Tests` (ServerShared); `ZoneRenderer.cs`, `GasGiantObject.cs`, `GameSettings.cs`, scenes and prefabs are compiled and loaded only by the Unity editor. `Assets/Scripts/Editor/FloatingItemsDrawnSmoke.cs` opens `Assets/Scenes/ARPG.unity` (line 238) in batchmode and exits nonzero on failure, so it is the cheapest check that the scene still loads and the renderer compiles. +- **B17. Dead orbit writers.** `Zone.AddOrbit` (Zone.cs:269-272) and `Zone.CreateOrbit` (:594-611, the run-time orbit that back-solves its phase from `OrbitPeriod`) have no caller under Assets/Scripts or tests. Every live orbit comes from `ZonePack.Orbits` in the constructor (:157-160). `GameSettings.MinimapZoneGravityRange` (GameSettings.cs:18, Settings.asset line 23) feeds only the bowl's minimap start depth (ZoneRenderer.cs:623). +- **B18. Settings.asset is an LFS object.** At 11b2d7ad its git blob is a 3-line LFS pointer; the smudged worktree file is the YAML read in B2. `tools/context-pack.py` reads base blobs, so a spec cannot line-anchor it (cut-gravity-subtract r1 was superseded by r2 for this); edits to it are named by key, and verify jobs copy the edited file in after LFS staging. ## Model page @@ -41,7 +47,7 @@ One row per kind this campaign touches. "Today" is c6519383; "target" is the sha | **Force** a = -∇φ | Derived, never stored. | Per query. Analytic gradient (sum of per-well closed forms), not finite differences of the height. | Owner: the potential module. Every CPU force reader (B5) calls it: ships, floating bodies, clouds, mines. Forbidden: `Ship.Update`'s private normal-to-force path; the per-second `GravityReferenceRate` restatement (dies with the old law). | | **Body well parameters** (gravitational parameter c, softening radius R) | Derived per body from `BodyData.Mass` through PlanetSettings curves (today: `GravityDepth`, `GravityRadius`, `BodyRadius` × per-body multipliers). Names: per-body record key (`CultRecordRef`), injective. The JSON names of GasGiantData's wave fields collide with BodyData's (B7). | Computed once at Planet construction (`CalculateProperties`); never revised in play. Today's `GravityDepthExponent`, `GravityDepthMultiplier`, `GravityRadiusMultiplier` have no writer; the exponent dies under the target (no PowerPulse well); wave fields die in flatspace. | Owner of the curve: PlanetSettings in `Settings.asset` (open: well-strength-from-mass, softening-radius). Owner of the per-body value: `Planet` (or its successor) at construction. Forbidden writers: the brush material's `_Power 16` and `_Cutoff`, ZoneRenderer copying depth into materials, any shader constant. Cell not filled: whether per-body multipliers stay (no writer today; a pillar or authored body may want one). | | **Pillar** (Ink zones) | The zone's central body in a sun's role (`ink-pillars-are-suns`). Cell not filled: no record names a pillar today (no `Pillar` or `Adrasteia` anywhere under Assets/Scripts at c6519383); whether it becomes a `BodyData` kind is the Ink-zone work's decision. | Built with the zone like any body. | Owner: same law as a sun (`pillars-are-suns`); its strength comes from the same curve or an authored c. Pseudospace shenanigans are not in scope. | -| **Orbit rail** (`OrbitData`: Distance, Phase, Parent, FixedPosition; runtime `Orbit`: Period, Position, PreviousPosition, Velocity) | `OrbitData` is a catalog/pack record keyed by `CultRecordKey`, parent by `CultRecordRef`; root has no parent. Period is derived, not stored. | OrbitData created by ZoneGenerator or `Zone` (:596-611 back-solves phase); Period computed at `Orbit` construction; Position written by `GetOrbitPosition` each Update and float2.zero before the first (follow-up). Asteroids and belt targets recompute periods from the same curve (B6). | Today: `OrbitPeriod` curve owns period and ignores the field. Target (open: rails-vs-field, recommended field-owns-rails): period derived from the parent's c, T = 2πd/sqrt(c_parent), the same derivation for the four readers in B6. Forbidden writers then: `OrbitPeriod` as an independent authority, any per-reader period formula. Position placement moves to construction (`zone-valid-before-tick`). | +| **Orbit rail** (`OrbitData`: Distance, Phase, Parent, FixedPosition; runtime `Orbit`: Period, Position, PreviousPosition, Velocity) | `OrbitData` is a catalog/pack record keyed by `CultRecordKey`, parent by `CultRecordRef`; root has no parent. Period is derived, not stored. | OrbitData created by ZoneGenerator only (the run-time writers `AddOrbit` and `CreateOrbit` are dead, B17, and go in cut-orbits-placed-at-build); Period computed at `Orbit` construction; Position written by `GetOrbitPosition` each Update and float2.zero before the first (follow-up). Asteroids and belt targets recompute periods from the same curve (B6). | Today: `OrbitPeriod` curve owns period and ignores the field. Target (open: rails-vs-field, recommended field-owns-rails): period derived from the parent's c, T = 2πd/sqrt(c_parent), the same derivation for the four readers in B6. Forbidden writers then: `OrbitPeriod` as an independent authority, any per-reader period formula. Position placement moves to construction (`zone-valid-before-tick`). | | **Orbit placement** (child distances) | Generated `OrbitData.Distance` per body, authored ZoneGenerationSettings ranges. | Written once at generation; persisted in the zone pack. | Owner: ZoneGenerator. Open: moons-beyond-tidal-reach (whether the generator must keep children within their parent's tidal reach, which makes the generator read the strength curve). | | **Zone bowl** | PlanetSettings `ZoneDepth`, `ZoneDepthExponent`, `ZoneBoundaryFog`; scene `Boundary` brush. | Live today (B2). Target: gone from flatspace gravity. | Ruled (`grid-shows-how-you-move`, `flatspace-no-bowl-no-ripples`). Forbidden: the GetHeight term, ZoneRenderer's driving of the Boundary brush on a gravity layer, FlowFieldTests' use of the bowl as a slope source (tests need a well instead). Cell not filled: whether the zone needs a non-gravitational edge (nothing asked for one). | | **Ripples** (gas giant and sun waves) | PlanetSettings `WaveDepth`, `WaveRadius`, `WaveFrequency`, `WaveSpeed`; GasGiantData wave multipliers; Gravity Waves brush objects. | Live today (B2). Target: gone from flatspace. | Ruled. Forbidden: RadialWaves in the potential, the Gravity Waves objects on displacement layers. Pseudospace pulses (follow-up `pseudospace-flavours-campaign`) are a different kind, under the same grid invariant. | @@ -58,8 +64,17 @@ Cells not filled, plainly: whether per-body well multipliers survive (no writer - Why the drawn grid is a lowering, not an owner: `grid-shows-how-you-move` makes the slope a promise about motion. Six brush kinds on the gravity layers have no sim term or a different envelope (B3), so today the grid shows motion that does not happen (sector noise, wormholes, rim fades) and hides motion that does (the bowl in small zones is drawn at the same depth everywhere while felt only under the gate). - Why rails follow the field: every shipped game where ships feel gravity derives the rails from the same parameter (KSP) or simulates bodies (Outer Wilds); authored rails coexist only with no felt gravity (Elite, Starsector). See the prior-art doc, section 3. - Why strength, softening and tide are separate questions: a·r = v² ties felt strength to body speed (field-strength); c(mass) sets both readability and how many moons a ship can follow (well-strength-from-mass, B10); R sets the peak (softening-radius). Any two can be ruled without the third. +- Why the force gate is not in the subtraction cut: deleting the gate changes forces everywhere the gate zeroed them (every core, every rim), so it is behaviour, not subtraction, and the function it lives in (`GravityAcceleration`) is deleted whole by the potential cut. Removing it first would rewrite FloatingBodyTests' gate assertions into a no-gate test of a law that dies one cut later. +- Why the bowl fixtures become a well and not a new test helper per file: B14 makes the substitution exact, so the subtraction cut changes no expected number in five behaviour tests; the potential cut then replaces the fixture's well law once, in one helper. +- Why orbits are placed at build in a sibling: it touches the zone constructor, Update and the dead run-time orbit writers (B17), none of which the subtraction cut touches, and it removes the stacked-wells-at-origin state before the potential cut needs a valid field at construction. - A constraint for pseudospace, not solved here: a push with curl (B11) has no height, so under `grid-shows-how-you-move` it either never moves ships, or is drawn by another channel, or is restricted to its gradient part. ## Cut sequence -Not yet written. Waits on the step-0b questions. +Mapped and admitted (2026-10-14, base 11b2d7ad): `aetheria-gravity:cut_spec:cut-gravity-subtract.r2` and its sibling `aetheria-gravity:cut_spec:cut-orbits-placed-at-build.r1`. Not yet mapped: + +- **potential-owner**: one ServerShared potential (c from an authored compressed curve G·m^p, authored core-radius curve, uniform-disc core, log tail, superposition, analytic gradient, no gate, global K in PlanetSettings, reference zero at the root's zone radius); every CPU force reader (Ship, floating bodies, clouds, mines) and `Zone.Flow`'s slope term read it; GetHeight = φ/K; deletes `GravityAcceleration`, `GravityReferenceRate`, `GetNormal` as a force source, the PowerPulse well and `GravityDepthExponent`; field strength per field-strength-ruled. Waits on both admitted cuts. May split into the potential and its readers if one Hands pass cannot hold both. +- **orbits-from-field**: Orbit.Period = 2πd/sqrt(c_parent) for the orbit constructor, asteroid poses (Zone.cs:822) and BeltTargets.cs:63; `OrbitPeriod` deleted. Waits on potential-owner. +- **children-within-reach**: ZoneGenerator places children inside a fraction of the parent's tidal radius and the core radius inside the innermost child (softening-radius-ruled); tested over generated zones. Waits on orbits-from-field. +- **grid-lowering**: the renderer draws φ/K from the sim's law (analytic or generated brushes) with a parity check; deletes the Gravity Well brush constants and the wormhole gravity brushes; gravity samplers (slopeFlow, stardust, slime, minimap) read gravity only; closes `aetheria-fauna:follow_up:flow-slope-gradient-parity`. Starfire-verified. Waits on potential-owner. +- **grid-noise-presentation**: the Sector Waves noise and fine-grid detail move to non-slope presentation (grid-gravity-only-ruled). Waits on grid-lowering.