Repository navigation
Add atomic checkpoint writes, prefab extensions and Ollama request options - #356
Open
concordia-claw wants to merge 1 commit into
Open
concordia-claw wants to merge 1 commit into
concordia-claw wants to merge 1 commit into
Conversation
concordia-claw
force-pushed
the
fix/atomic-checkpoint-files-023
branch
from
September 13, 2026 22:17
5ef557d to
162cba7
Compare
This was referenced Sep 13, 2026
Closed
jzleibo
reviewed
Oct 3, 2026
concordia-claw
force-pushed
the
fix/atomic-checkpoint-files-023
branch
from
October 3, 2026 20:52
162cba7 to
d424b7c
Compare
jzleibo
approved these changes
Oct 3, 2026
This branch has not been deployed
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.
Publish complete checkpoint files and configure standard entity/model behavior without replacing their construction or execution machinery.
A failed checkpoint write should leave an existing checkpoint readable rather than expose a partly serialized file. Entity prefabs need configurable context components and action-prefix handling, while local Ollama requests need explicit output limits and optional structured text formats.
Scope and review map
os.replace. Failure cleanup removes unpublished staging files. Checkpoint filenames and callback behavior follow the Simulation contract; serialization errors propagate and I/O errors are logged.extra_componentsandextra_components_indexcontrol additions and ordering. The prefabs retain their standard memory, perception/context components and supported acting-policy injection.minimal.Entityexposesprefix_entity_name, defaulting to true; callers can disable the free-response name prefix for structured text.basic.Entityhas the exact class docstring: “A prefab implementing a basic actor entity.”request_timeout, positivemax_output_tokens, and optionalresponse_format(jsonor a schema mapping). Text generation honors the caller's token request capped by the configured maximum. The schema mapping is copied so subsequent caller mutations cannot change requests. Choice generation keeps its own JSON format and uses the configured output cap when supplied.The upstream diff covers nine files: four production modules plus the shared component helper, and four test modules. Standard human-input interfaces and acting-policy injection are provided by upstream main, not additional prerequisite PRs in this diff. #378 reviews separate Ollama choice-contract behavior; it is not required to exercise this PR.
Verification
Run from this branch's checkout with repository test dependencies:
41 tests pass. The checkpoint tests exercise successful replacement, interrupted/failed writes, cleanup and retained readable files. Prefab tests exercise component ordering, default context/lifecycle, custom acting policies and configurable prefix behavior. Ollama tests mock the SDK client and check timeout/token/format arguments, invalid options and defensive copying. These checks use guarded construction and mock requests; they do not launch an engine loop, server or live provider call.
All nine affected Python files pass isort, pyink, pylint errors-only and pyrefly, and the diff passes whitespace checks. Formatter adjustments preserve executable ASTs. Hosted code/CLA results are reported by the checks panel.
Boundaries
Atomic publication applies to the final filename on the same filesystem; it is not power-loss durability, transactional in-memory restoration, engine/RNG continuation or a locking protocol. An Ollama output-token cap and HTTP timeout are request settings, not a global runtime or monetary budget. Structured output constrains shape, not factual correctness. No engine implementation or workflow/security configuration is changed.