Repository navigation
release: rustez 0.14.1 — atomic candidate-change for the warnings path - #42
Merged
Merged
Conversation
Closes #40. Picks up rustnetconf 0.14.1, which adds rpc_candidate_change_with_warnings() (upstream #58). 0.14.0 left load_with_warnings() as the one candidate-modifying call that had to hand-roll its own preflight: validate the fragment, then mark_candidate_dirty(), then rpc_with_warnings(). There was no atomic candidate-change call that returns warnings, and load_with_warnings() needs them. That workaround closed the malformed-XML hole but was never equivalent to the atomic path. It could not reach rustnetconf's keepalive_check() / ensure_established(), both private, so a dead or unreachable session could still leave a FALSE dirty mark. False is the dangerous direction: close() acting on a mark this session did not earn discards another operator's uncommitted work on the shared Junos candidate — the exact bug 0.14.0 fixed, reached by a different route. rpc_candidate_change_with_warnings() validates, preflights, marks, and only then sends, as one step. The hand-rolled sequence is gone, and mark_candidate_dirty() is now called nowhere in rustEZ — the atomic calls own the mark, so nothing can mark for an RPC that never reached the device. A comment at the call site says not to reintroduce a separate mark, since that is the specific regression to guard against. Validation now happens inside the atomic call, after auto_open_if_needed() rather than before it. A malformed payload is still cleaned up correctly: the call errors, so close_auto_opened_on_error() closes the database this call opened. The cost is one open/close round trip on an error path, in exchange for a single source of truth for validation. No public rustEZ API changed. commit_with_comment()'s inverse limitation is unchanged — it still cannot clear the flag on the raw rpc() path, because there is still no typed commit-with-comment upstream. Verified: clippy -p rustez / -p rustez-py / workspace --all-targets with -D warnings all clean; 58 unit + 4 doctests pass; Python suite 20 passed against a freshly built 0.14.1 extension; cargo deny advisories/bans/sources/ licenses all ok; cargo audit clean over 237 crates; check_versions.py agrees at 0.14.1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 20, 2026
Closed
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 #40. Picks up rustnetconf 0.14.1, which adds
rpc_candidate_change_with_warnings()(upstream #58).What was wrong
0.14.0 left
load_with_warnings()as the one candidate-modifying call that had to hand-roll its own preflight — validate the fragment, thenmark_candidate_dirty(), thenrpc_with_warnings()— because no atomic candidate-change call returned warnings, and this one needs them.That workaround closed the malformed-XML hole but was never equivalent to the atomic path. It could not reach rustnetconf's
keepalive_check()/ensure_established(), both private, so a dead or unreachable session could still leave a false dirty mark.False is the dangerous direction:
close()acting on a mark this session did not earn discards another operator's uncommitted work on the shared Junos candidate — the exact bug 0.14.0 fixed, reached by a different route.The fix
rpc_candidate_change_with_warnings()validates, preflights, marks, and only then sends, as one step.The hand-rolled sequence is gone, and
mark_candidate_dirty()is now called nowhere in rustEZ — the atomic calls own the mark, so nothing can mark for an RPC that never reached the device. A comment at the call site says not to reintroduce a separate mark, since that is the specific regression to guard against.Also removed the now-unused
NetconfErrorimport, corrected thebuild_load_xml()doc comment that still claimed it "needs raw RPC", and updated the two CLAUDE.md bullets that documented hand-marking as the required pattern.One behavioural detail, stated plainly
Validation now happens inside the atomic call, which runs after
auto_open_if_needed()rather than before it. A malformed payload no longer fails before the configuration database is opened; instead the call errors andclose_auto_opened_on_error()closes the database this call opened.Cleanup is still correct. The cost is one open/close round trip on an error path, in exchange for validation having a single source of truth rather than being duplicated in rustEZ and upstream. Deliberate trade, not an oversight.
Unchanged
No public rustEZ API changed.
commit_with_comment()'s inverse limitation stands — it still cannot clear the flag on the rawrpc()path, because there is still no typed commit-with-comment upstream.Verification
cargo clippy-p rustez/-p rustez-py/ workspace--all-targets, all with-D warnings→ cleancargo deny check advisories bans sources licenses→ all okcargo audit→ clean over 237 cratescheck_versions.py→ agrees at 0.14.1🤖 Generated with Claude Code