Follow-up from @M3gA-Mind's review on PR tinyhumansai#2631.
Issue: file_write's external_effect_with_args calls target.exists() (synchronous stat) inline in the async tool loop, blocking a tokio executor thread. Fast for local paths (microseconds), but violates async hygiene and would be a problem on a slow/remote filesystem.
File: src/openhuman/tools/impl/filesystem/file_write.rs (the target.exists() create-vs-edit probe)
Options:
- Make the existence check async (the
Tool trait makes external_effect_with_args sync today, so this needs a trait change); or
- Pre-compute existence in the gate routing (where async is available) and pass it in via a separate
check_external_effect path.
tinyhumansai#2631 documents this as an intentional sync/blocking call for now.
Follow-up from @M3gA-Mind's review on PR tinyhumansai#2631.
Issue:
file_write'sexternal_effect_with_argscallstarget.exists()(synchronousstat) inline in the async tool loop, blocking a tokio executor thread. Fast for local paths (microseconds), but violates async hygiene and would be a problem on a slow/remote filesystem.File:
src/openhuman/tools/impl/filesystem/file_write.rs(thetarget.exists()create-vs-edit probe)Options:
Tooltrait makesexternal_effect_with_argssync today, so this needs a trait change); orcheck_external_effectpath.tinyhumansai#2631 documents this as an intentional sync/blocking call for now.