Repository navigation
Write only the collector's Orrery inputs and delete Microcosm's projection - #1748
Merged
Merged
Conversation
Failing tests for #1745. The graph package must have no projection module or export; a build must start no graph publication module in its emitter; UK builds, refused builds and failure bundles must register the schema, overlay and upstream files but no Orrery document, inventory or receipt; unpublishable summaries must leave no inputs and say so; a new command must write the collector's inputs from a saved schema and optional recorded evidence, refusing an existing output, evidence without its store, a changed upstream file and unpublishable summaries; and the pre-#1144 reconstruction must write only its marked schema and a version 2 report, pointing builds with recorded evidence to the new command. orrery_inputs.py and reconstruct_uk_schema are stand-ins so that every test fails on its assertions: 19 failed, none at import or collection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction The collector builds every Orrery graph file with its own copy of the projection, whose modules have the same contents as Microcosm's. So: - Delete microcosm.graph.orrery (with python -m microcosm.graph.orrery), microcosm.graph.orrery_evidence and the orrery_document and orrery_json exports. - Move the UK graph step from orrery_publication.py to orrery_inputs.py. It writes the execution overlay and registers the schema, the evidence index and run evidence, the overlay and the linked upstream files, found from the schema's extensions and the overlay's links. It writes no graph.orrery.json, publication inventory, receipt or orrery-publication/ copy, and says on standard error when it hands over no inputs. - Add python -m microcosm.build.uk_runtime.orrery_inputs, which writes those inputs into a new directory from a saved schema and, optionally, the build's evidence index and content store. - Start build emitters without the graph publication module, and remove publication_inventory, publish_graph and the Orrery-only emitter. - Split the #1297 reconstruction tool: reconstruct_uk_schema writes only the marked graph.schema.json and a version 2 report. - Delete tools/orrery-contract/ and the engine-free job's Node setup. - Adapt the tests that used the projection to inspect schemas, overlays, presentation contracts and markers, and delete those of the projection's own output, the Node parser checks, the inventory and the receipt. The --publish-orrery and --no-publish-orrery flags stay as no-ops for the cleanup task. Closes #1745. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the deleted projection checked a schema's presentation contract, which the collector's projection refuses when it is invalid. The graph step must then register no Orrery input and say so, and the inputs command must refuse the schema. Both tests fail on their assertions: 2 failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The graph step and the inputs command now run validate_presentation on the schema, which only the deleted projection did; the collector's projection refuses an invalid contract, so the build registers no Orrery input and the command refuses the schema. Docstrings that still described a local Orrery export now describe the overlay and the collector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/orrery-publication.md ("UK graph inputs") and docs/orrery-adapter.md
("Orrery inputs") now describe the files a build registers and hands over,
the inputs command and the split reconstruction tool, and point to the
collector for the Orrery document format. The README, the graph package
README, the agent guide and the docs that linked to the projection, the
inventory or the receipt follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… records Review round 1 of #1748: - High: the two inputs-command tests with evidence passed args.graph_store, which the synthetic build leaves unset (it sets the store only on its staged copy of the arguments), so the command refused "Evidence store None". They now pass the build directory's .graph-store. - Low: a graph step that registers nothing for a build without a dataset manifest left an earlier attempt's orrery.evidence-manifest.json in a reused output directory, where staging would take it for this attempt's. The new test fails on its assertion: 1 failed. Also cover the command's refusal of a duplicate JSON key, a symbolic link and a missing upstream file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1 of #1748 (low): a build without a dataset manifest whose graph step registered nothing left an earlier attempt's orrery.evidence-manifest.json in a reused output directory, and staging would have taken it for this attempt's. The old step always wrote a record, so each attempt replaced the last; now it removes the stale one from the build directory and the published output. Also remove rowwise_staging.active_telemetry_emitter, which only the deleted graph step called, and the tracker task code from the docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
full_build_cli._run_with_graph_publication becomes _run_with_graph_inputs, and the adapter test about the graph hand-over before shutdown is renamed; nothing is published any more (review round 1 of #1748, code quality). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 of #1748: - High: test_transport_evidence_kernels still listed nine graph modules (evidence, store, manifest, presentation and their imports) that the transport bindings reached only through the deleted projection, so its module count failed (238 against 247). LEAF_ADDED_MODULES now lists the twelve the leaf reaches. - The inputs command checked an upstream file's digest by path and then read it again, following links. A new test expects an upstream file behind a symbolic link to be refused; it fails: 1 failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 of #1748 (code quality): the inputs command checked an upstream file's digest by path and then read it again, following links and with no size bound, so bytes changed in between were copied unchecked. It now reads each upstream file once, refusing links, devices and files over the collector's 64 MiB bound, and checks those bytes; the schema read shares the same reader. Also document that a graph step that registers nothing writes no evidence record and removes an earlier attempt's (finalize_graph's docstring and the UK graph inputs doc), and say in the changelog that the reconstruction report's files field names the schema. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 3 of #1748: - High: test_cli_prints_the_resolved_output_path_it_wrote, which the PR had not changed, still expected "Wrote a reconstructed Orrery publication (declaration only)", which summary_text no longer prints. It now expects the graph schema sentence, as its neighbouring test does. CI had not reached the UK tests yet because an earlier failure stopped the job. - The build's graph step now checks upstream files with the same single read as the inputs command (no links, the collector's 64 MiB bound), and _checked_upstream_file is gone. - The Orrery inputs doc lists the command's upstream-file refusals, and the reconstruction tests' docstring no longer speaks of publications. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
marked this pull request as ready for review
November 26, 2026 12:51
anth-volk
added a commit
that referenced
this pull request
Nov 26, 2026
Resolves the conflict in the comment above MINIMUM_EMITTER_VERSION: this branch's shorter comment, with #1748's wording that a refused emitter costs the Orrery inputs in a build's staged bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
added a commit
that referenced
this pull request
Nov 26, 2026
--publish-orrery and --no-publish-orrery have changed nothing since builds stopped uploading their graph (#1590); #1748 kept them for this cleanup. These tests ask the UK full build to refuse both as unknown options and to carry no publish_orrery setting, and run_uk_cut.py to pass neither. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22
added a commit
that referenced
this pull request
Nov 26, 2026
…no Orrery projection, untagged build folders (#931) Main took three pull requests since 51d952c: #1746 (each UK kernel builds its Frame from one copy of its input tables, through microcosm.frame.table_copies and Frame.adopt), #1748 (the graph package keeps the Orrery inputs and drops its projection, orrery_document among it) and #1740 (the build-folder switch tool reads untagged folders). No feed or engine pin moves. Three files conflicted. - uk_runtime/graph_kernels.py, _minimal_frame: both sides cut the stage kernel's Frame to one copy. This branch passed the frozen tables to the Frame constructor, whose own copy still stacked each dtype's columns; #1746 copies each column once with copy_table and stores the copies with Frame.adopt, and the strata with copy_series. The merge takes #1746's copy and keeps this branch's mass_log and metadata parameters, through which the spine gate kernel builds this one Frame, and both imports. - uk_runtime/graph_population.py: the import of the copy helpers beside Frame. This branch had removed the code that used Weights, so the merged import leaves Weights out; context_frame is #1746's. - tests/engine_free/uk/test_uk_graph.py: the imports. #1748 replaced the Orrery document check with a schema check (validate_graph_schema); the merge keeps this branch's binding-rule imports and drops the two that only the old check used. The derived binding rule then asked every UK kernel that builds its frame through _minimal_frame or context_frame to hash the new microcosm.frame.table_copies, and the merge adds it where each computes through it: every stage kernel (_implementation_hash), the spine gates, the calibration kernels' shared hash, the measures, problem and holdout, the three national kernels, the export preparations and the terminal phase's own code. It also brings the size search and refit to #1735's rules, which the merge at c18c0ae missed: they compute through target_weights and national_doctrine, so they hash calibrate.target_loss_rules too. Checks: CI's test plan and workflow verify; the tests the merge touches, main's changed tests among them (1,498 pass, then the UK graph test's binding rules, 65, after the hash additions); the parity pins, the graph evidence, the kernel frame copies, the FRS spine, the calibration graph, the transport binding identity and the battery pins (808); H2 parity and the UK graph on the engine (3); and the staging smoke (2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1745.
What this changes
Since #1590, UK builds hand the collector their Orrery inputs in the staged bundle, and the collector builds the Orrery graph files with its own copy of the projection. The nine modules in that copy (
telemetry_collector/orrery/projection/) have the same git blob IDs as the ones on Microcosmmain, so this PR deletes Microcosm's copy and everything that only existed for it:microcosm.graph.orrery(withpython -m microcosm.graph.orrery) andmicrocosm.graph.orrery_evidenceare deleted, andmicrocosm.graphno longer exportsorrery_documentororrery_json.execution_overlay.py,evidence.py,presentation.py,schema.pyandreconstruction.pystay; only their docstrings change, plus the reconstruction marker'sscopetext, which no longer claims the reconstructing code projected the document.uk_runtime/orrery_publication.py(deleted) touk_runtime/orrery_inputs.py. It writesgraph.execution.jsonbesidegraph.schema.jsonand registers underorrery/: the schema,execution.evidence.jsonwith each run's native evidence files, the overlay, and eachupstream-<sha256>.jsonfile the schema's extensions or the overlay link (found from theirurlfields, which is where the projection used to find them, and digest checked). It no longer writesgraph.orrery.json,orrery.upload.json,orrery.publication.json, the manifest'sorrery_publicationfield ororrery-publication/under the attempt evidence. Summaries carrying a target row's figures or a check's failure lines still leave the bundle with no Orrery input, and the build now says so on standard error; any other graph-step failure registers nothing and prints the error's type.publication_inventory,publish_graphand the short-lived Orrery-only emitter are gone; nothing in Microcosm used the graph publication module except to measure the inventory. Removing the module from the emitter itself is separate emitter work.python -m microcosm.build.uk_runtime.orrery_inputs --schema <build>/graph.schema.json [--evidence <build>/execution.evidence.json --store <content store>] --output <new directory>writes the collector's inputs into a new directory: the schema's bytes unchanged, the overlay the build would have written (with the build's summary check), and the linked upstream files checked against their names. It uploads nothing. It replaces the deleted command for builds whose files exist only on one machine.python -m microcosm.build.uk_runtime.orrery_reconstructionkeeps its reads, digest checks, revision resolution and marker, and now writes only the markedgraph.schema.jsonandorrery.reconstruction.json(report protocol v2: nopublication_idorpublished_files;fileslists what it wrote). The function is nowreconstruct_uk_schema. A build that records Orrery evidence is pointed to the new command.tools/orrery-contract/(Node scripts running Orrery's parser on Microcosm's documents) is deleted, with the engine-free job'sactions/setup-nodestep and thenpm ciline intools/run_engine_free_tests.sh.tools/ci_test_plan.py verify-workflowpasses on the edited workflow.--publish-orreryand--no-publish-orrerystill change nothing and keep their warning; the cleanup task removes them withtools/run_uk_cut.py's use.docs/orrery-publication.md,docs/orrery-adapter.md, the README, the graph package README, the agent guide and the other docs that described the projection; three fragments underchangelog.d/1745-*.Decisions
Made with Anthony on 2026-11-25 and 2026-11-26:
graph.json), and the marker records the Microcosm revision that compiled the schema.orrery-inputssubmission, and a declaration-only reconstruction has none. A new collector task accepts a schema carrying a valid reconstruction marker without an overlay and records its document as reconstructed; the plannedmicrocosm-emitter backfill-orrery <dir>command submits it.What its merge waits for
Nothing in another repository has to land first: the collector already projects from the staged inputs, and the emitter already starts without its graph module when a build does not ask for it (as
start_bundle_emitterdoes today).Outside this repository
MICROCOSM_RUNS_LOCAL_DIR) and the emitter'smicrocosm-emitter-publish-graph --directoryreadorrery.upload.json, which new builds no longer write. Both belong to the direct-upload path that the emitter and microcosm-runs tasks remove.tools/generate-orrery-projection-fixtures.pyruns Microcosm's projection from a Microcosm checkout, so after this merges it works only on an earlier commit. Its tests use saved fixtures and blob IDs, so nothing breaks.Tests
Red-green, with only the added and changed tests run locally, by node ID:
af1752c59, stand-insorrery_inputs.pyandreconstruct_uk_schemaso every failure is an assertion): 19 failed, none at import or collection, in 3 min 22 s.a8bb42be8): the change. Tests that used the projection only to inspect a schema, an overlay, a presentation contract or a marker now assert on those directly; tests of the projection's own output, the Node parser checks, the inventory and the receipt are deleted.test_graph_orrery_projection_without_store.pyis nowtest_graph_execution_overlay_file.py, and the three schema checks worth keeping fromtest_graph_orrery.pymoved totest_graph_schema.py.4da3455f2) and green (06e09b6ad): only the deleted projection validated a schema's presentation contract, so the graph step and the inputs command now runvalidate_presentationbefore handing a schema over; red: 2 failed.1371ddad9).ruff check,ruff format --check,pytest --collect-onlyof the changed test files andtools/ci_test_plan.py verify-workflowran after each change; the reviewers ran individual changed tests by node ID to settle their findings. CI runs the tests.One check is gone with the projection: it was the only code that refused an execution overlay whose
graph_sha256does not match the schema's (test_execution_overlay_graph_binding_is_checkedis deleted). Microcosm only writes overlays it collects from that same schema, and the collector's copy of the projection still refuses a mismatch.Review
Three rounds of adversarial review, each in a fresh clone; every bug found was fixed, test-first where the bug was in code.
args.graph_store, so the command refused "Evidence store None". Low: a graph step that registered nothing left an earlier attempt'sorrery.evidence-manifest.jsonin a reused output directory, where staging would take it for this attempt's.7fbc57b38(tests; red for the low bug: 1 failed; plus refusal tests for a duplicate JSON key, a symbolic link and a missing upstream file),9da8e1a66(the stale record is removed; the deadrowwise_staging.active_telemetry_emittergoes),4bf54fb8b(_run_with_graph_publicationis now_run_with_graph_inputs)test_transport_evidence_kernelsstill listed nine graph modules the transport bindings reached only through the deleted projection, so its module count failed.cac3af4dc(the list is now the twelve modules reached; red test for an upstream file behind a link: 1 failed),9534827c0(the command reads each upstream file once, never through a link, within the collector's 64 MiB bound)test_cli_prints_the_resolved_output_path_it_wrote, unchanged by the PR, still expected the reconstruction summary's old first sentence.0f5c669f4(the test expects the new sentence; the build's graph step uses the same single upstream read)Left open, all rated as code quality rather than bugs:
validate_graph_schemarejects, and an upstream file over 64 MiB or not a regular file.orrery-inputssubmission.orrerymodule and keeps its Orrery methods, which mirror the interface (the emitter work removes them there).test_uk_graphrestate values the schema compiler always sets.Reviews:
microcosm-1748-review-round{1,2,3}-2026-11-26.mdin the review hand-off folder.Environment variables and secrets
The workflow change only removes a step. No variable or secret is added or removed.
tools/run_engine_free_tests.shactions/setup-nodestep andnpm ciline read no variable or secret, and the job declares noenv:orsecrets:MICROCOSM_TELEMETRY_REQUIREDmicrocosm.build.telemetry_emitter, unchangedMICROCOSM_EMITTER_COMMAND,XDG_CACHE_HOMEmicrocosm-emitter-interface, in the buildHF_TOKEN/HUGGINGFACE_TOKENhf auth login🤖 Generated with Claude Code