Skip to content

feat(update): show an install-origin-aware update command in the notice#140

Merged
lex0c merged 1 commit into
developfrom
feat/forja-update
Jul 12, 2026
Merged

feat(update): show an install-origin-aware update command in the notice#140
lex0c merged 1 commit into
developfrom
feat/forja-update

Conversation

@lex0c

@lex0c lex0c commented Jul 12, 2026

Copy link
Copy Markdown
Owner

The passive "update available" notice pointed at a bare releases URL. Replace it with a copy-pasteable update command chosen by how the binary was installed, so the hint is directly actionable and the operator keeps running the verified channel themselves (no in-place self-update — forja update stays a deferred design-target):

  • npm installs (binary under node_modules/@lex0c/) hand off to the package manager, pinned to the announced version (npm i -g @lex0c/forja@).
  • standalone installs re-run install.sh, carrying --prefix so a custom prefix is replaced in place, not duplicated at ~/.local/bin.
  • stock Windows (no POSIX sh) falls back to the releases page URL.

The GitHub /releases/latest response stays untrusted: only the semver-validated version is response-derived; the command/URL is a build-time constant, never the tag_name. Notice remains cache-first, fail-silent, REPL-only, off in CI/--json, and once-per-release.

Spec aligned (SECURITY_GUIDELINE 11.4, UI 4.10.9); 11.1-11.3 untouched.

The passive "update available" notice pointed at a bare releases URL. Replace it
with a copy-pasteable update command chosen by how the binary was installed, so
the hint is directly actionable and the operator keeps running the verified
channel themselves (no in-place self-update — forja update stays a deferred
design-target):

- npm installs (binary under node_modules/@lex0c/) hand off to the package
  manager, pinned to the announced version (npm i -g @lex0c/forja@<version>).
- standalone installs re-run install.sh, carrying --prefix <dir> so a custom
  prefix is replaced in place, not duplicated at ~/.local/bin.
- stock Windows (no POSIX sh) falls back to the releases page URL.

The GitHub /releases/latest response stays untrusted: only the semver-validated
version is response-derived; the command/URL is a build-time constant, never the
tag_name. Notice remains cache-first, fail-silent, REPL-only, off in CI/--json,
and once-per-release.

Spec aligned (SECURITY_GUIDELINE 11.4, UI 4.10.9); 11.1-11.3 untouched.
@lex0c

lex0c commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: a8d7eba05f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lex0c
lex0c merged commit 8ea6b1f into develop Jul 12, 2026
3 checks passed
@lex0c
lex0c deleted the feat/forja-update branch July 12, 2026 21:16
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.

1 participant