Skip to content

fix: remove root version marker dependency from offline update flow#270

Merged
code-JDS merged 3 commits intoScience-Discovery:devfrom
lixfrank:fix/remove-root-version-marker
Apr 12, 2026
Merged

fix: remove root version marker dependency from offline update flow#270
code-JDS merged 3 commits intoScience-Discovery:devfrom
lixfrank:fix/remove-root-version-marker

Conversation

@lixfrank
Copy link
Copy Markdown
Collaborator

Issue for this PR

Closes #269

Type of change

  • Bug fix
  • Refactor / code improvement
  • New feature
  • Documentation

What does this PR do?

This removes the offline installer/update flow's dependency on the root .aether_web_version marker.

Instead of reading the root marker to decide which version is installed or active, the scripts now resolve versions from the installed package directories themselves. For darwin and linux, the update launchers, installer checks, and version pruning logic now derive versions from each aether_<version> directory and its package-local marker. For windows, the installer and updater now do the same when checking installed versions, active versions, and retained versions.

The root .aether_web_version file is no longer written as part of the update flow. Existing stale copies are removed during install/update so version selection depends only on the package directories, which are the actual source of truth.

How did you verify your code works?

  • Ran bash -n Update/update_darwin.command
  • Ran bash -n Update/aether_darwin_installer.command
  • Ran bash -n Update/aether_darwin_installer_devtest.command
  • Ran bash -n Update/update_linux.sh
  • Ran bash -n Update/aether_linux_installer.sh
  • Ran bash -n Update/aether_linux_installer_devtest.sh
  • Ran a local mock darwin update flow and confirmed a deliberately wrong root .aether_web_version value did not affect the installed or launched version
  • Reviewed the corresponding windows installer/update logic changes for root marker removal

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@code-JDS
Copy link
Copy Markdown
Collaborator

/oc review

@github-actions
Copy link
Copy Markdown
Contributor

This PR removes the root .aether_web_version marker dependency from the offline installer/update flow, shifting version resolution to per-directory markers and directory-name parsing. The approach is sound and consistent across platforms, but there is one bug.

  • Bug — update_windows.bat :active_dir fallback loop uses stale $env:DIR (medium severity). In the for /d %%i fallback block inside :active_dir, the inner PowerShell command references $env:DIR, but DIR is never set to %%i within the loop. It will either be empty or carry a stale value from a prior :installed call. This means the fallback cannot correctly resolve versions from directories lacking a per-directory .aether_web_version marker. A set "DIR=%%~fi" needs to be added before the inner for /f, and since the loop body is parenthesized, delayed expansion (set "DIR=%%~fi" before the for /f, or restructure to avoid the scoping issue) will be required to propagate it into the PowerShell invocation.

Copy link
Copy Markdown
Collaborator

@code-JDS code-JDS left a comment

Choose a reason for hiding this comment

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

请复核opencode review提出的问题是否确实存在

Xiang Li added 3 commits April 11, 2026 23:17
Stop relying on the root .aether_web_version marker in linux and windows installer/update flows. Resolve installed versions from versioned package directories instead, and keep only per-version markers inside each installed package directory.
Resolve installed darwin versions from versioned package directories and per-package markers instead of the redundant root .aether_web_version file. Remove the root marker after updates so launcher and installer logic rely only on package-local version information.
Drop the redundant :active_dir fallback loop in update_windows.bat so version resolution no longer depends on an unset or stale DIR environment variable inside the inner PowerShell invocation.
@lixfrank lixfrank force-pushed the fix/remove-root-version-marker branch from 7a15f34 to e26c342 Compare April 12, 2026 06:26
@code-JDS code-JDS dismissed their stale review April 12, 2026 09:11

This PR has been corrected.

@code-JDS code-JDS merged commit bf2b46e into Science-Discovery:dev Apr 12, 2026
11 checks passed
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.

[BUG]: offline update flow depends on redundant root .aether_web_version marker

3 participants