Repository navigation
feat: make first-run home selection and network recovery predictable - #824
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cold diagnostic and configuration queries could initialize the private registry and wait for downloads before reporting a network problem or accepting a mirror change. This separates configuration reads, local initialization and capability bootstrap. Environment/configuration queries, toolchain listing and doctor do not acquire tools.
self init --home <path>initializes and remembers the effective home through one locator under the original home. Original selection retainsMCPP_HOME, portable installation and user-directory precedence; only one hop is followed. Explicit--force --homepreserves both data trees. Bare--forceretains its existing reset semantics and names the target when redirected. Config and doctor report retained old data. The Windows-only first interactive initialization offers two choices, including an Enter default, with cancellation and no prompt for noninteractive, explicit or portable homes.Initialization probes actual provider resources before the first possible network operation. Doctor shares the same five-second discovery/probe budget and skips it offline. Downloads expose the actual source and candidate attempt, use an eight-second connect cap and thirty-second byte-idle protection, and retain the existing index and final-install budgets. Cancellation owns the child process tree; heartbeat output cannot renew byte progress, and a network failure is not repeated through another install frontend.
The pinned provider is xlings 2026.10.19.1 (openxlings/xlings#684). Metadata is read with a deadline in a temporary home and working directory. Status queries against custom older providers are skipped when the read-only guarantee is absent. Installed toolchains remain usable without acquiring a provider. The bilingual manual, machine-output reference, SPEC-010 and release notes describe these boundaries.
Closes #822.
Validation:
[ OK ]result. Logs: https://github.com/mcpp-community/mcpp/actions/runs/39214916663/job/117938043817737d2fcec2e145375f7a5b77f875f19983718c22. Main run 39214916663, ARM64 fresh install 39214916512 and Windows CRT 39214916640 all completed successfully.Final review: completed after all final-head CI checks passed; no blocking findings. Architecture, transaction/cancellation stability, simplicity, UX, compatibility/upgrade continuity, platform bindings and en/zh documentation were checked against the final implementation and logs. Explicit force-home preserves data; ordinary queries remain local; the provider owns all transport facts. Published-resource and ecosystem closure follow merge.
The separately reproduced header-import mapping defect (#816) and benchmark ratio assertion remain outside this feature. Their evidence and implementation boundaries are recorded in the design document; the temporary observation PR #823 is not merged.
Upstream prerequisites are complete: xlings#684 is merged and released, all 24 GitCode assets were downloaded and SHA256-verified, and xim-pkgindex#1002 is merged. Two separate installed clients resolved and downloaded both exact and latest xlings 2026.10.19.1 through the propagated official index. The mcpp bootstrap pin remains on its existing released version until post-release closure.