mirror of
https://github.com/lahfir/agent-desktop.git
synced 2026-08-16 12:03:46 +00:00
native_id was inserted mid-struct in AdRefEntry (offset 40), shifting every field from `states` onward and silently corrupting a prebuilt C consumer's field reads. Move it to the end, matching AdActionStep's append-only evolution pattern, and bump AD_ABI_VERSION_MAJOR so a consumer built against the old layout fails ad_init instead of misreading memory. Also collapse execute_by_ref_timeout.rs, which hand-duplicated ~85 lines of the @generated ad_execute_by_ref body, into a proper Family-B codegen template so it stays in lockstep with the canonical wrapper instead of drifting from it. - crates/ffi/src/types/ref_entry.rs: move native_id to the end of AdRefEntry - crates/ffi/src/abi_version.rs: bump AD_ABI_VERSION_MAJOR 1 -> 2, +regression test pinning the bump so a revert fails a real assertion - crates/ffi/tests/c_abi_layout.rs: explicit per-field offset_of! asserts for every AdRefEntry field (not just monotonic ordering) + zeroed-read sentinel now asserts native_id.is_null() - crates/ffi/codegen_templates/execute_by_ref_timeout.rs.in + crates/ffi/build.rs + tests/codegen_exhaustiveness.rs: generate ad_execute_by_ref_timeout through the same Family-B pipeline as ad_execute_by_ref instead of a hand-maintained duplicate - crates/ffi/include/agent_desktop.h: regenerated via scripts/update-ffi-header.sh (cbindgen 0.29.4) |
||
|---|---|---|
| .. | ||
| core | ||
| ffi | ||
| linux | ||
| macos | ||
| windows | ||