diff --git a/CHANGELOG.md b/CHANGELOG.md index 789bfcc..8376396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Please choose versions by [Semantic Versioning](http://semver.org/). * MINOR version when you add functionality in a backwards-compatible manner, and * PATCH version when you make backwards-compatible bug fixes. +## Unreleased + +- fix: `scripts/session-self-exit.py` lets a session that was handed off from a task exit. When `claude_session_id` has moved to another session, the task is resolved through its `metrics_sessions` instead, and that branch skips the terminal check — its own work is already on the record. The pane-ownership and open-card guards still refuse. + ## v0.175.0 - feat: `vault-cli goal set` and `topic set` accept the full canonical task phase set (`todo`, `planning`, `execution`, `ai_review`, `human_review`, `done`), and an invalid phase now exits non-zero with the validator's message listing the accepted values, rendered from the enum collection so the list cannot drift. `in_progress` stays a task-only alias and is still rejected. diff --git a/scripts/session-self-exit-test.sh b/scripts/session-self-exit-test.sh index 68c1767..b6683d5 100644 --- a/scripts/session-self-exit-test.sh +++ b/scripts/session-self-exit-test.sh @@ -45,6 +45,43 @@ task() { # task } > "$TASKS/Anchor.md" } +handed_off_task() { # handed_off_task + local status=$1 phase=$2 owner=$3 + { + echo "---" + echo "status: $status" + echo "phase: $phase" + echo "claude_session_id: $owner" + echo "metrics_sessions:" + echo " - session_id: $SID" + echo " started_at: \"2026-10-20T11:51:47.321573+02:00\"" + echo " - session_id: $owner" + echo " started_at: \"2026-10-20T11:52:00.000000+02:00\"" + echo "---" + echo "" + echo "# Tasks" + echo "" + echo "- [ ] open" + } > "$TASKS/Anchor.md" +} + +other_owner_task() { # other_owner_task — no handoff record for $SID + { + echo "---" + echo "status: in_progress" + echo "phase: execution" + echo "claude_session_id: $1" + echo "metrics_sessions:" + echo " - session_id: $1" + echo " started_at: \"2026-10-20T11:52:00.000000+02:00\"" + echo "---" + echo "" + echo "# Tasks" + echo "" + echo "- [ ] open" + } > "$TASKS/Anchor.md" +} + cards() { # cards printf '%s' "$1" > "$TMP/store/api/1.0/attention" } @@ -68,6 +105,22 @@ run() { # run