mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #3809] [Track]: Mooncake Store Configuration and Environment Convergence #973
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#973
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bitborne on GitHub (Sep 1, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/3809
Mooncake Store currently reads configuration from environment variables, config files, and CLI flags through several different paths. Environment-variable names, parsing, validation, and business logic are often mixed together, which makes behavior difficult to review and new settings easy to implement inconsistently.
This issue tracks staged convergence of those paths. Master-specific design remains aligned with #2694.
Overall status
Last updated: 2026-09-24
main.The next Phase 1 gate is to merge the six open owner PRs and repeat the production-read inventory against the resulting
main: every remaining direct environment read must have an explicit owner and lifecycle classification or be recorded as an intentional exception. Submitted PR coverage is not the same as satisfying the completion criteria below.Goals
getenvcurrently appears.FromEnvironment()during component initialization, then pass the resolved config to business logic.Current scope and review rules
The following rules govern the environment-convergence PRs. Earlier merged pilots may predate part of this layout and should be included in the final audit.
mooncake-common, grouped by owning configuration. Use the existingMC_DEFINE_ENV_VARmacro so the C++ name and environment-variable string stay identical.EnvironmentVariable<T>selects the shared parser forT; keep a definition string-typed and use a custom parser only when needed to preserve an existing acceptance surface or diagnostic behavior, and document the exception next to the definition or loader.mooncake-store/src/config; choose a private or public header according to the actual API boundary.business component -> config. A config implementation must not depend on the business component that consumes it.std::chronodurations, and perform environment-unit conversion explicitly in the loader.Where applicable, behavior-preservation tests should cover unset, explicitly empty, valid, invalid, boundary/overflow, whitespace/trailing-character, alias precedence, and diagnostic behavior. Tests that modify the process environment must restore the previous value rather than assuming it was unset.
The following are not authorized by the environment-only phase: changing public environment-variable names or defaults; changing config-file, environment, or CLI precedence; adding hot reload; redesigning the public structured config format; or mechanically migrating test-/benchmark-only variables without a production owner.
Progress
These are delivery statuses, not an overall completion percentage. #3408 and #3823 cover the same owner; #3957 is a supporting layout alignment.
The old #3850/#3853 CI-blocker note is resolved: both PRs have merged. #4256 covers DFS enablement, Master metadata, Store cluster identity, and NVMe KV executor settings without duplicating the five other open owner PRs. It identifies external accelerator contracts, Master bootstrap/Kubernetes paths, and test/failpoint/stub-only controls as remaining direct-read categories to classify during the final audit.
Remaining work and phase boundaries
mainagainst the Phase 1 completion criteria, including owner boundaries, first-use/late-read behavior, diagnostics, and focused tests. Do not declare Phase 1 complete merely because the PRs were opened.Late reads are exceptions, not a general hot-reload mechanism. They may remain when existing behavior intentionally observes the environment at the point of use, for example a debug/test failpoint or an external-library contract. Each exception should be explicit and tested rather than hidden among startup-only reads.
Later-phase design checklist
Structured configuration
CLI convergence
Phase 1 completion criteria
The environment phase is complete when every production Store environment read has an explicit owner and lifecycle classification, and is either:
Each migrated path must preserve existing behavior and have focused tests. A migration should not add a new wrapper, parser, or public API unless the existing shared abstraction cannot express the required behavior. Completion of the environment phase does not imply that config-file or CLI convergence is complete.
Related work
Before submitting a new issue...
@github-actions[bot] commented on GitHub (Sep 1, 2026):
Thanks for opening this issue, @bitborne!
177341921A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide