Repository navigation
Let a seal-only population observer skip the executor's snapshot detachment - #951
Merged
Merged
Conversation
run_graph(_population_observer_detach=False) passes the live admitted population instead of allocating a detached snapshot per reached node. Opt-in, default unchanged, no US import, and the keyword enters no key, receipt or cache record. Four tests: no snapshot is allocated, the run exports byte- identical store objects and an identical manifest key, the observer really does receive the executor's own object, and the keyword is a bool that does nothing without an observer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit 9bef866)
On main run_graph hands the run to _execute_graph, which the branch this commit was picked from did not yet have, so the flag is passed through and accepted there. Behaviour unchanged from the picked commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… within one run The run_graph docstring above the new keyword promised that changes to a snapshot cannot alter execution or persistence. With detachment off, both halves are withdrawn: a mutating observer can leave the store holding bytes that are not the content the node key names, with the payload digest rewritten to match, so later runs serve them as cache hits under an unchanged key. Both are now withdrawn by name. The seal-only observer test's default arm compared one run's snapshots against a different run's frames, and no object from one run_graph call can be identical to one from another, so it passed whatever the default did. Both arms now compare within their own run; reducing _observer_snapshot to the identity turns it red. Picked from 6e3b309 on native-retention-seal, graph package hunks only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Sep 18, 2026
Main splits run_graph into run_graph and _execute_graph, and this branch's keyword was read inside what used to be one function, so after the merge every run_graph call raised NameError. Same repair as 7a74751 on the main-based PR #951 branch: pass the keyword through and accept it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
September 18, 2026 15:04
…name the guarantees its docstring withdraws Gate round 1 on #951 asked for both: the acceptance record's interface-freeze section says runtime-only contract changes are numbered amendments, and the executor docstring's 'both halves of the paragraph above' pointed at the cost paragraph rather than the execution and persistence guarantees. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
16 tasks
juaristi22
added a commit
that referenced
this pull request
Sep 25, 2026
…ock the interface Main recorded the live-population observer opt-in (#950, #951) as graph amendment 25 while #918 was open, so the two amendments #918 records as 25 (a same-kind WeightUpdate is declarable) and 26 (the context carries the version's metadata, mass log and column order) become 26 and 27. Every code comment, docstring, test docstring, changelog fragment, acceptance heading and receipt moves in lockstep; the interface lock is re-recorded because the comments live in decl.py and kernel.py. The _project_context docstring now points at _execute_graph, where #938 moved the boundary selection, and amendment 27 states that the executor's boundary mass logs are live references under amendment 25's opt-in. The three root-level review artefacts of the shared-contract lane are dropped; the experiments/ receipts stay, with a note on the renumbering and the pre-cherry-pick commit hashes they cite. Verified: packages/microcosm-graph/tests 690 passed, 1 skipped (junit); tools/graph_acceptance_burndown.py --verify ok; ruff clean on the edited files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
juaristi22
added a commit
that referenced
this pull request
Sep 28, 2026
…ock the interface Main recorded the live-population observer opt-in (#950, #951) as graph amendment 25 while #918 was open, so the two amendments #918 records as 25 (a same-kind WeightUpdate is declarable) and 26 (the context carries the version's metadata, mass log and column order) become 26 and 27. Every code comment, docstring, test docstring, changelog fragment, acceptance heading and receipt moves in lockstep; the interface lock is re-recorded because the comments live in decl.py and kernel.py. The _project_context docstring now points at _execute_graph, where #938 moved the boundary selection, and amendment 27 states that the executor's boundary mass logs are live references under amendment 25's opt-in. The three root-level review artefacts of the shared-contract lane are dropped; the experiments/ receipts stay, with a note on the renumbering and the pre-cherry-pick commit hashes they cite. Verified: packages/microcosm-graph/tests 690 passed, 1 skipped (junit); tools/graph_acceptance_burndown.py --verify ok; ruff clean on the edited files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
juaristi22
added a commit
that referenced
this pull request
Sep 28, 2026
…ock the interface Main recorded the live-population observer opt-in (#950, #951) as graph amendment 25 while #918 was open, so the two amendments #918 records as 25 (a same-kind WeightUpdate is declarable) and 26 (the context carries the version's metadata, mass log and column order) become 26 and 27. Every code comment, docstring, test docstring, changelog fragment, acceptance heading and receipt moves in lockstep; the interface lock is re-recorded because the comments live in decl.py and kernel.py. The _project_context docstring now points at _execute_graph, where #938 moved the boundary selection, and amendment 27 states that the executor's boundary mass logs are live references under amendment 25's opt-in. The three root-level review artefacts of the shared-contract lane are dropped; the experiments/ receipts stay, with a note on the renumbering and the pre-cherry-pick commit hashes they cite. Verified: packages/microcosm-graph/tests 690 passed, 1 skipped (junit); tools/graph_acceptance_burndown.py --verify ok; ruff clean on the edited files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
juaristi22
added a commit
that referenced
this pull request
Sep 28, 2026
…ock the interface Main recorded the live-population observer opt-in (#950, #951) as graph amendment 25 while #918 was open, so the two amendments #918 records as 25 (a same-kind WeightUpdate is declarable) and 26 (the context carries the version's metadata, mass log and column order) become 26 and 27. Every code comment, docstring, test docstring, changelog fragment, acceptance heading and receipt moves in lockstep; the interface lock is re-recorded because the comments live in decl.py and kernel.py. The _project_context docstring now points at _execute_graph, where #938 moved the boundary selection, and amendment 27 states that the executor's boundary mass logs are live references under amendment 25's opt-in. The three root-level review artefacts of the shared-contract lane are dropped; the experiments/ receipts stay, with a note on the renumbering and the pre-cherry-pick commit hashes they cite. Verified: packages/microcosm-graph/tests 690 passed, 1 skipped (junit); tools/graph_acceptance_burndown.py --verify ok; ruff clean on the edited files. Co-Authored-By: Claude Fable 5.1 <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.
What this adds
run_graph(_population_observer_detach=False): an opt-in flag that lets a population observer which only seals receive the executor's live admitted population instead of a detached snapshot per reached node. Today every reached node payspickle.dumpspluspickle.loadsof the whole population for the observer, cache hits included. An observer that reads and seals needs no copy.Truestill detaches and still enforces that an observer cannot reach execution state.packages/microcosm-graphonly.Picked from PR #950's executor commits (9bef866 and the graph hunks of 6e3b309), which sit on the stacked native line, so the graph package on
maincarries the mode the US financial runner on that line calls. One adaptation:mainsplitsrun_graphintorun_graphand_execute_graph(from #938), so the flag is passed through and accepted there.Verification
packages/microcosm-graph/tests: all passed at this head in a fresh venv synced from the lock (uv sync --all-packages --locked --extra us);ruff checkandruff format --checkclean on the two touched files. The four tests from the picked commit cover: no snapshot is allocated with the flag off; byte-identical store objects and manifest key with the flag on and off; the observer receives the executor's own object; the flag must be a bool and does nothing without an observer.🤖 Generated with Claude Code