Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the run_in_shell boolean parameter with a more flexible startup_environment enum that supports multiple kernel startup modes: none (direct), shell (login shell), command (preflight command), and script (startup script). The PR also includes major dependency upgrades from hyper 0.14 to 1.6 and swagger 6.5.0 to 7.0.0-rc2, with corresponding refactoring throughout the codebase.
Key changes include:
- New API fields
startup_environmentandstartup_environment_argreplacingrun_in_shell - Modularized kernel session code with separate modules for startup, lifecycle, environment, process management, etc.
- Shell command escaping utilities for secure command execution
- Startup markers to detect failure points during initialization
- Comprehensive test coverage for new startup modes
- Hyper 1.x migration with updated service traits and body handling
Reviewed Changes
Copilot reviewed 49 out of 51 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| kallichore.json | Adds startupEnvironment enum and startup_environment_arg field to API schema |
| scripts/remove-tls-deps.sh | New script to remove TLS dependencies from generated API code |
| scripts/regen-api.sh | Updated to call TLS removal script after API generation |
| crates/kcserver/src/kernel_session/*.rs | Modularized kernel session into separate concerns: startup, lifecycle, environment, process, shell wrapper, connection, handshake, utils |
| crates/kcserver/src/server.rs | Migrated to hyper 1.x with manual connection handling and service trait updates |
| crates/kcserver/src/websocket_service.rs | Updated for hyper 1.x body and service changes |
| crates/kcserver/tests/*.rs | Updated all tests to use new startup_environment API, added tests for command and script modes |
| crates/kallichore_api/src/server/mod.rs | Extensive hyper 1.x migration with new body types and service implementations |
| crates/kallichore_api/src/context.rs | Simplified authentication context without separate Authorization layer |
| crates/kcserver/Cargo.toml | Updated hyper, swagger, hyper-util, hyperlocal dependencies |
| crates/kcclient/src/main.rs | Updated to use new startup_environment API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Replaces
run_in_shellwith more ways to customize kernel startup, either with a command (likemodule loadorconda activate) or a script.Also, some chores:
kernel_session.rs