Skip to content

Feature: more customizable startup#55

Merged
jmcphers merged 13 commits intomainfrom
feature/startup-environment
Nov 25, 2025
Merged

Feature: more customizable startup#55
jmcphers merged 13 commits intomainfrom
feature/startup-environment

Conversation

@jmcphers
Copy link
Contributor

@jmcphers jmcphers commented Nov 12, 2025

Replaces run_in_shell with more ways to customize kernel startup, either with a command (like module load or conda activate) or a script.

Also, some chores:

  • migrate to newer version of OpenAPI code generator
  • migrate hyper 0.1 => hyper 1.0 (some refactoring needed)
  • break up increasingly monolithic kernel_session.rs
  • use a script rather than hand edits to remove TLS/openssl dependencies

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_environment and startup_environment_arg replacing run_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.

@jmcphers jmcphers merged commit 693565b into main Nov 25, 2025
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants