fix(#683): claw skills remove/add/uninstall/delete emits typed error, exit 1

- Add unsupported skills action guard in parse_args for remove/add/uninstall/delete
- Add unsupported_skills_action to classify_error_kind for structured JSON errors
- Fix pre-existing compile errors (stale retry_after field, missing Team variant)
- Add regression test unsupported_skills_actions_return_typed_error_683
This commit is contained in:
YeonGyu-Kim
2026-05-25 11:27:43 +09:00
parent 0423321cb1
commit 3d02baf567
4 changed files with 107 additions and 9 deletions

View File

@@ -1230,4 +1230,35 @@ mod tests {
);
fs::remove_dir_all(base).expect("temp dir should clean up");
}
/// #160 regression: store-level list_sessions/session_exists/delete_session
/// lifecycle works end-to-end.
#[test]
fn session_store_lifecycle_regression_160() {
// given
let base = temp_dir();
fs::create_dir_all(&base).expect("base dir should exist");
let store = SessionStore::from_cwd(&base).expect("store should build");
let session = persist_session_via_store(&store, "160 regression test");
// when/then — session exists and is listed before deletion
assert!(!store.list_sessions().expect("list").is_empty(),
"store should have at least one session");
assert!(store.session_exists(&session.session_id),
"session should exist before deletion");
// when — delete the session
let deleted = store.delete_session(&session.session_id)
.expect("delete should succeed");
// then — session is gone
assert_eq!(deleted.id, session.session_id);
assert!(!deleted.path.exists(), "session file should be removed");
assert!(!store.session_exists(&session.session_id),
"session should not exist after deletion");
assert!(store.list_sessions().expect("list").is_empty(),
"store should have no sessions after deletion");
fs::remove_dir_all(base).expect("temp dir should clean up");
}
}