Skip to content

refactor(architecture): retire resolved deslop baseline findings - #36

Open
xinvxueyuan wants to merge 1 commit into
mainfrom
chore-pr-23-forgiveness
Open

xinvxueyuan wants to merge 1 commit into
mainfrom
chore-pr-23-forgiveness

Conversation

@xinvxueyuan

@xinvxueyuan xinvxueyuan commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Reduce the architecture allowlist from 18 entries to seven without adding any exemptions or relaxing the gate. Instance installation and launch continue to use the same desktop services.

Motivation

PR #23 allowed pre-existing deslop-please findings so new violations would still fail CI. Four entries no longer match any finding, and seven more can be removed by fixing their causes.

Changes

  • Launch and install: resolve inherited versions in chain and keep asset index objects and version catalog storage private.
  • Frontend: let the instance panel consume installation and launch tasks without the tasks depending on RootView. Preserve the launch job's game root for isolated instances and keep activity and loader catalog state with their owners.
  • Architecture: remove three module-cycle entries, four resolved field-leak entries, and four stale Library field-leak entries. The remaining frontend tangle is smaller; five shallow modules and one wide directory remain out of scope.

Testing

Passed locally on Windows:

pnpm architecture
cargo fmt --all --check
node scripts/desktop.ts exec cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
node scripts/desktop.ts exec cargo nextest run --workspace --locked
cargo shear
cargo deny check
typos
tombi format --check
tombi lint
reuse lint
prek run --all-files --stage pre-commit
pnpm test:scripts

Nextest: 539 passed, seven skipped. A scan without the allowlist reported exactly the seven retained findings. No manual desktop session or local Linux build was run; GitHub Actions covers the Linux architecture gate.

Breaking Changes

None for launcher users. Within the workspace, use chain::load_resolved in place of version::load_resolved and MinecraftCatalog::entries() in place of versions(). Asset index maps are no longer directly accessible; construct an index from its document with AssetIndexDocument::parse. All in-tree callers are migrated. No data migration is required.

Related

Refs #23

Sourcery 总结

清理已解决的架构基线问题,同时保留启动器行为并减少模块间耦合。

错误修复:

  • 跟踪安装和启动进度时保留正确的游戏根目录,包括隔离实例。
  • 在安装检查和 MMC 转换过程中,通过启动链解析继承的版本数据。

功能增强:

  • 加强资源索引和目录的封装,将任务观察逻辑移至所属实例面板,并将相关前端状态保留在其所属位置,以减少架构白名单问题。
  • 使用针对条目和已解析文档的专用 API,替代宽泛的资源和版本集合访问方式。
  • 重新组织实例和启动面板模块,同时保留现有的安装、启动和配置文件创建行为。

测试:

  • 更新受影响的测试,以适配迁移后的版本解析 API、已封装的目录与资源索引状态,以及重新组织后的前端模块。

杂项:

  • 移除已解决的架构基线豁免项,不放宽架构检查门槛。
Original summary in English

Summary by Sourcery

Retire resolved architecture baseline findings while preserving launcher behavior and reducing cross-module coupling.

Bug Fixes:

  • Preserve the correct game root when tracking installation and launch progress, including isolated instances.
  • Resolve inherited version data through the launch chain for installation checks and MMC conversion.

Enhancements:

  • Reduce architecture allowlist findings by tightening asset index and catalog encapsulation, moving task observation into the owning instances panel, and keeping related frontend state with its owners.
  • Replace broad asset and version collection access with focused APIs for entries and parsed documents.
  • Reorganize instance and launch panel modules while retaining existing installation, launch, and profile-creation behavior.

Tests:

  • Update affected tests for the relocated version-resolution API, encapsulated catalog and asset-index state, and reorganized frontend modules.

Chores:

  • Remove resolved architecture baseline exemptions without relaxing the architecture gate.

Resolve version inheritance from the chain module and let the instance panel
consume installation and launch tasks without those tasks depending on the
view. Keep catalog and asset state behind the types that own it.

Remove seven resolved architecture findings and four stale entries. Keep the
existing gate and narrow the remaining frontend tangle to its current members.

Link: #23
Assisted-by: OpenAI Codex CLI 0.172.0
Acted-By: 新v学员 <xinvxueyuan@yeah.net>
Signed-off-by: 新v学员 <xinvxueyuan@yeah.net>
@sourcery-ai

sourcery-ai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

审查者指南

数据结构

将资源索引对象和 Minecraft 目录存储设为私有,同时向调用方提供迭代和查找操作。

  • apps/core/install/src/assets.rs L36, L61-63, L71-77
  • apps/core/install/src/vanilla/catalog.rs L38-50, L75

将已解析版本的加载移至 chain 模块,因为继承解析由该模块负责。

  • apps/core/launch/src/chain.rs L122-132
  • apps/core/launch/src/version.rs L442(已删除的行)

API

让安装和启动入口返回任务状态,而不是将后台工作与根视图耦合。

  • apps/frontend/src/installations.rs L5-9, L43-48, L56-75(另有 2 处小改动)
  • apps/frontend/src/launches.rs L5-17, L47-52, L66-83(另有 1 处小改动)

API 的使用

更新安装检查、转换、目录使用方和资源处理逻辑,使其使用新的所属模块接口。

  • apps/core/install/src/assets.rs L214-215, L280, L305
  • apps/core/install/src/loader.rs L95
  • apps/frontend/src/panel/profile_creation.rs L334-337, L427-430(另有 3 处小改动)
  • tools/mmc-convert/src/main.rs L16, L68

实现

让活动状态负责活动内容的渲染和清除,同时由根视图委托渲染工作。

  • apps/frontend/src/panel/activity.rs L63-67, L96-103(另有 3 处小改动)

将实例行和启动模块移至 instances 面板下,并在面板根部集中处理检查失效和配置文件提交。

  • apps/frontend/src/panel/instances.rs L17-21, L104
  • apps/frontend/src/panel/actions.rs L10-16, L64-107, L224-270(另有 3 处小改动)
  • apps/frontend/src/instance_row.rs L17(已删除的行), L20
  • apps/frontend/src/panel/launch.rs L23-27(另有 3 处小改动)
  • apps/frontend/src/panel/mod.rs L192-219(另有 7 处小改动)
  • apps/frontend/src/lib.rs L24(已删除的行)

通过专用操作和通知公开加载器目录状态,并更新其视图,使其使用这些接口,而不是直接操作状态。

  • apps/frontend/src/panel/profile_creation.rs L69-74, L85-122
  • apps/frontend/src/panel/profile_creation/view.rs L120-125, L173-176(另有 4 处小改动)

配置

移除已解决和过时的架构允许名单条目,不添加豁免项。

  • .deslop-please.allow L3

测试

调整测试,使其适配私有资源存储以及新的目录和已解析版本接口,并将启动测试移至对应模块。

  • tests/apps/core/install/src/prepare.rs L94, L163, L222
  • tests/apps/core/install/src/vanilla.rs L82
  • tests/apps/core/launch/src/chain/document_tests.rs L66-151(6 处小改动)
  • tests/apps/frontend/src/panel/profile_creation.rs L5, L56-60

其他更改

未归入其他类别的文件。

  • apps/frontend/src/panel/accounts.rs L207
  • apps/frontend/src/panel/download_debug/sources.rs L16(已删除的行), L177
  • apps/frontend/src/panel/instances/launch/render.rs
  • tests/apps/frontend/src/panel/instances/launch.rs

提示和命令

与 Sourcery 互动

  • 触发新的审查: 在拉取请求中评论 @sourcery-ai review。
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 根据审查评论创建 GitHub issue: 回复审查评论,请 Sourcery 根据该评论创建 issue。你也可以回复审查评论并输入 @sourcery-ai issue 来创建 issue。
  • 生成拉取请求标题: 在拉取请求标题中的任意位置输入 @sourcery-ai,即可随时生成标题。你也可以在拉取请求中评论 @sourcery-ai title,随时(重新)生成标题。
  • 生成拉取请求摘要: 在拉取请求正文中的任意位置输入 @sourcery-ai summary,即可在你指定的位置随时生成 PR 摘要。你也可以在拉取请求中评论 @sourcery-ai summary,随时(重新)生成摘要。
  • 生成审查者指南: 在拉取请求中评论 @sourcery-ai guide,随时(重新)生成审查者指南。
  • 解决所有 Sourcery 评论: 在拉取请求中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已处理完所有评论且不想再看到它们,这会很有用。
  • 关闭所有 Sourcery 审查: 在拉取请求中评论 @sourcery-ai dismiss,即可关闭所有现有的 Sourcery 审查。如果你想从新的审查重新开始,这尤其有用——别忘了评论 @sourcery-ai review 来触发新的审查!

自定义使用体验

访问你的控制面板,以便:

  • 启用或停用审查功能,例如 Sourcery 生成的拉取请求摘要、审查者指南等。
  • 更改审查语言。
  • 添加、移除或编辑自定义审查说明。
  • 调整其他审查设置。

获取帮助

Original review guide in English

Reviewer's Guide

Data structures

Keep asset-index objects and Minecraft catalog storage private while exposing iteration and lookup operations for their callers.

  • apps/core/install/src/assets.rs L36, L61-63, L71-77
  • apps/core/install/src/vanilla/catalog.rs L38-50, L75

Move resolved version loading into the chain module, where inheritance resolution is owned.

  • apps/core/launch/src/chain.rs L122-132
  • apps/core/launch/src/version.rs L442 (removed lines)

API

Make installation and launch starters return task state instead of coupling background work to the root view.

  • apps/frontend/src/installations.rs L5-9, L43-48, L56-75 (+2 small edits)
  • apps/frontend/src/launches.rs L5-17, L47-52, L66-83 (+1 small edits)

Uses of the API

Update installation checks, conversion, catalog consumers, and asset handling to use the new owning-module interfaces.

  • apps/core/install/src/assets.rs L214-215, L280, L305
  • apps/core/install/src/loader.rs L95
  • apps/frontend/src/panel/profile_creation.rs L334-337, L427-430 (+3 small edits)
  • tools/mmc-convert/src/main.rs L16, L68

Implementation

Keep activity rendering and clearing within the activity state while the root view delegates rendering.

  • apps/frontend/src/panel/activity.rs L63-67, L96-103 (+3 small edits)

Move instance-row and launch modules under the instances panel and centralize inspection invalidation and profile submission in the panel root.

  • apps/frontend/src/panel/instances.rs L17-21, L104
  • apps/frontend/src/panel/actions.rs L10-16, L64-107, L224-270 (+3 small edits)
  • apps/frontend/src/instance_row.rs L17 (removed lines), L20
  • apps/frontend/src/panel/launch.rs L23-27 (+3 small edits)
  • apps/frontend/src/panel/mod.rs L192-219 (+7 small edits)
  • apps/frontend/src/lib.rs L24 (removed lines)

Expose loader catalog state through focused operations and notices, and update its view to consume those instead of manipulating status directly.

  • apps/frontend/src/panel/profile_creation.rs L69-74, L85-122
  • apps/frontend/src/panel/profile_creation/view.rs L120-125, L173-176 (+4 small edits)

Configuration

Remove resolved and stale architecture allowlist entries without adding exemptions.

  • .deslop-please.allow L3

Tests

Adapt tests to private asset storage and the new catalog and resolved-version interfaces, and relocate launch tests with their module.

  • tests/apps/core/install/src/prepare.rs L94, L163, L222
  • tests/apps/core/install/src/vanilla.rs L82
  • tests/apps/core/launch/src/chain/document_tests.rs L66-151 (6 small edits)
  • tests/apps/frontend/src/panel/profile_creation.rs L5, L56-60

Other changes

Files not grouped.

  • apps/frontend/src/panel/accounts.rs L207
  • apps/frontend/src/panel/download_debug/sources.rs L16 (removed lines), L177
  • apps/frontend/src/panel/instances/launch/render.rs
  • tests/apps/frontend/src/panel/instances/launch.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added module: frontend State, layout and window wiring module: install Installation planning and execution module: launch Launching, Java discovery, process lifecycle module: repository Build, tooling and CI version: 0.1.0 Version a report or pull request belongs to status: unreviewed No maintainer has reviewed this yet labels Nov 26, 2026
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Retire resolved architecture findings and decouple desktop tasks from the view

✨ Enhancement ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Reduce the architecture allowlist from 18 findings to seven without weakening the gate.
• Move install and launch presentation into the instance panel, breaking frontend dependency cycles.
• Encapsulate version, asset, and catalog state while preserving existing launcher behavior.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 4 capabilities

  • 4 affected capabilities span independent functional scopes: core_game_preparation, desktop_profile_management, profile_conversion.
  • The changed task creation, progress updates, completion state, profile refresh, and activity messages all serve one end-to-end profile installation operation.
  • The inspection state, invalidation triggers, version rendering, and command preview all support one bounded diagnostic capability for the selected profile.
  • Asset traversal, file checking, and inherited-version resolution determine whether a game installation or launch has the files and metadata it needs; these are related preparation behavior across core components.
  • MMC conversion is an independent user-facing tool outcome: it prepares and writes a converted profile rather than launching or installing through the desktop panel.
Behavioral complexity 🟡 Medium 🧩 Interacting branches

  • Before, one detached coordinator owned progress observation and task settlement.
  • After, start returns a job and a panel watcher owns the watch receiver, view updates, task await, and final state.
  • The new correctness condition is that channel closure, task completion, view lifetime, and profile refresh remain coordinated; existing installation stages and validation are unchanged.
  • Before: one root-level async coordinator.
  • After: a returned job crosses into a panel-owned watcher.
  • New correctness condition: progress and terminal outcome must remain paired with the correct game root, key, directory, and profile state.
Potential damage 🟡 Medium 🩹 Recoverable

  • If the changed observer regresses, installation may still run in the background but the row can remain stale or fail to present completion.
  • Reopening or retrying the installation can recover UI state; partially written files may require normal installer validation or redownload.
  • The assessment is conditional because no specific observer fault is established.
  • Code rollback restores the prior observation path; any already-written incomplete files require the installer’s normal validation and retry behavior.
Assessed commit 3dc4e55
Diagram

graph TD
  R["Instance row"] --> A["Panel actions"] --> I["Install job"] --> S["Desktop services"] --> C["Version chain"]
  A --> L["Launch task"] --> S
Loading
High-Level Assessment

Keep the job-handle approach: it breaks the view-to-task dependency cycle while retaining the existing desktop services and progress channels. A broader event-bus or service rewrite would add scope without a clear benefit for these targeted findings.

Files changed (26) +334 / -223

Refactor (20) +320 / -193
assets.rsKeep asset-index objects private +15/-9

Keep asset-index objects private

• Makes the asset map and object type private and routes internal iteration through an accessor. Public parsing remains available for constructing an index.

apps/core/install/src/assets.rs

loader.rsLoad inherited versions through the chain module +1/-1

Load inherited versions through the chain module

• Switches loader file checks to the chain-owned resolved-version API.

apps/core/install/src/loader.rs

catalog.rsExpose catalog entries without exposing version storage +14/-5

Expose catalog entries without exposing version storage

• Replaces the version-slice accessor with ordered ID/type entries and an emptiness check. Keeps manifest lookup within the catalog.

apps/core/install/src/vanilla/catalog.rs

chain.rsOwn resolved-version loading in the chain module +11/-0

Own resolved-version loading in the chain module

• Adds load_resolved beside inheritance resolution, removing the reverse dependency on the version module.

apps/core/launch/src/chain.rs

version.rsRemove version-module inheritance entry point +0/-11

Remove version-module inheritance entry point

• Removes load_resolved now that loading and resolving inherited documents are composed in chain.

apps/core/launch/src/version.rs

installations.rsReturn an observable installation job +27/-31

Return an observable installation job

• Starts installation work and returns its identity, paths, progress receiver, and result task. No longer updates RootView directly.

apps/frontend/src/installations.rs

launches.rsReturn an observable launch task +27/-44

Return an observable launch task

• Returns launch identity, game root, account and start notifications, and the result task. Removes direct RootView presentation logic.

apps/frontend/src/launches.rs

lib.rsRemove the top-level instance-row module +0/-1

Remove the top-level instance-row module

• Instance-row code is now registered under the instances panel rather than at the frontend root.

apps/frontend/src/lib.rs

accounts.rsCentralize inspection invalidation after account changes +1/-1

Centralize inspection invalidation after account changes

• Uses the panel's inspection-invalidation method when an account snapshot changes.

apps/frontend/src/panel/accounts.rs

activity.rsKeep activity entries behind ActivityLog +14/-12

Keep activity entries behind ActivityLog

• Moves activity-row construction into ActivityLog and keeps clearing internal to that type. RootView continues to render the resulting rows.

apps/frontend/src/panel/activity.rs

sources.rsInvalidate inspection through the panel API +1/-2

Invalidate inspection through the panel API

• Uses the shared invalidation method after a source setting is saved.

apps/frontend/src/panel/download_debug/sources.rs

instances.rsGroup instance actions, rows, and diagnostics +5/-3

Group instance actions, rows, and diagnostics

• Registers the related modules beneath instances and uses centralized inspection invalidation when selection changes.

apps/frontend/src/panel/instances.rs

actions.rsMake the panel observe installation and launch outcomes +96/-31

Make the panel observe installation and launch outcomes

• Moves progress, account synchronization, running-state updates, and completion handling from task modules into panel actions. Retains the launch job's game root when clearing completed installation state.

apps/frontend/src/panel/instances/actions.rs

instance_row.rsPlace instance-row rendering under its owning panel +1/-1

Place instance-row rendering under its owning panel

• Adjusts the RootView reference for the instance-row module's new location.

apps/frontend/src/panel/instances/instance_row.rs

launch.rsPlace launch inspection under instances +5/-5

Place launch inspection under instances

• Adjusts inspection visibility and references for its new module location, including the relocated test path.

apps/frontend/src/panel/instances/launch.rs

render.rsRelocate launch diagnostics rendering +0/-0

Relocate launch diagnostics rendering

• Moves the launch-inspection rendering module beneath instances; no content changes are shown.

apps/frontend/src/panel/instances/launch/render.rs

mod.rsCentralize panel-level inspection and profile submission +33/-7

Centralize panel-level inspection and profile submission

• Updates module wiring and adds a shared inspection-invalidation method. Moves profile creation submission to the panel root while retaining its existing behavior.

apps/frontend/src/panel/mod.rs

profile_creation.rsKeep loader catalog status with its owner +55/-15

Keep loader catalog status with its owner

• Adds status transitions and presentation queries to LoaderCatalog, and switches Minecraft choices to the catalog's entry iterator.

apps/frontend/src/panel/profile_creation.rs

view.rsRender loader state through catalog methods +12/-12

Render loader state through catalog methods

• Uses loader notices, placeholders, and readiness queries instead of reading catalog status directly. Calls the relocated profile-submission method.

apps/frontend/src/panel/profile_creation/view.rs

main.rsUse chain-owned version resolution in conversion +2/-2

Use chain-owned version resolution in conversion

• Migrates the converter to chain::load_resolved when preparing its effective base version.

tools/mmc-convert/src/main.rs

Tests (5) +13 / -18
prepare.rsAssert empty indexes without accessing their object maps +3/-3

Assert empty indexes without accessing their object maps

• Compares parsed empty indexes with the default document in three preparation tests.

tests/apps/core/install/src/prepare.rs

vanilla.rsVerify catalog ordering through its entry iterator +1/-5

Verify catalog ordering through its entry iterator

• Migrates the existing published-order and category assertion to MinecraftCatalog::entries.

tests/apps/core/install/src/vanilla.rs

document_tests.rsExercise resolution through the chain API +6/-7

Exercise resolution through the chain API

• Migrates inheritance, cycle, missing-parent, and jar-selection tests to chain::load_resolved.

tests/apps/core/launch/src/chain/document_tests.rs

launch.rsRelocate launch-inspection tests +0/-0

Relocate launch-inspection tests

• Moves the inspection invalidation test alongside the relocated instances launch module; no content changes are shown.

tests/apps/frontend/src/panel/instances/launch.rs

profile_creation.rsTest loader transitions through catalog methods +3/-3

Test loader transitions through catalog methods

• Updates the stale-response test to mark the loader catalog as loading through its method rather than changing status directly.

tests/apps/frontend/src/panel/profile_creation.rs

Other (1) +1 / -12
.deslop-please.allowNarrow the architecture baseline to seven findings +1/-12

Narrow the architecture baseline to seven findings

• Removes resolved module-cycle and field-leak suppressions, including stale Library entries. Updates the retained frontend tangle to its current members without adding exemptions.

.deslop-please.allow

@github-actions

Copy link
Copy Markdown

Impact analysis

Risk: Critical

26 files, 104 indexed symbols, 67 affected processes

Note

The changed-symbol list is capped. The counts and risk were computed over the full set.

5 per-symbol caller lookups could not resolve callers; confirm those symbols with a text search.

Changed symbols

Symbol Kind File
AssetIndexDocument Struct apps/core/install/src/assets.rs
objects Property apps/core/install/src/assets.rs
AssetObject Struct apps/core/install/src/assets.rs
hash Property apps/core/install/src/assets.rs
size Property apps/core/install/src/assets.rs
objects Function apps/core/install/src/assets.rs
missing_assets Function apps/core/install/src/assets.rs
materialise_flat_at Function apps/core/install/src/assets.rs
missing_flat_asset Function apps/core/install/src/assets.rs
check_files Function apps/core/install/src/loader.rs
MinecraftCatalog Impl apps/core/install/src/vanilla/catalog.rs
entries Function apps/core/install/src/vanilla/catalog.rs
is_empty Function apps/core/install/src/vanilla/catalog.rs
into_version Function apps/core/install/src/vanilla/catalog.rs
find_version Function apps/core/install/src/vanilla/catalog.rs
load_resolved Function apps/core/launch/src/chain.rs
start Function apps/frontend/src/installations.rs
InstallationJob Struct apps/frontend/src/installations.rs
key Property apps/frontend/src/installations.rs
directory Property apps/frontend/src/installations.rs
is_loader Property apps/frontend/src/installations.rs
paths Property apps/frontend/src/installations.rs
game_root Property apps/frontend/src/installations.rs
updates Property apps/frontend/src/installations.rs
task Property apps/frontend/src/installations.rs
start Function apps/frontend/src/launches.rs
LaunchTask Struct apps/frontend/src/launches.rs
game_root Property apps/frontend/src/launches.rs
directory Property apps/frontend/src/launches.rs
version Property apps/frontend/src/launches.rs

Affected processes

  • Start → New_worker (9 steps) — start
  • Start → Data_dir (8 steps) — start
  • Start → Root (8 steps) — start
  • Start → Uuid (7 steps) — start
  • Render_environment → Clear_password (7 steps) — apply_loaded
  • Render_environment → Sync_select (7 steps) — apply_loaded
  • Start → Downloader (6 steps) — start
  • Render_environment → Service (6 steps) — apply_loaded
  • Check_files → Index_error (5 steps) — check_files
  • Check_files → Assets (5 steps) — check_files
  • Check_files → Log_config (5 steps) — check_files
  • Check_files → Objects (5 steps) — check_files, missing_assets, objects
  • Start → Version_id (5 steps) — start
  • Render_environment → Update_paths (5 steps) — apply_loaded
  • Render_environment → Clear_feedback (5 steps) — apply_loaded
  • Finish_installation → Find (5 steps) — finish_installation
  • Main → Loader (5 steps) — convert
  • Install → Fetch_catalog (4 steps) — find_version
  • Finish_offline_form → Invalidate_inspection (4 steps) — invalidate_inspection, finish_account_change
  • Finish_installation → Find_previous (4 steps) — finish_installation

Upstream callers

Symbol Risk Direct callers Affected processes
missing_assets High 1 3
materialise_flat_at High 1 3
missing_flat_asset Low 1 2
entries Low 1 1
is_empty Low 1 1

Note

Upstream callers were traced for 10 symbols; 58 further eligible symbols were not queried.

Analyzed 28784b8f2127..3dc4e550c9db with gitnexus@1.6.12.

The draw.io mind map, Mermaid source and SVG preview are in the pr-impact artifact for this run.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Action required

1. Gate breaks on removed Library entries 📘 Rule violation ≡ Correctness
Description
The PR deletes four axlauncher_launch::version::Library field-leak entries from
.deslop-please.allow as stale, yet Library is unchanged and its fields are still read from the
modules those entries name. natives.rs, plan.rs, classpath.rs and rules.rs still access
downloads, natives, name and rules, so the architecture gate will report these leaks as new
findings.
Code

.deslop-please.allow[L11-14]

-field-leak axlauncher_launch::version::Library::downloads @ axlauncher_launch::natives,axlauncher_launch::plan
-field-leak axlauncher_launch::version::Library::name @ axlauncher_launch::classpath
-field-leak axlauncher_launch::version::Library::natives @ axlauncher_launch::natives
-field-leak axlauncher_launch::version::Library::rules @ axlauncher_launch::rules
+tangle axlauncher_frontend::panel::RootView,axlauncher_frontend::panel::accounts::AccountsPanel,axlauncher_frontend::panel::accounts::login::show_attempt,axlauncher_frontend::panel::accounts::render::account_row,axlauncher_frontend::panel::accounts::render::account_rows,axlauncher_frontend::panel::accounts::render::device_controls,axlauncher_frontend::panel::accounts::render::open_browser,axlauncher_frontend::panel::accounts::render::reauth_button,axlauncher_frontend::panel::accounts::render::reauthenticate,axlauncher_frontend::panel::accounts::render::temporary_button,axlauncher_frontend::panel::accounts::show_account_action,axlauncher_frontend::panel::accounts::show_offline_result,axlauncher_frontend::panel::accounts::third_party::Form,axlauncher_frontend::panel::accounts::third_party::profile_button,axlauncher_frontend::panel::accounts::third_party::show_result,axlauncher_frontend::panel::download_debug::DownloadDebug,axlauncher_frontend::panel::download_debug::batch::BatchDebug,axlauncher_frontend::panel::download_debug::sample_until_idle,axlauncher_frontend::panel::download_debug::sources::DownloadSources,axlauncher_frontend::panel::download_debug::sources::SourceField,axlauncher_frontend::panel::download_debug::sources::sync_select,axlauncher_frontend::panel::environment::EnvironmentState,axlauncher_frontend::panel::instances::instance_row::instance_actions,axlauncher_frontend::panel::instances::instance_row::launch_button,axlauncher_frontend::panel::instances::instance_row::row,axlauncher_frontend::panel::profile_creation::ProfileCreation,axlauncher_frontend::panel::profile_creation::complete_loader_request,axlauncher_frontend::panel::profile_creation::complete_minecraft_request,axlauncher_frontend::panel::profile_creation::view::retry_row
Evidence
The removed allowlist lines name access sites that still exist in the repository and that this PR
does not modify, so the findings they suppress are still live and the entries are not resolved.

AGENTS.md: Enforce architectural constraints and clear resolved baseline debt
.deslop-please.allow (removed entries for axlauncher_launch::version::Library downloads, name, natives, rules)
apps/core/launch/src/natives.rs[222-236]
apps/core/launch/src/plan.rs[406-410]
apps/core/launch/src/classpath.rs[103-107]
apps/core/launch/src/rules.rs[83-86]
apps/core/launch/src/version.rs[254-262]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR removes four `axlauncher_launch::version::Library` field-leak entries from `.deslop-please.allow`, but `Library` is unchanged and its fields are still read from the modules those entries name. The architecture gate will therefore report these as new findings.

## Fix Focus Areas
- .deslop-please.allow[11-14]
- apps/core/launch/src/version.rs[254-262]
- apps/core/launch/src/natives.rs[224-236]
- apps/core/launch/src/plan.rs[408]
- apps/core/launch/src/classpath.rs[105]
- apps/core/launch/src/rules.rs[85]

## Recommended Fix
Either restore the four `Library` field-leak lines in `.deslop-please.allow` exactly as they were, or fix the leaks at their cause by exposing narrow accessors on `Library` (for example `downloads()`, `name()`, `natives()`, `rules()`) and migrating the listed call sites to them. Only remove an allowlist entry after `pnpm architecture` passes without it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Placeholder text for version lists exists in two copies 🐞 Bug ⚙ Maintainability
Description
LoaderCatalog::placeholder re-implements the same CatalogStatus → "Loading versions…" / "No
versions available" / "Versions unavailable" mapping that the free placeholder function in
profile_creation/view.rs still provides for the Minecraft picker. If someone later changes the
wording or adds a status, the two pickers will drift apart unless both copies are updated.
Code

apps/frontend/src/panel/profile_creation.rs[R114-122]

+    fn placeholder(&self, idle: &'static str) -> SharedString {
+        match self.status {
+            CatalogStatus::Loading => "Loading versions…",
+            CatalogStatus::Empty => "No versions available",
+            CatalogStatus::Failed(_) => "Versions unavailable",
+            _ => idle,
+        }
+        .into()
+    }
Evidence
The new method in profile_creation.rs (lines 114-122) has the same match arms and strings as `fn
placeholder in view.rs (lines 188-196), and minecraft_input` still calls that free function.

apps/frontend/src/panel/profile_creation/view.rs[156-156]
apps/frontend/src/panel/profile_creation/view.rs[188-196]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`LoaderCatalog::placeholder` duplicates the free `placeholder(status, idle)` function in view.rs, so the Minecraft and loader pickers each keep their own copy of the same strings.

## Fix Focus Areas
- apps/frontend/src/panel/profile_creation.rs[114-122]
- apps/frontend/src/panel/profile_creation/view.rs[188-196]

## Recommended Fix
Put the mapping in one place, for example `impl CatalogStatus { fn placeholder(&self, idle) -> SharedString }` in profile_creation.rs. Have `LoaderCatalog::placeholder` delegate to it, and replace the free function in view.rs with a call to that method for `minecraft_status`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
❌ Tickets: failed to load — Ticket collection could not establish complete evidence
Review mode: Auto: 🧠 Deep: Broad runtime refactor spans installation, launching, frontend state, and architecture boundaries.

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@sourcery-ai sourcery-ai 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.

嘿——我发现了 1 个问题

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tests/apps/core/install/src/prepare.rs" line_range="163" />
<code_context>
     .expect("index");

-    assert!(index.objects.is_empty());
+    assert_eq!(index, AssetIndexDocument::default());
     let path = temp.0.join("assets/indexes/34.json");
     assert_eq!(fs::read(path).expect("written index"), body);
</code_context>
<issue_to_address>
**Cache test accepts an unread index**

When the cached index is empty and `ensure_asset_index` returns a default without reading the file, `an_index_already_on_disk_is_not_fetched_again` compares the result with the default at line 163, so an implementation that skips reading the cached file and returns a default passes despite not using the cache.

Seed a cached index with at least one object and assert that the returned document contains that object.
</issue_to_address>

Sourcery 评估

待批准。 请先处理 1 项发现。

阻塞性发现:tests/apps/core/install/src/prepare.rs:163


Sourcery 对开源项目免费——如果您喜欢我们的评审,欢迎分享 ✨
Original comment in English

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tests/apps/core/install/src/prepare.rs" line_range="163" />
<code_context>
     .expect("index");

-    assert!(index.objects.is_empty());
+    assert_eq!(index, AssetIndexDocument::default());
     let path = temp.0.join("assets/indexes/34.json");
     assert_eq!(fs::read(path).expect("written index"), body);
</code_context>
<issue_to_address>
**Cache test accepts an unread index**

When the cached index is empty and `ensure_asset_index` returns a default without reading the file, `an_index_already_on_disk_is_not_fetched_again` compares the result with the default at line 163, so an implementation that skips reading the cached file and returns a default passes despite not using the cache.

Seed a cached index with at least one object and assert that the returned document contains that object.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: tests/apps/core/install/src/prepare.rs:163


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

.expect("index");

assert!(index.objects.is_empty());
assert_eq!(index, AssetIndexDocument::default());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 中等 · 缓存测试接受未读取的索引

当缓存索引为空,并且 ensure_asset_index 未读取文件而直接返回默认值时,an_index_already_on_disk_is_not_fetched_again 会在第 163 行将结果与默认值进行比较。因此,即使实现跳过了读取缓存文件并返回默认值,没有使用缓存,也能通过测试。

请在缓存索引中预先写入至少一个对象,并断言返回的文档包含该对象。

给 AI 智能体的提示
在 `tests/apps/core/install/src/prepare.rs` 第 163 行:

**缓存测试接受未读取的索引**

当缓存索引为空,并且 `ensure_asset_index` 未读取文件而直接返回默认值时,`an_index_already_on_disk_is_not_fetched_again` 会在第 163 行将结果与默认值进行比较。因此,即使实现跳过了读取缓存文件并返回默认值,没有使用缓存,也能通过测试。

请在缓存索引中预先写入至少一个对象,并断言返回的文档包含该对象。
Original comment in English

🟡 Medium · Cache test accepts an unread index

When the cached index is empty and ensure_asset_index returns a default without reading the file, an_index_already_on_disk_is_not_fetched_again compares the result with the default at line 163, so an implementation that skips reading the cached file and returns a default passes despite not using the cache.

Seed a cached index with at least one object and assert that the returned document contains that object.

Prompt for AI agents
In `tests/apps/core/install/src/prepare.rs` at line 163:

**Cache test accepts an unread index**

When the cached index is empty and `ensure_asset_index` returns a default without reading the file, `an_index_already_on_disk_is_not_fetched_again` compares the result with the default at line 163, so an implementation that skips reading the cached file and returns a default passes despite not using the cache.

Seed a cached index with at least one object and assert that the returned document contains that object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: frontend State, layout and window wiring module: install Installation planning and execution module: launch Launching, Java discovery, process lifecycle module: repository Build, tooling and CI status: unreviewed No maintainer has reviewed this yet version: 0.1.0 Version a report or pull request belongs to

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant