Repository navigation
obs-properties: Preserve parameter destructor ordering - #1939
Merged
zackees merged 2 commits intoOct 23, 2026
Merged
Conversation
zackees
approved these changes
Oct 23, 2026
zackees
left a comment
Member
There was a problem hiding this comment.
Coordinator review: matches C obs_properties_set_param. The old destructor runs on the old parameter before the replacement is stored, and the RefCell borrow is dropped before the callback, so the callback can reenter the properties API. RED→GREEN is recorded, there is a Tier 1 lifecycle test, and the ledger line is present. LGTM.
6 of 7 tasks
This was referenced Oct 23, 2026
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.
Fixes #1938
What and why
When
obs_properties_set_paramreplaces or clears a parameter, its previous destructor now sees the original parameter, matching C. Invoke it before writing the replacement and with no active RefCell borrow, so it can query and update properties. This adds 11 production lines and removes 3, without a callback-list allocation.RED ? GREEN
f534ddf44:replacement_destructor_observes_old_param_like_cfails on DESKTOP-3FLAOFG (Ubuntu 24.04/WSL, pinned soldr 0.9.38/Rust 1.98.1). The unchanged C oracle observes the old parameter; Rust records(false, 1, true, 42)instead of(true, 1, true, 42).soldr cargo clippy -p obs-data --test obs-tests-core --locked -- -D warnings,soldr cargo fmt --all --check, andgit diff --checkpass on that PC.SOLDR_RUSTC_WRAPPER=nonethroughout.Checklist