ignission / ignission/claude-code-ark
context: 孤児セッションの後始末失敗が、引き継いだ最初のセッションを丸ごと無効化する
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- Avg merge
- 1h 31m
- Merged PRs (30d)
- 77
Description
不具合: 孤児セッションの後始末が、それを引き継いだ最初のセッションを無効化する
症状
前のセッションが owner マーカーを残したまま死に、その repo ディレクトリが
作り直された状態で session-init.sh を実行すると、
enabled 0 reason pending session finalization retry failed
となり、そのセッションは Manus 式の context が一切効かないまま最後まで進む。
実測(当初の見立てを訂正)
「3 回失敗するまで無効」ではない。同じパスで連続実行した結果:
| 試行 | 結果 |
|---|---|
| 1 | enabled 0 reason pending session finalization retry failed |
| 2 | enabled 1(正常に有効化) |
| 3 | enabled 0 reason another live session owns this repo(試行 2 が生存 owner。想定内) |
ctx_finalization_next_recovery_attempt のカウンタは進むため、無限には無効化されない。
犠牲になるのは孤児化後の最初の 1 セッションだけ。
なぜ実害か
- ユーザーには「context が無効になった」ことも「もう一度起動すれば直る」ことも伝わらない
- Ark 経由の起動では session-init は裏で走るため、無効化に気づく手段が無い
- 気づかないまま 1 セッション丸ごと、task.md も failures.md も無い素の状態で作業が進む
再現手順
- 任意の repo で ark/context セッションを張る
- そのプロセスを kill する(owner マーカーが残る)
- repo ディレクトリを削除して同じパスに作り直す
session-init.sh --repo <同じパス>を実行 → 1 回目が無効化される
対応案
- finalization の失敗をそのセッションの有効化とは切り離す。後始末は失敗しても、
新しいセッション自体は有効化してよい(後始末は次回に持ち越す) - 無効化を維持するなら、理由と復旧手段をユーザーに見せる
(「もう一度起動すれば有効になります」)
1 を推す。 後始末の失敗は新しいセッションの責任ではない。
発見の経緯
#367 の A/Z 対照実験で、削除済み実験 clone と同じパスに clone し直して A 群を起動したときに発生した。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at session-init.sh and trace the handling of ctx_finalization_next_recovery_attempt and the pending session finalization retry. Reproduce the orphan-owner sequence described in the issue, then verify that a cleanup failure no longer disables the first replacement session and that cleanup remains available for a later attempt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100