Skip to content

[Feature & Refactor] Layout Migration, Cache Indexing, and Security Hardening#17

Merged
wangxingjun778 merged 8 commits into
mainfrom
feat/core_loop
Jul 15, 2026
Merged

[Feature & Refactor] Layout Migration, Cache Indexing, and Security Hardening#17
wangxingjun778 merged 8 commits into
mainfrom
feat/core_loop

Conversation

@wangxingjun778

@wangxingjun778 wangxingjun778 commented Jul 15, 2026

Copy link
Copy Markdown
Member

Core System Architecture & Layouts

  • Layered Configuration Migration: Transitioned from legacy flat .env files to a structured, multi-layered YAML configuration.
  • Structured Layout Classes: Introduced dedicated layout managers for system separation:
  • PathLayout (directory structures)
  • ProfileLayout (user profiles)
  • CacheLayout (cache management)

Secret & Cache Management

  • FernetSecretVault: Unified secret storage using secure, symmetric encryption and dynamic secret:// URI references.
  • DuckDB-Indexed CacheManager: Introduced a relational-indexed cache management system powered by DuckDB.

Control Plane

  • Leap Config Control Plane: Developed a new unified CLI/TUI interface (leap config) for managing system layouts, secrets, and configurations.

Performance & Robustness Enhancements

  • Batched Cache Operations: Optimized the CacheManager with batched DuckDB writes to reduce I/O bottlenecks.
  • Atomic File Writes: Implemented atomic write operations for YAML layouts and secret vaults to prevent file corruption during system crashes.
  • Read-Only Environment Resilience: Added structured OSError handling to support execution in read-only and serverless environments.
  • Backward Compatibility: Maintained full fallback support for legacy flat .env credentials.
  • Session Safety: Added strict workspace ID validation during session cache registration.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors LeapFlow's configuration, secrets, and cache management systems, transitioning from legacy flat .env files to a structured, layered YAML layout managed by PathLayout, ProfileLayout, and CacheLayout. It introduces a DuckDB-indexed CacheManager, a unified FernetSecretVault utilizing secret:// references, and a robust leap config CLI/TUI control plane. Feedback focuses on improving performance and robustness, specifically by batching DuckDB operations in the cache manager, implementing atomic file writes for secrets and layouts, handling OSError in read-only environments, ensuring backward compatibility for legacy credentials, and validating workspace IDs during session cache registration.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/leapflow/cache/manager.py
Comment thread src/leapflow/security/secrets.py Outdated
Comment thread src/leapflow/config.py Outdated
Comment thread src/leapflow/gateway/credential_vault.py
Comment thread src/leapflow/cache/manager.py
Comment thread src/leapflow/perception/video/recorder.py Outdated
Comment thread src/leapflow/layout.py Outdated
@wangxingjun778 wangxingjun778 changed the title Feat/core loop [Feature & Refactor] Layout Migration, Cache Indexing, and Security Hardening Jul 15, 2026
@wangxingjun778 wangxingjun778 merged commit 1f4828e into main Jul 15, 2026
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.

1 participant