Repository navigation
Drop size caps and recombine split modules and types - #89
Merged
Merged
Conversation
Remove the `type_size` check in `build-xtask` and the `too_many_lines` and `too_many_arguments` limits in `Cargo.toml` and `clippy.toml`. Recombine the modules, types, and methods across the Engine, Harness, and Plugin crates that were split across files and helper types. - Remove `ToolPerformer`, `drive_run`, `StoreScoped`, `ChainOps`, `vfs_record.rs`, `RecordRole`, `raised_from`, and `WireLlamaTimings`, and build `Effect::record` and `EffectAnswer::record` values directly. - Stack-allocate `Session` in `session::open`, project `MessageList` and `Snapshot` records without cloning `Vec<MessageRecord>`, and borrow fields directly in `Driver`, `SectionVm`, `Machine`, `Chain`, and `Access`.
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.
Remove the
type_sizecheck inbuild-xtask(MAX_FIELDS = 12andMAX_METHODS = 25) and thetoo-many-lines-thresholdandtoo-many-arguments-thresholdcaps inclippy.tomlandCargo.toml. Recombine the modules, types, and methods across the Engine, Harness, and Plugin crates that were split across files and helper types to satisfy those caps, and remove borrow-checker-evading clones and allocations.Summary of Changes
374 files changed, 25,459 insertions(+), 37,330 deletions(-),-11,871net lines):.rsfiles reduced from247to136(-111production files,-44.9%, pluscrates/build-xtask/src/type_size.rsremoved).38,922to35,969(-2,953code lines, plus-758inbuild-xtask), production functions/methods from2,570to2,291(-279), and production structs/enums from500to429(-71).crates/runvil-engine/public-api.txtorcrates/runvil/public-api.txt.harness-runner,harness-plugin-loader,plugin-mcp,harness-gateway-client,runvil-plugin):Driver<'a>ineffect_loop.rs(InboxState,StepFlow,InlineVfs,handle_pending, andreconcile_stepfolded in;RunSetupandRunControlborrowed directly), unifiedFlightsonto a singleBTreeMap<EffectId, Flight>withextract_if, removedToolPerformeranddrive_run(eliminating double-boxedToolCallandRenderfutures), and foldedprepare.rs,environment.rs,setup.rs,performers_offline.rs,recorder_memory.rs, andpacks_builtin.rsinto their owning modules (15 -> 9files).harness-plugin-loader(10 -> 6files): stack-allocatedSessioninsidesession::open, keyedSessiondirectly byRvVerbwith const-genericrefuse/add_tool/file_*C callbacks, compressedSteps<'a>ontoPhase<'a>and borrowedtool: &'a str, deletedEntryFactoryandOffered, and foldedload.rs,host.rs,resources.rs, andpark.rs.plugin-mcp(6 -> 4files) andharness-gateway-client(9 -> 3files): unifiedServers/Namespace/Status/Server, streamedReadydirectly inlist_ready, foldedconnect.rsandresult.rsintoserver.rs, deletedWireLlamaTimingsand the 4 private conversion traits inconvert.rs, and foldedcatalog.rs,config.rs,fail.rs,metrics.rs,resources.rs, andtimer.rs.runvil-runtime,runvil-lua,runvil-vfs,runvil-prompt,runvil-types,runvil-model-client,runvil-markdown):runvil-runtime(41 -> 18files): dissolvedChainOpsandchain_ops.rsontoChainandScheduler, deletedvfs_record.rsand the 14*Recordserde mirror types (building sorted-keyserde_json::Valuedirectly inEffect::recordandEffectAnswer::recordwithout double-cloningVfsOp/VfsOutcome), deletedScheduler::prompt_ofvia disjointChainfield borrows, deletedSectionVmSetup,VmSeed,RunSets,ArrivedRound,Scope,Settled,Served,Sources,Dispatched,ChainStep, andOutstanding, and consolidated the 18-fileexecute/scheduler/tree into 8 concept files.runvil-lua(68 -> 36files): foldedvm/{inject,install,run,state}.rsintosrc/vm.rs, foldedmodels_loop/machine.rsintosrc/models_loop.rs(movingCancelHookandLoopGuardontoMachineand deletingInput<V>), eliminatedMessageList::to_records/Snapshot::to_recordsfull-conversation clones andToolCallCounts::snapshotfull-map clones, deletedRecordRole,VmShare,VAR_GUARDED_DATA_REGISTRY, and theraised_fromreverse error parser, and consolidatedjson/*,tools/*,markdown/*,protocol/*,globals/*, andbindings/*.runvil-vfs(33 -> 18files),runvil-prompt(16 -> 8files),runvil-types(22 -> 15files),runvil-model-client(9 -> 4files), andrunvil-markdown(11 -> 8files): deletedStoreScoped(relativizing errors inAccess), consolidatedvfs/src/{handle,traits,real}/, scanned CommonMark once inPromptBody::scanwithKeySeedand a single reusable&mut Stringpath buffer inargs_check, macro-droveErrorCode, and flattenedCONTROL_MARKUP.