Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ jobs:
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v7
with:
node-version: "24"
cache: npm
cache-dependency-path: tools/orrery-contract/package-lock.json
- name: Sync workspace without country engines
run: uv sync --all-packages --locked
- name: Run engine-free tests
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@ until you restart the kernel, load it by path with

## Build progress and staging run files

UK build completion automatically exports Orrery execution graphs for viewing
offline and uploads none. Its staged dataset bundle hands the graph's inputs
to the emitter for the collector, which builds the Orrery graph files; see
[graph publication](docs/orrery-publication.md) and
UK builds write their graph's Orrery inputs (the compiler schema, the
execution overlay and the upstream files they link) and upload no graph.
Microcosm makes no Orrery document: the staged dataset bundle hands the
inputs to the emitter for the collector, which builds the Orrery graph files,
and staff view them through the run viewer. A build staged only locally has
no Orrery document until its inputs are submitted; see
[UK graph inputs](docs/orrery-publication.md) and
[its status](docs/orrery-publication.md#status).

Supported US and UK build commands start the local emitter as the build's
child process, with its telemetry, graph-publication and Hugging Face
hand-over modules. Microcosm depends only on `microcosm-emitter-interface`,
child process, with its telemetry and Hugging Face hand-over modules.
Microcosm depends only on `microcosm-emitter-interface`,
the typed calls a build makes; the emitter itself is installed on its own,
outside the workspace environment, so an emitter release needs no Microcosm
change:
Expand All @@ -70,7 +73,7 @@ The build finds the `microcosm-emitter` command through
environment variables and user, so it uses the build's Hugging Face
credential (`HF_TOKEN`, then `HUGGINGFACE_TOKEN`, then the `hf auth login`
token). Without the command the build continues with no hosted telemetry and
no remote staging, and measures no Orrery publication inventory; a UK build given
no remote staging; a UK build given
`--staging-read-back` fails at the read-back, and a UK build asked to stage
its dataset bundle remotely, as it is by default, is refused before it
starts, since the emitter uploads the bundle. Before it starts the emitter,
Expand Down Expand Up @@ -104,13 +107,13 @@ another Google Cloud project; from 0.10.0 on, releases send to the
collector's hostname, which stays the same. 0.13.0, 0.14.0, 0.15.0, 0.16.0
and 0.17.0 were each the newest release when practically no machine ran the
emitter yet, so requiring them cost nothing (see
[graph publication](docs/orrery-publication.md#emitter-dependency)). The
[UK graph inputs](docs/orrery-publication.md#emitter-dependency)). The
build prints the installed and required versions, what it loses and the
upgrade command, `uv tool install --upgrade 'microcosm-emitter>=0.17.0'`,
and continues as it does without the command. `uv tool upgrade` keeps any
version constraint given at install time, such as `==0.7.0`; that
`uv tool install --upgrade` command replaces it. Microcosm supplies build
metadata, graph files, staging run files and staged dataset bundles; the
metadata, the graph's Orrery inputs, staging run files and staged dataset bundles; the
emitter owns authentication, durable queues and delivery.
The telemetry module reports live progress to the hosted collector when the
operator's Hugging Face login is accepted; otherwise it retains the events
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1745-orrery-inputs-command.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `python -m microcosm.build.uk_runtime.orrery_inputs`, which writes the collector's Orrery inputs for a UK build into a new directory: its `graph.schema.json`, the linked `upstream-<sha256>.json` files, checked against the digests in their names, and, given the build's `execution.evidence.json` and content store with `--evidence` and `--store`, the execution overlay the build would have written. It refuses summaries that carry a target row's figures or a check's failure lines, as the build does, and uploads nothing. The UK build's graph step lives in the same module and now says so on standard error when it hands the collector no Orrery inputs.
1 change: 1 addition & 0 deletions changelog.d/1745-orrery-projection.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove Microcosm's copy of the Orrery projection: `microcosm.graph.orrery`, with its `python -m microcosm.graph.orrery` command, `microcosm.graph.orrery_evidence`, and the `orrery_document` and `orrery_json` exports of `microcosm.graph`. The collector builds every Orrery graph file with its own copy, whose contents match the deleted modules. UK builds no longer write `graph.orrery.json`, the publication inventory (`orrery.upload.json`), the receipt snapshot (`orrery.publication.json`), the manifest's `orrery_publication` field or the attempt evidence's `orrery-publication/` directory, and the emitter a build starts has no graph publication module. `tools/orrery-contract/`, which checked Microcosm's documents with Orrery's parser, and the engine-free CI job's Node setup go with them. Graphs are viewed through the run viewer from the collector.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`python -m microcosm.build.uk_runtime.orrery_reconstruction` now writes only the reconstructed `graph.schema.json`, which carries the reconstruction marker, and its report; it no longer projects `graph.orrery.json` or writes `orrery.upload.json`. The collector's projection keeps the marker, so a document made from the schema shows it. The report's protocol is now `microcosm.uk.orrery-reconstruction-report.v2`: `publication_id` and `published_files` are gone, and `files` names the schema it wrote beside the report. A build that records Orrery evidence is refused with a pointer to `python -m microcosm.build.uk_runtime.orrery_inputs`. The Python function is now `reconstruct_uk_schema`.
9 changes: 1 addition & 8 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ def fake_telemetry_emitters(monkeypatch, tmp_path):
from microcosm_emitter_interface import client as emitter_interface_client

from microcosm.build import telemetry_emitter
from microcosm.build.uk_runtime import orrery_publication
from test_support.microcosm_build.telemetry import (
FakeTelemetryEmitter,
fake_publication_inventory,
)
from test_support.microcosm_build.telemetry import FakeTelemetryEmitter

for name in ("HF_TOKEN", "HUGGING_FACE_HUB_TOKEN", "HUGGINGFACE_TOKEN"):
monkeypatch.delenv(name, raising=False)
Expand Down Expand Up @@ -136,9 +132,6 @@ def start(_cls, **kwargs):
monkeypatch.setattr(
telemetry_emitter.LocalTelemetryEmitter, "start", classmethod(start)
)
monkeypatch.setattr(
orrery_publication, "publication_inventory", fake_publication_inventory
)

def unexpected_start(*args, **options):
pytest.fail("A build test tried to start a real emitter")
Expand Down
37 changes: 19 additions & 18 deletions docs/agent-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ the PEP 420 namespace `microcosm.<x>`: `frame`, `fit`, `calibrate`, `build`,

## Commands

UK build completion exports and stages Orrery graph evidence. No build uploads
its graph: the staged bundle submits the graph's inputs to the collector
through the separately installed `microcosm-emitter`, which the build starts
through `microcosm-emitter-interface`; see [UK graph publication](orrery-publication.md). Staging run files and staged
dataset bundles go through the same emitter. No new producer secret is required. Keep graph export/publication tests independent
of the hosted runs app and collector; use synthetic files and fake HTTP.
UK builds write and stage their graph's Orrery inputs (the compiler schema,
the execution overlay and linked upstream files); Microcosm makes no Orrery
document and no build uploads its graph. The staged bundle submits the inputs
to the collector, which builds the Orrery graph files, through the separately
installed `microcosm-emitter`, which the build starts through
`microcosm-emitter-interface`; see [UK graph inputs](orrery-publication.md).
Staging run files and staged dataset bundles go through the same emitter. No
new producer secret is required. Keep graph-input and staging tests
independent of the run viewer and the collector; use synthetic files and
fake HTTP.

```bash
uv sync --all-packages # set up the whole workspace
Expand Down Expand Up @@ -101,8 +105,8 @@ or country mapping.

Each ordinary behavioral job has a Python 3.13/3.14 matrix and reports the 25
slowest tests. The engine-free job installs no country extra, always runs every
engine-free test, installs its locked JavaScript test dependencies, and
distributes files across two pytest workers with `--dist loadfile`.
engine-free test, and distributes files across two pytest workers with
`--dist loadfile`.
Changed-file selection only controls the more resource-intensive country jobs.
A documentation-only pull request selects neither country; a US-only or UK-only
pull request selects that country; shared, mixed, unknown, or empty changed-path
Expand Down Expand Up @@ -142,16 +146,13 @@ aggregate-result jobs. Add a test category to `TEST_GROUPS` before its
executor; do not create a separate selection system, test workflow, or
single-purpose behavioral test job.

The Orrery parser compatibility assertion lives in
`packages/microcosm-graph/tests/engine_free/shared/test_graph_orrery.py`. The
engine-free runner installs the supported public Orrery range and locked Node
dependency set under `tools/orrery-contract/`; the pytest test generates a
document through Microcosm's public Python API and requires Orrery's public
parser to accept it. The recorded-evidence assertion in `test_graph_evidence.py`
uses the same pinned parser for groups, statuses, activities and artifacts, and
the one in `test_graph_reconstruction.py` uses it for the reconstruction marker
of a declaration-only document.
These CI tests perform no browser rendering.
Microcosm makes no Orrery document, so no test runs Orrery's parser and the
engine-free job installs no JavaScript dependencies; the collector validates
the documents it projects.
`packages/microcosm-graph/tests/engine_free/shared/test_graph_no_orrery_projection.py`
checks that the graph package keeps no projection module or export, and
`packages/microcosm-build/tests/engine_free/uk/test_uk_orrery_inputs.py`
checks the files a UK build registers and hands to the collector.

Workspace tests use an in-memory emitter client by default
(`test_support/microcosm_build/emitter.py`), and the shared fixture refuses to
Expand Down
8 changes: 4 additions & 4 deletions docs/graph-explorer.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Graph explorer

For declaration and schema inspection with Orrery, see the
[Orrery adapter](orrery-adapter.md). The run
renderer described below remains unchanged, including its separate cache and
gate statuses.
For the compiler schema and execution overlay from which the collector
builds a graph's Orrery graph files, see [Orrery inputs](orrery-adapter.md).
The run renderer described below remains unchanged, including its separate
cache and validation-check statuses.

The graph explorer is one self-contained HTML file generated from a compiled
graph and its run manifest. It contains its own CSS, JavaScript, DAG, and small
Expand Down
Loading
Loading