fix(omp): keep parent identity across task subagent dispose#97
Conversation
|
@mmkzer0 thanks for the fix - not sure if this review is valid you can decide what to do: PR #97 review —
|
OMP task subagents share the parent process and were binding/stopping the parent on session_shutdown. Soft-finalize on owner shutdown, skip nested bind via a process-wide identity latch, recover bindings from HCOM_INSTANCE_NAME, and split the omp hook module under 1k lines.
|
@aannoo ty, did a bit of digging and follow-up Some polish:
On the review items:
Tests still pass and did some live testing, nothing seems to break and no more subagent id drop on parent unrelated: found kimi SessionEnd on an OMP-launched pid is a separate identity cycle that can break, can tackle that in another PR |
|
nice |
Summary
Encountered hcom identity drops in omp when subagents were used; on subagent exit they would take the parent identity with them.
HCOM_OMP_IDENTITY_OWNER+ownsIdentity; soft--softstop only for the identity owner).recover_process_binding_for_instancerebuilds process/session bindings viaHCOM_INSTANCE_NAMEafter soft-stop.hooks/omp.rsintohooks/omp/{mod,handlers,plugin,tests}so the hook side is modular, more readable and generally nicer to work with.Help and suggestions on this welcome, been a bit of a grind to break up the big hooks file, but tests all pass and live usage works.
Out of scope / follow-ups
deliverAs: "followUp"(messages wait until the current turn ends instead of steering mid-run) — separate change.keepOwnerboolean with clearer session-state vs identity-release APIs.Test plan
cargo fmtcargo clippy -p hcom -- -D warningscargo test(includinghooks::omp)tasksubagent use