Skip to content

Export Microcosm schema metadata for Orrery - #888

Open
MaxGhenis wants to merge 12 commits into
mainfrom
orrery-cli-adoption-review-20260908
Open

MaxGhenis wants to merge 12 commits into
mainfrom
orrery-cli-adoption-review-20260908

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR converts compiled Microcosm graph metadata into the
graph-explorer/v1 JSON format accepted by Orrery. Microcosm continues to own
graph declaration, compilation, execution, and field semantics. Orrery receives
a static presentation document and does not execute the build.

Changes

  • Derive a canonical microcosm.graph.schema.v1 document from CompiledGraph.
  • Record compiler-derived field providers, declaration sources, population
    versions, predecessors, and declared input bindings.
  • Preserve field-specific provenance when an expansion operation physically
    creates a column before the following claim operation declares ownership.
  • Validate saved schemas by restoring and recompiling the embedded graph, then
    comparing every derived field with exact JSON types.
  • Transform Graph, CompiledGraph, or a saved compiler schema into a complete
    Orrery document through orrery_document() and orrery_json().
  • Add a Python command-line interface for converting graph or schema JSON into
    Orrery JSON without executing population operations.
  • Preserve integers outside the JavaScript safe range with explicit transport
    objects and reject malformed, unsafe, or oversized inputs and outputs.
  • Test against the compatible public Orrery range declared by the locked
    contract-test package inside the registered shared engine-free category.
  • Reject workflow jobs that are neither registered test categories nor approved
    orchestration, lint, or packaging jobs.
  • Document the compiler-to-Orrery mapping and the limits of static metadata.
Graph -> compile_graph() -> CompiledGraph -> run_graph()
                                      |
                                      +-> graph_schema()
                                            -> orrery_json()
                                            -> Orrery

Testing

  • 168 focused schema, adapter, executor, ownership, and CI-plan tests pass after
    rebasing onto the current base branch.
  • A clean npm install resolves the declared compatibility range, and the public
    Orrery parser accepts the generated document.
  • The cross-language contract verifies every emitted relationship kind and
    category, expansion-field provenance, and exact large-number transport.
  • Ruff lint and formatting checks pass for the changed Python modules.
  • tools/ci_test_plan.py verify validates all 614 registered test files.
  • The broader local engine-free run reached 9,306 passes and 72 skips before an
    existing UK release test stopped on a measure exclusion that expired on
    2026-10-03; the same test fails unchanged on current main.

Scope

The export contains static declarations. It does not contain Frame values,
entity identifiers, source bytes, observed runtime reads, cache results,
execution receipts, verifier assessments, or release decisions. The existing
Microcosm executor and deterministic HTML explanation remain unchanged.

@anth-volk
anth-volk force-pushed the orrery-cli-adoption-review-20260908 branch from 588e221 to 6cfcc65 Compare October 6, 2026 17:56
Share EXPAND parameter validation through a dedicated graph module so execution, population handling, and static schema export agree without changing the frozen declaration interface.

This branch has not been deployed

No deployments
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.

2 participants