Problem
src/builtins.c:78-187 contains writeback_first_ptr and writeback_ptr_node with ~95% identical logic for isolation-env writeback. The only difference is how the pointer name is extracted. This is ~110 lines of duplicated code.
Fix
Unify into a single function that accepts a name parameter, eliminating the duplication.
Reported by Kilo Code (automated audit tool), not a human reviewer.
Problem
src/builtins.c:78-187 contains writeback_first_ptr and writeback_ptr_node with ~95% identical logic for isolation-env writeback. The only difference is how the pointer name is extracted. This is ~110 lines of duplicated code.
Fix
Unify into a single function that accepts a name parameter, eliminating the duplication.
Reported by Kilo Code (automated audit tool), not a human reviewer.