This repository was archived by the owner on Nov 15, 2026. It is now read-only.
Repository navigation
fix: contain scripts, journal write rollback, hold bound targets, close test gaps (SIM-06) - #34
Merged
Merged
Conversation
A script path of ../x.py, an absolute path or a symlink resolved outside the deployment root and was executed with --allow-scripts. model and data paths stay unrestricted; they are read, not executed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…en bound target (SIM-06) A Modbus write deep-copied every cell of the device (about 3 ms for 8000 cells) to be able to roll back. It now records the previous raw value of only the cells the write, its on_write hook and its bindings change, and restores them in place. Under writePolicy hold, bindings no longer overwrite a target the client wrote, matching how hold treats generators. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns, serial transport (SIM-06) Writes that fail now assert ILLEGAL_VALUE instead of any non-None result, the seed test distinguishes a followed seed from an ignored one, the encoder and synchronous-hook defenses are exercised, and the serial transport is covered with a stubbed server. test_root_adam_deployment skips without fetched models. Co-Authored-By: Claude Sonnet 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Second batch of SIM-06.
script:of../x.py, an absolute path or a symlink resolved outside the deployment root and was executed with--allow-scripts. Scripts must now stay inside the deployment root;modelanddatapaths stay unrestricted because they are read, not executed. The--scriptcommand-line option is unchanged.on_writehook and its bindings change, and a rejected write restores them in place (the cells dict keeps its identity). Test: a hook that changes another property and then refuses the write.hold. A binding re-applied after every write and tick, silently dropping a client write to a bound target while reporting success. UnderwritePolicy: holda client-written target is now left alone, asholdalready does for generators (documented inmodel-validation.md); underoverwriteit follows its source again. This stays a modsim runtime behavior; no rule was added to the modpoll-wot simulation-data schema.ILLEGAL_VALUEinstead of any non-None; the seed test now fails if the seed is ignored (a different seed must give a different sequence); the encoder rejects wrong types without touching the register; asynchronous hooks are rejected at load and at call time; the--comm serialpath is covered with a stubbed server;test_root_adam_deploymentskips whenexamples/modelsis not fetched.Note on one commit: the first commit also carries the new seed test and the skip guard, because they live in
tests/test_deployment.pywith the script-path test.Verification:
uv run pytest130 passed / 3 skipped,uv run mypyand black 24.4.2 clean. The script-path, journal and binding tests fail without their fixes.🤖 Generated with Claude Code