feat(anolisa): add scoped status view#1414
Merged
Merged
Conversation
kongche-jbw
reviewed
Jul 9, 2026
kongche-jbw
left a comment
Collaborator
There was a problem hiding this comment.
发现一个 scoped catalog 问题,见行内评论。
Expose scoped status through StateView so user mode can report the current user's records and readable system-scope records without merging their physical write targets. Each visible root keeps its own FsLayout and manifest catalog. Status uses the record's root when running integrity and manifest health probes, so system records are checked against system paths and system overlays. Keep mutation semantics unchanged. Status only reports visibility; state writes and receipts still belong to the current install mode's physical state. Doctor remains a follow-up for full scoped view adoption. Concrete system-root catalog loads ignore ANOLISA_DATA_DIR and exe-sibling discovery, so user-mode status cannot let user-controlled catalogs influence system-scope health results. Tests cover user-visible system records, shadowing, system-only projection, scope metadata, root-specific catalog selection, system-catalog env override protection, and RPM drift adjudication. Assisted-by: Codex:0.143.0 Signed-off-by: 爱鲲 <jiawa.syx@alibaba-inc.com>
7ff8fc4 to
527cd88
Compare
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.
Description
Expose scoped installed-state records in
anolisa statusso a user-modeinvocation can report components installed in the current user's state and
readable system-scope state without merging their physical write targets.
Status now loads through
StateViewwithUserPlusSystemvisibility. Eachvisible root keeps its own
FsLayout, so health and integrity probes evaluatesystem records against system paths and user records against user paths.
Manifest catalogs are also loaded per visible root. System-scope records use
the system root catalog and overlays, while concrete system-root catalog loads
ignore user-controlled
ANOLISA_DATA_DIRand executable-sibling discovery.Status JSON and human output now include scope metadata for each record:
scopeactivemutable_by_current_invocationshadowed_bystate_pathThis preserves mutation semantics: status only reports visibility. Receipts and
other writes still belong to the current install mode's physical state. Doctor
keeps using current-scope metadata and remains a follow-up PR for full scoped
view adoption.
Related Issue
N/A
Ship Note
anolisa status --install-mode usercan now surface readable system-scopeinstall records alongside user-scope records. Output marks which record is
active, whether it is mutable by the current invocation, whether it is shadowed,
and which
installed.tomlfile owns it.Type of Change
Scope
anolisa(anolisa-cli)anolisa-coreTesting
cargo fmt --all -- --checkcargo checkcargo test -p anolisa-cli(429 tests)cargo clippy --workspace --all-targets --locked -- -D warningscargo doc --no-depscargo build -p anolisa-cligit diff --checkon the scoped status changesrecords
ANOLISA_DATA_DIRdoes not influence system-scope catalogselection
Alinux 4: