From b22a3d550671c9f6c4381f084a5f47784edbe130 Mon Sep 17 00:00:00 2001 From: Yuan <20144414+baskduf@users.noreply.github.com> Date: Thu, 18 Jun 2026 21:27:53 +0900 Subject: [PATCH] fix: clarify update release checkout output --- CHANGELOG.md | 6 ++++++ README.ja.md | 4 ++-- README.ko.md | 4 ++-- README.md | 4 ++-- README.zh-CN.md | 4 ++-- README.zh-TW.md | 4 ++-- plugins/codex-fable5/.codex-plugin/plugin.json | 2 +- plugins/codex-fable5/bin/codex-fable5 | 8 ++++++++ tests/test_ci_release.py | 6 ++++++ 9 files changed, 31 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46e2b61..34ae3bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ This project uses a lightweight changelog format: - `Fixed` for bug fixes. - `Security` for vulnerability-related changes. +## 0.5.1 - 2026-06-18 + +### Fixed + +- Clarified `codex-fable5 update` output by showing the target ref, warning when release-tag checkout may detach HEAD, and printing post-update version details. + ## 0.5.0 - 2026-06-18 ### Added diff --git a/README.ja.md b/README.ja.md index 6f0d81a..de420ed 100644 --- a/README.ja.md +++ b/README.ja.md @@ -40,7 +40,7 @@ FableCodex は、Codex の作業に Fable 風の運用習慣を追加する Code 安定版をインストールします。 ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` @@ -219,7 +219,7 @@ plugins/codex-fable5/bin/codex-fable5 status 安定版: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` diff --git a/README.ko.md b/README.ko.md index aa5d8d2..97ceff1 100644 --- a/README.ko.md +++ b/README.ko.md @@ -40,7 +40,7 @@ FableCodex는 Codex 작업에 Fable식 운영 습관을 더하는 Codex 플러 안정 버전을 설치합니다. ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` @@ -219,7 +219,7 @@ plugins/codex-fable5/bin/codex-fable5 status 안정 버전: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` diff --git a/README.md b/README.md index a9d15d0..bbf6ad3 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ It is useful when the cost of a missed step is higher than the cost of a little Install the stable release: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` @@ -219,7 +219,7 @@ plugins/codex-fable5/bin/codex-fable5 status Stable release: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index 013cc92..5acf758 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -40,7 +40,7 @@ FableCodex 是一个 Codex 插件,用来把 Fable 风格的工作习惯加入 安装稳定版: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` @@ -219,7 +219,7 @@ plugins/codex-fable5/bin/codex-fable5 status 稳定版: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` diff --git a/README.zh-TW.md b/README.zh-TW.md index 1bed671..83325a2 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -40,7 +40,7 @@ FableCodex 是一個 Codex 外掛,會把 Fable 風格的工作習慣加入 Cod 安裝穩定版: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` @@ -219,7 +219,7 @@ plugins/codex-fable5/bin/codex-fable5 status 穩定版: ```bash -codex plugin marketplace add baskduf/FableCodex --ref v0.5.0 +codex plugin marketplace add baskduf/FableCodex --ref v0.5.1 codex plugin add codex-fable5@fablecodex ``` diff --git a/plugins/codex-fable5/.codex-plugin/plugin.json b/plugins/codex-fable5/.codex-plugin/plugin.json index 8460e2c..e90cc74 100644 --- a/plugins/codex-fable5/.codex-plugin/plugin.json +++ b/plugins/codex-fable5/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "codex-fable5", - "version": "0.5.0", + "version": "0.5.1", "description": "Fable-style Codex workflow with source-section coverage, goal and findings gates, verification grounding, VFF routing, and optional provider bridge guidance.", "author": { "name": "Codex Fable5 Maintainers" diff --git a/plugins/codex-fable5/bin/codex-fable5 b/plugins/codex-fable5/bin/codex-fable5 index b371ab7..04da8d8 100755 --- a/plugins/codex-fable5/bin/codex-fable5 +++ b/plugins/codex-fable5/bin/codex-fable5 @@ -128,6 +128,7 @@ cmd_update() { fi if [ "$ref" = "main" ]; then + printf 'codex-fable5: target ref %s\n' "$ref" current_ref=$(git -C "$REPO_ROOT" rev-parse --abbrev-ref HEAD) if [ "$current_ref" != "main" ]; then git -C "$REPO_ROOT" checkout main @@ -141,6 +142,11 @@ cmd_update() { fi current_commit=$(git -C "$REPO_ROOT" rev-parse HEAD) target_commit=$(git -C "$REPO_ROOT" rev-parse "$ref^{commit}") + target_short=$(git -C "$REPO_ROOT" rev-parse --short "$ref^{commit}") + printf 'codex-fable5: target ref %s (%s)\n' "$ref" "$target_short" + if printf '%s\n' "$ref" | grep -Eq '^v[0-9]+(\.[0-9]+)*$'; then + printf '%s\n' "codex-fable5: checking out a release tag may leave this git checkout in detached HEAD state." + fi if [ "$current_commit" = "$target_commit" ]; then printf 'codex-fable5: already up to date at %s\n' "$ref" else @@ -149,6 +155,8 @@ cmd_update() { fi fi + printf '%s\n' "codex-fable5: post-update version:" + cmd_version printf '%s\n' "codex-fable5: restart Codex to reload the plugin." } diff --git a/tests/test_ci_release.py b/tests/test_ci_release.py index d2f38c8..f1c7f33 100644 --- a/tests/test_ci_release.py +++ b/tests/test_ci_release.py @@ -285,6 +285,9 @@ def test_update_command_updates_clean_checkout_to_requested_ref(self) -> None: ) self.assertEqual(update.returncode, 0, update.stderr) self.assertIn("updates the FableCodex checkout/plugin package only", update.stdout) + self.assertIn("target ref v0.4.4", update.stdout) + self.assertIn("detached HEAD", update.stdout) + self.assertIn("post-update version", update.stdout) self.assertIn("restart Codex", update.stdout) head = subprocess.run( @@ -374,6 +377,9 @@ def test_update_default_ignores_prerelease_tags(self) -> None: check=False, ) self.assertEqual(update.returncode, 0, update.stderr) + self.assertIn("target ref v1.0.0", update.stdout) + self.assertIn("detached HEAD", update.stdout) + self.assertIn("post-update version", update.stdout) self.assertIn("updated to v1.0.0", update.stdout) head = subprocess.run(