Skip to content

Commit c1d1fd5

Browse files
merge main into feat/prime-agent-integration
Reconcile the prime-agent branch with main's reviewed Galaxy spacetime implementation: the engine asset takes main's calibrations (orbital-speed gain 0.5, radius maximum 1.24, velocity decay 0.00005, no explicit-global loose-end floor) and the graph test suite matches main, while the branch keeps its prime-agent lifecycle/tooling work. The every-worker merges both sides: #174's bumped gains (link rest 2.4, repel/24, gravity 0.0033) with #177's full-range multipliers and the zero-floor cohesion coefficient. Cache-bust versions unified to 20260902-slider-merge-1.
1 parent 1a55eb9 commit c1d1fd5

8 files changed

Lines changed: 1951 additions & 1972 deletions

File tree

engraphis/classic_assets/dashboard.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engraphis/classic_assets/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<link rel="icon" type="image/x-icon" href="/classic-assets/engraphis.ico">
77
<link rel="icon" type="image/png" sizes="32x32" href="/classic-assets/favicon-32.png">
88
<title>Engraphis</title>
9-
<link rel="stylesheet" href="/classic-assets/dashboard.css?v=20260815-merge-ready-1">
9+
<link rel="stylesheet" href="/classic-assets/dashboard.css?v=20260831-galaxy-floor-fix-2">
1010
</head>
1111
<body>
1212
<a class="skip-link" href="#main-content">Skip to main content</a>

engraphis/dashboard_assets/engraphis-graph.js

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@
9393
const GALAXY_GRAVITY_MAXIMUM = 400;
9494
const GALAXY_GRAVITY_MAX_STRENGTH_GAIN = 1.5;
9595
const GALAXY_GRAVITY_STRENGTH_GAIN_START = 200;
96-
/* Keep the visible Galaxy gravity setting at its established default (96), but make the
97-
resting base field 50% stronger so the default scene carries less empty space. */
98-
const GALAXY_BASE_GRAVITY_MULTIPLIER = 1.5;
9996
/* The emergency acceleration cap follows the full visible strength range. Direct callers can
10097
still pass pathological values, but those values clamp to the same 0..400 physics ceiling. */
10198
const GALAXY_GRAVITY_CAP_REFERENCE = GALAXY_GRAVITY_MAXIMUM;
@@ -130,17 +127,17 @@
130127
+ 0.25 * galaxySmoothstep((value - 48) / 52);
131128
/* Gravity was tuned against the v8-era compact layout, where a 48 setting produced
132129
comfortable orbital spacing. The galaxy-v12 compact-orbits algorithm places systems
133-
tighter, so the calibrated field remains doubled before the independent 1.5x base
134-
default-density multiplier is applied. */
135-
return base * boost * 4 * galaxyGravityStrengthMultiplier(value) * 2.0
136-
* GALAXY_BASE_GRAVITY_MULTIPLIER;
130+
tighter, so the same setting now reads as too loose. Scale the final constant 20%
131+
upward so the default (and every other position) feels like the reference layout. */
132+
return base * boost * 4 * galaxyGravityStrengthMultiplier(value) * 2.0;
137133
}
138134
/* Gravity strength is the galaxy-wide black-hole control. The dashboard's Gravity slider
139135
flows to the explicit global anchor: zero user gravity is a real zero field, and the
140136
loose ↔ tight endpoints map to distinct central accelerations. Stability for community
141137
systems is owned by the independent local-stellar well and the rigid event-horizon
142138
contact layers, neither of which depends on this constant. */
143139
const GALAXY_GLOBAL_GRAVITY_FLOOR_SETTING = 24;
140+
const GALAXY_STELLAR_GRAVITY_FLOOR_SETTING = 48;
144141
function galaxyBlackHoleGravitySetting(setting, explicitGlobal) {
145142
const raw = Number(setting);
146143
const value = Number.isFinite(raw) ? Math.max(0, Math.min(GALAXY_GRAVITY_MAXIMUM, raw)) : 0;
@@ -319,13 +316,9 @@
319316
const GALAXY_ORBITAL_SPEED_DEFAULT = 100;
320317
const GALAXY_ORBITAL_SPEED_MAXIMUM_SETTING = 400;
321318
const GALAXY_ORBITAL_SPEED_MINIMUM = 0.25;
322-
/* The orbital-speed slider's high-end gain. Bumped from 0.5 to 1.0 so the upper half of
323-
the slider is fully proportional: at repel=200 the multiplier is 2.0 (was 1.5), and at
324-
repel=400 the multiplier is 4.0 (was 2.5, capped to 4.6). */
325-
const GALAXY_ORBITAL_SPEED_RESPONSE_GAIN = 1.0;
319+
const GALAXY_ORBITAL_SPEED_RESPONSE_GAIN = 0.5;
326320
const GALAXY_ORBITAL_SPEED_MAXIMUM = 4.6;
327-
/* Bumped from 1.24 to 1.5 so the orbital-radius response is more visible. */
328-
const GALAXY_ORBITAL_RADIUS_MAXIMUM = 1.5;
321+
const GALAXY_ORBITAL_RADIUS_MAXIMUM = 1.24;
329322
function galaxyOrbitalSpeedMultiplier(setting) {
330323
const raw = Number(setting);
331324
const value = Number.isFinite(raw)
@@ -450,10 +443,7 @@
450443
the integrator. */
451444
const GALAXY_REHEAT_STEPS = 0;
452445
const GALAXY_REHEAT_LARGE_STEPS = 0;
453-
/* Bumped from 0.00005 to 0.0005 — the damping slider (1..15) now has visibly stronger
454-
effect: at slider=1 the per-tick velocity multiplier is 0.0005; at slider=15 it climbs
455-
to 0.0075 (50% stronger than the previous 0.0015 cap). */
456-
const GALAXY_VELOCITY_DECAY = 0.0005;
446+
const GALAXY_VELOCITY_DECAY = 0.00005;
457447
/* Developer-facing spacetime controls are normalized multipliers around the calibrated
458448
dashboard physics. Keeping them separate from the established Gravity/Link controls makes
459449
the advanced panel reversible and avoids changing saved-layout semantics. */
@@ -2507,20 +2497,13 @@
25072497
const explicitGlobal = anchor.anchor_role === 'global';
25082498
const gravitationalConstantMultiplier = galaxyPhysicsMultiplier(opts.gravitationalConstant,
25092499
GALAXY_GRAVITATIONAL_CONSTANT_MULTIPLIER, 8);
2510-
/* Black-hole mass is now a LINEAR multiplier on the gravitational field — the user
2511-
expects that dragging the mass slider to 500 visibly doubles/triples the central
2512-
pull. The previous sqrt(blackHoleMassMultiplier) flattened the response so a 4x
2513-
slider change produced only a 2x force change, which made the slider feel dead. */
25142500
const gravitationalConstant = galaxyBlackHoleGravityConstant(opts.gravity, explicitGlobal)
2515-
* gravitationalConstantMultiplier * blackHoleMassMultiplier;
2501+
* gravitationalConstantMultiplier * Math.sqrt(Math.max(0.25, blackHoleMassMultiplier));
25162502
const accelerationCap = Math.max(0, Number.isFinite(Number(opts.accelerationCap))
25172503
? Number(opts.accelerationCap)
25182504
: defaultGalaxyBlackHoleAccelerationCap(opts.gravity, explicitGlobal)
2519-
/* Linear in blackHoleMassMultiplier (was Math.max(1, ...)) so the acceleration
2520-
cap scales with the same linear response as gravitationalConstant. The 0.25
2521-
floor keeps the lower half of the slider from collapsing the cap. */
25222505
* Math.max(0.25, Math.min(8,
2523-
gravitationalConstantMultiplier * Math.max(0.25, blackHoleMassMultiplier))));
2506+
gravitationalConstantMultiplier * Math.max(1, blackHoleMassMultiplier))));
25242507
const haloVelocitySquared = haloMass > 0
25252508
? gravitationalConstant * haloMass / (Math.SQRT2 * haloScale) : 0;
25262509
const model = {
@@ -5958,8 +5941,6 @@
59585941
const tangentX = -unitY * phase.direction, tangentY = unitX * phase.direction;
59595942
const targetX = parent.x + unitX * targetRadius;
59605943
const targetY = parent.y + unitY * targetRadius;
5961-
const targetRelativeSpeed = galaxyRelativeSpeedBudget(parent, absoluteSpeedLimit,
5962-
baseSpeed * orbitalSpeed);
59635944
const targetVx = (Number.isFinite(parent.vx) ? parent.vx : 0)
59645945
+ tangentX * phaseSpeed;
59655946
const targetVy = (Number.isFinite(parent.vy) ? parent.vy : 0)
@@ -8895,12 +8876,10 @@
88958876
a constant gravity amount. */
88968877
const diagnosticMass = galaxyPhysicsMultiplier(state.settings.blackHoleMass,
88978878
GALAXY_BLACK_HOLE_MASS_MULTIPLIER, 16);
8898-
/* Linear in diagnosticMass (was sqrt) so the diagnostic matches the new linear field
8899-
equation in galaxyBlackHoleField. */
89008879
const effectiveGravity = galaxyBlackHoleGravityConstant(state.settings.gravity, true)
89018880
* galaxyPhysicsMultiplier(state.settings.gravitationalConstant,
89028881
GALAXY_GRAVITATIONAL_CONSTANT_MULTIPLIER, 8)
8903-
* diagnosticMass;
8882+
* Math.sqrt(Math.max(0.25, diagnosticMass));
89048883
return Object.assign(galaxyMotionDiagnostics(data.nodes || []), {
89058884
mode: state.settings.mode,
89068885
running,
@@ -10770,6 +10749,8 @@
1077010749
galaxyBlackHoleGravityConstant, galaxyBlackHoleGravitySetting,
1077110750
galaxyCarrierTargetSpeed, galaxyAuthoredCarrierTargetSpeed,
1077210751
galaxyBlackHoleSpinAngle, advanceGalaxyBlackHoleSpin,
10752+
galaxyGlobalGravityFloorSetting: GALAXY_GLOBAL_GRAVITY_FLOOR_SETTING,
10753+
galaxyStellarGravityFloorSetting: GALAXY_STELLAR_GRAVITY_FLOOR_SETTING,
1077310754
galaxyLocalGravityConstant,
1077410755
galaxyLocalGravityMultiplier,
1077510756
galaxyStellarGravityConstant, galaxyFallbackStellarGravityConstant,

engraphis/dashboard_assets/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="description" content="Engraphis Ledger — local-first, grounded memory operations.">
88
<title>Engraphis Ledger</title>
99
<link rel="icon" type="image/png" sizes="32x32" href="/v2-assets/favicon-32.png">
10-
<link rel="stylesheet" href="/v2-assets/ledger.css?v=20260831-galaxy-floor-fix-2">
10+
<link rel="stylesheet" href="/v2-assets/ledger.css?v=20260902-slider-merge-1">
1111
</head>
1212
<body data-theme="slate">
1313
<a class="skip-link" href="#main-content">Skip to main content</a>
@@ -708,6 +708,6 @@ <h2 id="graph-connections-title">Connected nodes</h2>
708708
</form>
709709
</dialog>
710710

711-
<script src="/v2-assets/ledger.js?v=20260831-galaxy-floor-fix-2"></script>
711+
<script src="/v2-assets/ledger.js?v=20260902-slider-merge-1"></script>
712712
</body>
713713
</html>

engraphis/dashboard_assets/ledger.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@
458458
graphAssetSource('/v2-assets/vendor/force-graph.min.js?v=20260727-final'),
459459
'ForceGraph', controller.signal,
460460
)).then(() => loadScript(
461-
graphAssetSource('/v2-assets/engraphis-graph.js?v=20260831-galaxy-floor-fix-2'),
461+
graphAssetSource('/v2-assets/engraphis-graph.js?v=20260902-slider-merge-1'),
462462
'EngraphisGraph', controller.signal,
463463
)).then(() => loadScript(
464464
graphAssetSource('/v2-assets/engraphis-spacetime.js?v=20260812-stable-orbit-lanes-7'),
@@ -2620,14 +2620,12 @@
26202620
const GRAPH_BLACK_HOLE_MASS_BASELINE = 160;
26212621
function graphBlackHoleMassMultiplier(controlValue) {
26222622
const value = number(controlValue);
2623-
/* Above 160, every +10 slider units now adds +0.20 (was +0.10, then +0.15) — the
2624-
black-hole-mass slider is 100% more responsive on its upper half than the original
2625-
calibration: 170→1.20 (was 1.10), 500→8.80 (was 4.40). The lower-half ratio
2626-
(value/160) is preserved. The mass is now a LINEAR multiplier on gravitational
2627-
field strength in the engine, so the user can directly see the central pull grow. */
2623+
/* Keep the established lower half and neutral default. Above 160, every +10 slider units
2624+
adds exactly +0.10 to the compact central-mass multiplier: 160→1.0, 170→1.1, 180→1.2.
2625+
Local stellar wells remain owned exclusively by Local solar gravity. */
26282626
return value <= GRAPH_BLACK_HOLE_MASS_BASELINE
26292627
? Math.max(0, value / GRAPH_BLACK_HOLE_MASS_BASELINE)
2630-
: 1 + (value - GRAPH_BLACK_HOLE_MASS_BASELINE) * 0.02;
2628+
: 1 + (value - GRAPH_BLACK_HOLE_MASS_BASELINE) / 100;
26312629
}
26322630

26332631

engraphis/static/dashboard.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/e2e/ledger.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,14 +580,14 @@ test('Ledger cache-busts a graph renderer that fetched but did not register', as
580580
await expect(page.locator('#graph-empty')).toContainText('Graph unavailable');
581581
expect(rendererRequests).toHaveLength(1);
582582
const first = new URL(rendererRequests[0]);
583-
expect(first.searchParams.get('v')).toBe('20260831-galaxy-floor-fix-2');
583+
expect(first.searchParams.get('v')).toBe('20260902-slider-merge-1');
584584
expect(first.searchParams.has('retry')).toBe(false);
585585

586586
await page.getByRole('button', { name: 'Reload data' }).click();
587587
await expect(page.locator('#graph-count')).toContainText('3 entities · 1 relations');
588588
expect(rendererRequests).toHaveLength(2);
589589
const second = new URL(rendererRequests[1]);
590-
expect(second.searchParams.get('v')).toBe('20260831-galaxy-floor-fix-2');
590+
expect(second.searchParams.get('v')).toBe('20260902-slider-merge-1');
591591
expect(second.searchParams.get('retry')).toBe('1');
592592
});
593593

0 commit comments

Comments
 (0)