Repository navigation
Split execution/process_identity.py and async_retirement.py out of child_process.py - #5278
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cut 8 of Core cold-start optimization: splits lightweight OS process identity/inspection (
src/agent_comms/execution/process_identity.py) and async retirement joins (src/agent_comms/execution/async_retirement.py) out ofsrc/agent_comms/execution/child_process.pyso identity-only callers never pull in child-spawning, multiprocessing, helper workers, systemd units, or repository launch machinery.Key changes
ProcessIdentity,NoProcess,ProcessName,ProcessState,ProcessPlatform,ProcessOperations,ProcfsRecord,ResidentMemory,ProportionalMemory, andSTOP_GRACE_SECONDSintosrc/agent_comms/execution/process_identity.py.AsyncWork,join_retirement, andChildRetirementErrorhierarchy intosrc/agent_comms/execution/async_retirement.py.CurrentPlatformmixin insrc/agent_comms/execution/host_platform.pysoHostPlatform,ProcessPlatform, andPlatformsharecurrent()with zero P38 duplication.src/,tests/,tools/, andstack/and removed all 15 unusedTIME-3re-export aliases fromchild_process.py(keeping only direct importschild_process.pyitself uses, which also covercomms-tui'sjoin_retirement/ProcessNameimports).Cold-start measurements (alternating warm runs,
main@451677aefc->perf/split-process-identity)agent_comms.cli_verbs.who:648 -> 630modules (-18),child_processTrue -> False,1004.4 -> 984.0 msagent_comms.cli_verbs.send:440 -> 420modules (-20),child_processTrue -> Falseagent_comms.cli_verbs.channels:409 -> 389modules (-20),child_processTrue -> Falseagent_comms.registry.registry_store:616 -> 598modules (-18),child_processTrue -> False,947.3 -> 872.1 ms(-75.2 ms)agent_comms.thread_views:601 -> 583modules (-18),child_processTrue -> False,863.2 -> 773.2 ms(-90.0 ms)Verification
964/964agent_commsmodules import with0errors;0broken imports acrosssrc/,tests/,tools/,stack/;36CarryChain steps;REL_IMPORTS=0.102 passed, 1 skipped(test_runtime_processes,test_process_names,test_backend_native_child,test_host_services,test_sealed_mechanisms,test_declarations,test_bus_resource_claims) +43 passed(test_child_process,test_helper_workers) =145focused tests passed.host_platform+child_process+process_identity+async_retirement:0new findings (deleted P38current()duplication across platform families).