forked from 1b-agent/opencadstudio-upstream
fix(plugins): Python plugins see the host document again
Plugins read the host's document through a shared reference across the dynamic-library boundary, and the entity index hashed with foldhash's per-process seed, so every handle lookup from the plugin missed. The codec now uses a fixed hasher (opencadcodec f385f75; kernel 9841749, graph e9c23ad). The Python IPC suite also caught up with intended changes: ATTDEF renders its tag, DXF now keeps the lock-position flag, and the modify audit turns associative arrays off since it checks loose copies. The rate-limiter test waits for the host's check instead of a fixed sleep that raced on macOS, and ENV_LOCK no longer cascades a poisoned lock into every later test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c48fac7ae9
commit
ee2898095e
11 files changed
+43
-42
No files matched your search
@@ -1210,7 +1210,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn v4_client_notification_queue_size_env_is_honored() {
|
||||
let _guard = ENV_LOCK.lock().unwrap();
|
||||
let _guard = ENV_LOCK.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let prev = std::env::var("OCS_PLUGIN_NOTIFY_QUEUE_SIZE").ok();
|
||||
std::env::set_var("OCS_PLUGIN_NOTIFY_QUEUE_SIZE", "7");
|
||||
assert_eq!(notify_queue_size(), 7);
|
||||
@@ -1222,7 +1222,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn v4_client_notification_queue_drops_newest_on_overflow() {
|
||||
let _guard = ENV_LOCK.lock().unwrap();
|
||||
let _guard = ENV_LOCK.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let prev = std::env::var("OCS_PLUGIN_NOTIFY_QUEUE_SIZE").ok();
|
||||
std::env::set_var("OCS_PLUGIN_NOTIFY_QUEUE_SIZE", "1");
|
||||
let (host_stream, mut runner_stream) = connect_pair();
|
||||
|
||||
Reference in new issue
Block a user