Refactor managed-agent runtime into cohesive modules - #2974
Merged
Conversation
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
runtimeAPI through narrow re-exports; helper bodies and platformcfgbranches are unchanged apart from module-qualified visibilityruntime.rsfrom 2,220 lines onmainto 908 lines and remove its temporary file-size override, restoring the standard 1,000-line ceilingWhy
mainfailed after stale successful PR checks allowed independent growth to combine aboveruntime.rs's 2,216-line override. The earlier fix in #2974 extracted only 55 lines and left the monolith on a special ratchet. This replacement includes that extraction but establishes responsibility boundaries and removes the exception entirely.Module boundaries
process.rs— process identity, ownership markers, receipt validation, and termination primitivesorphan_sweep.rs— same-instance orphan discovery and cleanupinstance_reaper.rs— foreign/dead desktop instance detection and agent reapinglifecycle.rs— tracked runtime synchronization and stale record cleanupmetadata.rs— model/provider metadata resolutionruntime.rs— summary/config/spawn orchestration and compositionValidation
At
a824fda31eff6ecc0d39ca1b8ea5602a108897e6:desktop-checkdesktop-testdesktop-tauri-test: 1,637 passed, 0 failed, 14 ignored; integration + doc tests passedcargo check --manifest-path desktop/src-tauri/Cargo.toml --libcargo fmt --manifest-path desktop/src-tauri/Cargo.toml --all -- --checknode desktop/scripts/check-file-sizes.mjsSupersedes #2974 and #2930.