Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Heuristic:1jehuang Jcode Credential Isolation

From Leeroopedia
Knowledge Sources
Domains Security, API_Design
Last Updated 2026-10-18 00:00 GMT

Overview

Jev provider selection is configurable per subsystem via separate environment variables, preventing cross-account or cross-provider fallback on failure.

Description

The Credential_Isolation heuristic ensures that the Jev Decisions API provider can be configured separately for each subsystem (memory recall, browser handoff, voice) using distinct environment variables. This prevents a failure in one subsystem's provider from cascading to another. The PROVIDER_ENV constant (JCODE_MEMORY_JEV_PROVIDER), BROWSER_PROVIDER_ENV (JCODE_BROWSER_JEV_PROVIDER), and VOICE_PROVIDER_ENV (JCODE_VOICE_JEV_PROVIDER) allow independent provider configuration. There is no cross-account fallback: if the configured provider fails, the operation fails rather than silently falling back to a different provider.

Usage

Use this heuristic when configuring Jev providers for different subsystems. Set the appropriate environment variable to pin each subsystem to its own provider. This prevents cross-account fallback and ensures failures are contained.

The Insight (Rule of Thumb)

  • Action: Set JCODE_MEMORY_JEV_PROVIDER, JCODE_BROWSER_JEV_PROVIDER, and JCODE_VOICE_JEV_PROVIDER independently.
  • Value: Each subsystem uses its own provider; no automatic fallback on failure.
  • Trade-off: A provider failure in one subsystem cannot be masked by falling back to another; the failure is explicit.
  • Compatibility: All Jev consumers (memory, browser, voice) support separate provider configuration.

Reasoning

If all subsystems shared a single Jev provider, a provider outage would simultaneously break memory recall, browser handoff, and voice. Worse, automatic fallback to a different provider could silently use a different account, violating credential isolation. By separating providers per subsystem and failing closed (no fallback), failures are contained and explicit.

Code Evidence

Per-subsystem provider environment variables from crates/jcode-base/src/jev.rs:12-14:

const PROVIDER_ENV: &str = "JCODE_MEMORY_JEV_PROVIDER";
const BROWSER_PROVIDER_ENV: &str = "JCODE_BROWSER_JEV_PROVIDER";
const VOICE_PROVIDER_ENV: &str = "JCODE_VOICE_JEV_PROVIDER";

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment