Skip to content

fix: say why runtime lock acquire refuses an absent store - #441

Merged
kappaseijin4claude merged 3 commits into
mainfrom
fix/issue-424-runtime-lock-db-missing
Sep 13, 2026
Merged

fix: say why runtime lock acquire refuses an absent store#441
kappaseijin4claude merged 3 commits into
mainfrom
fix/issue-424-runtime-lock-db-missing

Conversation

@kappaseijin4claude

Copy link
Copy Markdown
Collaborator

概要

Issue #424: agmsg_runtime_lock_acquireがruntime DB不在時に無音でreturn 1していた問題を修正。

Closes #424、Refs #407

実装

agmsg_runtime_lock_acquireのDB不在分岐のみ変更。returnの直前にstderrへ1行出力する。

agmsg_runtime_lock_acquire: runtime db missing: <dbパス>

戻り値は1のまま。stdoutには何も出さない。他の関数(owner/verify/release)とDBがある場合の経路は変更していない。

呼び出し元への影響確認

scripts/lib/actas-lock.shは試行ごとのstderr生テキストを_actas_lock_gate_classify_errorで分類し再試行を判断する。新しい行はunknownに分類され、修正前の空文字列もunknownだったため再試行判断は変わらない。対照としてError: database is lockedを与えるとtransientを返すことを確認し、分類そのものが機能していることを確認した。codex-bridge-launcher.sh2>/dev/nullで呼んでいるため影響なし。

受入条件

条件 結果
DB不在で呼ぶ→stderrに理由が1行、rc=1のまま 新規試験PASS。rc=1、stdout空、stderrはdbパスを含む文言と完全一致。DBは作られない
DB在りの挙動は変わらない test_storage.bats 36/36、test_actas_lock.bats 41/41、test_actas_integration.bats 20/20 全PASS

変異試験

追加したprintfを削除→KILLED(FAIL)。main修正前の実装に新試験を当てると無音の失敗を再現(FAIL)。DB在りのケースはいずれもpass。

README への影響

無。

🤖 Generated with Claude Code

https://claude.ai/code/session_01QCtgi8wVJDRaMwXHZmkHqT

kappaseijin and others added 3 commits September 13, 2026 12:38
agmsg_runtime_lock_acquire returned 1 without a word when the runtime db
was missing. Print one stderr line with the db path before returning; the
status stays 1. The line avoids the words actas-lock.sh classifies as
transient, so its retry decision is unchanged (both classify as unknown).

Closes #424
Refs #407

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XTcYRimavoero895uewFR6
@kappaseijin4claude
kappaseijin4claude merged commit 84bc134 into main Sep 13, 2026
47 of 49 checks passed
@kappaseijin4claude
kappaseijin4claude deleted the fix/issue-424-runtime-lock-db-missing branch September 13, 2026 05:55
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.

agmsg_runtime_lock_acquireがDB不在時に無音でreturn 1する

2 participants