Skip to content

Export Microcosm schema metadata for Orrery - #888

Open
MaxGhenis wants to merge 1 commit into
mainfrom
orrery-cli-adoption-review-20260908
Open

Export Microcosm schema metadata for Orrery#888
MaxGhenis wants to merge 1 commit into
mainfrom
orrery-cli-adoption-review-20260908

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Add a Python adapter and CLI that turn saved microcosm.graph.schema.v1 metadata into Orrery's graph-explorer/v1 document. The export retains operations, sources, versioned fields, read roles, ancestry and complete supplied metadata, with exact transport tags for integers outside JavaScript's safe range. Reference, size and JSON checks reject malformed exports; the CLI refuses existing output files.

From a synced Microcosm checkout:

uv run python -m microcosm.graph.explorer \
  --input compiled-schema.json --output graph.json --title "Microcosm US"
graph-explorer --input graph.json --output graph.html

The second command uses the separately installed, accepted shared viewer 0.3.0 package (@axiom-foundation/graph-explorer). Orrery is the shared viewer's new repository name; the JSON contract is unchanged. This delivers a native exporter and local offline report, not a hosted Microcosm app route. The existing deterministic run viewer remains available. Imported schema declarations do not establish execution, cache, calibration, gate or Receipt verdicts; complete supplied metadata is retained, so canvas filtering is not redaction.

Validation:

  • 24 adapter/CLI tests pass, including field and read-reference integrity, exact large-number transport, malformed JSON, bounded input, FIFO refusal and overwrite protection.
  • A separate actual module invocation reproduced the accepted 434-node/771-edge document. The existing viewer CLI generated byte-identical previously browser-accepted HTML; no package upgrade or repeated browser acceptance was needed.
  • The real CI inventory verifier passes; the test file is assigned to fast/rest and engine/us-am. Ruff and diff checks pass.
  • Independent source review of the adapter and the new CLI found no remaining actionable issues. Local guards recorded unchanged code pins and no external resource reads.

This source-only PR contains code, invented tests and documentation. Local schema snapshots, generated reports, probe artifacts and machine-specific evidence remain outside the PR. Full country-graph schema coverage and deployed dashboard integration remain separate work. Related runtime consolidation: #885.

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.

1 participant