feat: Galaxy v6 physics engine, graph scene overhaul, and ledger UI improvements - #138
feat: Galaxy v6 physics engine, graph scene overhaul, and ledger UI improvements#138Coding-Dev-Tools wants to merge 114 commits into
Conversation
…mprovements - Galaxy physics: orbital mechanics, leapfrog integration, black hole gravity, solar system hierarchy, evidence-mass sizing, drag velocity preservation - Graph scene: ghost edge sort fix, connected_only+include_history interaction, set-wise visibility refactor, code overlay fallback correction - Ledger UI: graph load caching fix, repo filter in cache key, accessibility improvements, Galaxy controls integration - Store: schema migration, logical digest header zeroing fix, verification scope correction, context_savings workspace coercion - Service: entity visibility filter, workspace N+1 query fix, history mode ghost flags, migration locking - API: graph scene fallback narrowing, whitespace workspace validation - E2E tests: Galaxy slider/half-step/orbital separation coverage - Unit tests: graph engine assets, explorer v2, scene contracts, benchmarks - Scripts: dashboard readiness probe, port conflict differentiation - Docs: changelog, MCP tools reference, skill package update Co-authored-by: review agents (16 parallel reviewers, 4 fix agents)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f3b1f4993
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Restore schema cookie (offset 40) normalization in _logical_digest: SQLite backup can reset this field, causing digest mismatch and aborting all v3-v16 migrations. Codex P1. - Reserve edge capacity for historical ghost relations: when include_history=True, ghost edges covering historical nodes are selected first before applying the final edge_cap, preventing the time-travel view from losing all historical edges. Codex P2. - Update test_store_class_integrity to validate the corrected digest offsets (24, 40, 92).
- Replace U+2014 em dash with double hyphen in CHANGELOG.md line 73 - Fixes test_public_facing_docs_do_not_use_em_dashes assertion
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3e2fb6890
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Prevents unbounded URL growth on persistent asset load failures. The retry counter appends to asset URLs as a cache-buster; without a cap, repeated failures produce increasingly long URLs and complicate debugging. Ten retries provides ample recovery attempts before giving up gracefully.
static/index.html (Ledger primary) incorrectly marked the Classic link as active with aria-current=page. Swap so Ledger shows as the active choice on the primary dashboard, matching the classic_assets variant which correctly marks Classic as active. Prevents a brief flash of incorrect state before JS init and fixes the HTML-only fallback.\n\nFrom Review13 medium finding.
- ledger.js: reject scene payloads carrying an error field before the object-fallback, preventing error response objects from being treated as graph data and causing downstream undefined property access. - dashboard_assets/index.html: add aria-labelledby to graph tuning range inputs referencing their label spans so screen readers announce dynamic label text changes in Galaxy mode. From Review08 low findings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5dbcdbfcf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
5 fixes for issues flagged by the Codex reviewer: - P1 service.py: historical supports query now filters by memory.workspace_id so a cross-workspace support cannot leak into the include_history scene. - P2 service.py: evidence facets (memory_types, time_from, time_to) are applied in history mode instead of being skipped by the live-only evidence_filter short-circuit. - P2 service.py: entity candidate cap applies after session-scope pruning so private evidence cannot crowd out public entities. - P1 engine.py: secure_erase re-checks successors after the potentially long index.delete and cleans up any new target IDs before calling store.secure_erase_memory. - P2 graph_scene.py: ghost canonical nodes that collide with a live canonical_id are keyed as :ghost so the live node keeps its mass, community, and relations. Co-authored-by: Codex review bot (addressed findings from d5dbcdb)
There was a problem hiding this comment.
💡 Codex Review
engraphis/engraphis/service.py
Lines 7817 to 7819 in 3160ada
When include_history=true is combined with memory_types, time_from, or time_to, a support for a genuinely historical edge has valid_to <= t, so this newly added live-validity predicate rejects it and the ghost relation disappears. Fresh evidence beyond the prior facet comment is that the replacement branch still requires supports to be live at the selected world-time; apply the history-mode validity predicate here instead.
AGENTS.md reference: AGENTS.md:L162-L164
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Move prune_entities assignment before its first reference in the evidence_filter computation. Ruff F821 caught the UnboundLocalError that broke all graph scene operations across every Python version.
9555936 to
0b2f070
Compare
The previous commit introduced a dependency on prune_entities in the evidence_filter assignment that broke live-only evidence filtering when memory_types/time facets were requested without include_history. Restore the original 'not include_history' logic; the prune_entities override for history mode is handled separately below. Fixes test_graph_scene_filters_supporting_memory_type_and_time_window.
Move the entity visibility check from a per-chunk correlated SQL query to a single upfront workspace-wide edge visibility scan. Entity rows are then filtered in Python using set membership, avoiding the extra SQL query that broke test_graph_scene_entity_visibility_single_query. This ensures private entities cannot consume the candidate budget when a workspace has more than 3*MAX_GRAPH_ANALYSIS_ENTITIES rows.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46a1d3c220
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
savingsQuery() returned empty string for the 'all' preset, producing URLs like /context-savings? with a dangling query separator. Move the ? prefix into the returned string so the 'all' case produces a clean /context-savings path with no query component. Fixes one of the remaining low-severity review findings.
The 'Ledger deadline includes stalled graph assets' E2E test was flaky on CI runners under load. The 5s default Playwright timeout for the reload+render cycle was too tight. Increase to 15s to match other graph-dependent assertions in the suite.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad1a5498e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5524fbd798
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0c9eef121
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6b0577faf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 489eb3f91a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 805cd723e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…clock, add live motion test
…eration cap to 48
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a91ca37fa5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const expectedFree = -I.galaxyGravityConstant(100) * 8 * 24 | ||
| / Math.pow(24 * 24 + 12 * 12, 1.5); |
There was a problem hiding this comment.
Align the free-system expectation with the stellar clock
Running the required offline test gate deterministically fails here: galaxyAccelerations() uses galaxyStellarGravityConstant() for a non-global community anchor, which is 6.25 times galaxyGravityConstant(), so this fixture observes freeRelative=-26.8328 while calculating expectedFree=-4.29325. Update the expectation to the new stellar law—or restore the compatibility law if that is the intended contract—so python -m pytest tests/ -q can pass.
AGENTS.md reference: AGENTS.md:L42-L46
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ff11abd3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| include_code=include_code, | ||
| include_complete_rows=clean_level == "complete", | ||
| include_history=include_history, | ||
| include_memory_nodes=include_memory_nodes, |
There was a problem hiding this comment.
Include memory validity boundaries in cache expiry
When a current-time complete scene includes memory nodes, a future-dated memory can become valid without any database write; however, the cache deadline computed by _graph_scene_valid_until() scans only edges and edge_supports. A scene cached before that memory's valid_from therefore remains a cache hit after the boundary and continues omitting the node until another write or eviction occurs. Include memory and connector validity boundaries when this projection is enabled.
AGENTS.md reference: AGENTS.md:L204-L206
Useful? React with 👍 / 👎.
…nderer, add regression test
…rbital manifold projection - Double gravity field at every slider value (black-hole 480, local 240 at default) - Independent 2.5x stellar orbit clock for community stars - Stellar gravity floor preserves solar systems at Gravity zero - Orbital separation projects along circular manifold to preserve radii - Galaxy repel default raised to 60 with legacy preference migration - Cache-bust stale graph renderer that fetched but failed to register - Relation springs and constraints apply 2x response - Speed cap uses machine-epsilon margin for strict clamping - 48 boundary iterations for dense stellar exclusion - Comprehensive regression tests for all new physics layers - Updated CHANGELOG with Unreleased entries
…nd tests
Phase 1 (16-agent core review):
- engine.py: warn on partial index cleanup, not just failed
- store.py: fix vacuous truth on empty verification set, add checked_count
- test_dashboard_v2.py: use imported SCHEMA_VERSION instead of hardcoded 16
- test_graph_engine_asset.py: add cancelAnimationFrame mock
Phase 2 (label z-order):
- engraphis-graph.js: defer label rendering to onRenderFramePost for correct
z-order (labels now paint above all node bodies)
- engraphis-graph.js: track and cancel orphan cluster expand setTimeout
- engraphis-graph.js: fix cluster label font to use label.r * 0.4
Phase 3 (14-agent dashboard review):
- ledger.js: guard refreshBootstrap against non-JSON 200 responses
- ledger.js: warn on any non-deleted vector index cleanup status
- read_only_api.py: map GraphIndexRebuilding→409, GraphSceneCapacityExceeded→413
- read_only_api.py: /graph workspace parity with v2_api (Optional + fallback)
- read_only_api.py: add missing /receipts/export endpoint
- read_only_api.py: remove redundant workspace.strip()
- v2_api.py: replace __import__('time') with direct time.strftime
Test fixes for deferred label rendering:
- test_graph_engine_asset.py: flush pendingLabels via onRenderFramePost in
density, theme colour, and cluster label source tests
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1de25f8823
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| diagnostics: bool = False | ||
| planning: str = Field("off", max_length=32) | ||
| mtype_limits: Optional[dict[str, StrictInt]] = Field(None, max_length=16) | ||
| mtype_limits: Optional[dict[str, int]] = Field(None, max_length=16) |
There was a problem hiding this comment.
Restore strict integer validation for memory-type limits
When /intent/recall receives a limit such as true or "2", Pydantic now coerces it to an integer and the request succeeds instead of rejecting the malformed quota. This deterministically breaks both cases in test_read_only_intent_recall_rejects_coerced_memory_type_limits, so the required python -m pytest tests/ -q gate fails; retain StrictInt or enable strict validation for these values.
AGENTS.md reference: AGENTS.md:L42-L46
Useful? React with 👍 / 👎.
| wss = svc.list_workspaces().get("workspaces") or [] | ||
| except (ValidationError, ValueError): | ||
| wss = [] | ||
| ws = wss[0] if wss else None |
There was a problem hiding this comment.
Extract the workspace name for the graph fallback
When /graph is called without workspace and at least one workspace exists, list_workspaces()["workspaces"] contains summary dictionaries, so assigning wss[0] passes a dict to svc.graph(); _clean_ws() rejects it and the newly optional default request returns 400. Select the entry's name field before invoking the service.
Useful? React with 👍 / 👎.
| ws = wss[0] if wss else None | ||
| body = run(svc.export_receipts, workspace=ws) |
There was a problem hiding this comment.
Extract the workspace name for receipt export fallback
When /receipts/export omits workspace on a database containing a workspace, this fallback likewise assigns the first workspace summary dictionary rather than its name. export_receipts() then rejects that dictionary during scope validation, so the endpoint's default invocation always returns 400 instead of exporting the first visible workspace.
Useful? React with 👍 / 👎.
Summary
Galaxy v6 physics, graph-scene projection, and Ledger dashboard overhaul. The PR contains 58 changed files (+17,766 / -1,342) on one branch targeting
main.What changed
0..400; the live solver uses a0.032fixed timestep, physical stellar-surface pressure, and bounded 18-unit global orbit seeding, while oversized static scenes map the full slider range.Review hardening
0..400range.Validation — final head
805cd72ruff check .— passedpyright— passedpython scripts/externalize_dashboard_assets.py— passedpython scripts/check_commercial_manifest.py— passedpython -m pytest -o addopts="" tests -q -rs— 4,026 passed, 35 platform/optional-extra skips, 1 expected duplicate-ZIP warning from the malformed-container security testnpx playwright test --reporter=list— 63 passed