Skip to content

fix: enable memory controller legacy fallback for kelvin-host in release builds#31

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/bug-memory-controller-fallback-disabled
Draft

fix: enable memory controller legacy fallback for kelvin-host in release builds#31
Copilot wants to merge 2 commits intomainfrom
copilot/bug-memory-controller-fallback-disabled

Conversation

Copy link

Copilot AI commented Mar 16, 2026

Fresh users running the release binary with no memory signing keys configured hit a hard error because kelvin-host was compiled with memory_rpc active but without memory_legacy_fallback, leaving no recovery path when RPC connection/validation fails.

Root Cause

The release build compiles all binaries in a single cargo build invocation:

cargo build ... -p kelvin-host -p kelvin-gateway ... --features kelvin-gateway/memory_rpc

Cargo's feature unification propagates kelvin-sdk/memory_rpc (pulled in via kelvin-gateway) to kelvin-host since both share the same kelvin-sdk dep. memory_legacy_fallback was never added, so the hard-error branch fired unconditionally on any RPC failure:

#[cfg(not(feature = "memory_legacy_fallback"))]
{
    return Err(KelvinError::Backend(format!(
        "memory controller unavailable and legacy fallback disabled: {err}"
    )));
}

Changes

  • scripts/package-unix-release.sh — add kelvin-host/memory_legacy_fallback to --features
  • scripts/package-windows-release.ps1 — same
--features kelvin-gateway/memory_rpc,kelvin-host/memory_legacy_fallback

With this, unconfigured or unavailable memory controllers degrade gracefully to in-process memory rather than aborting.

Original prompt

This section details on the original issue you should resolve

<issue_title>BUG Memory Controller Fallback Disabled</issue_title>
<issue_description><!--
Thank you for reporting a possible bug in KelvinClaw.

Please fill in as much of the template below as you can.

Platform: output of uname -a (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->

  • Version:

From release 0.1.8 binary:

kelvinclaw-0.1.8-linux-arm64

  • Platform:

Raspberry Pi: 6.12.47+rpt-rpi-v8 AgenticHighway/kelvinclaw#1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/Linux

  • Subsystem:

kelvin-memory-client + kelvin-memory-controller

the memory controller fallback is disabled

Error message

[kelvin] OPENAI_API_KEY not found in the environment or .env files.
[kelvin] Paste your OpenAI API key for this run, or press Enter to continue with echo mode:
loaded kelvin core toolpack plugins: 5
loaded installed plugins: 2
error: backend failure: memory controller unavailable and legacy fallback disabled: invalid input: memory signing config requires either PEM signing material or KMS key id

Steps to reproduce

  1. freshly download kelvinclaw binary from release 0.1.8
  2. attempt to run ./kelvin
  3. enter dummy api key and press enter</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…cripts

Co-authored-by: willsarg <12886992+willsarg@users.noreply.github.com>
Copilot AI changed the title [WIP] [BUG] Fix memory controller fallback disabled issue fix: enable memory controller legacy fallback for kelvin-host in release builds Mar 16, 2026
Copilot AI requested a review from willsarg March 16, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG Memory Controller Fallback Disabled

2 participants