Skip to content

Clear session locks on forced delete#392

Open
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:clear-session-locks-on-delete
Open

Clear session locks on forced delete#392
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:clear-session-locks-on-delete

Conversation

@GreyforgeLabs
Copy link
Copy Markdown

Summary

  • Refuse normal cortex delete when the resolved session is locked, pointing users to cortex lock remove or --force.
  • After a successful forced delete, remove matching entries from session_locks.json so cortex lock list does not retain stale rows.
  • Add a CLI regression that imports a session, locks it, force-deletes it, and verifies the lock list is empty.

Fixes PlatformNetwork/bounty-challenge#53210.

Validation

  • cargo test -p cortex-cli --test delete_locks --no-default-features --features cortex-tui -- --nocapture
  • cargo check -p cortex-cli --no-default-features --features cortex-tui
  • cargo fmt --package cortex-cli --check
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[CLI][v0.0.7] cortex delete removes session files but leaves stale entries in cortex lock list

1 participant