Skip to content

optimize: 拒绝结束父 shell(可用 --force) - #1

Merged
hc-ui merged 7 commits into
mainfrom
cursor/optimize-wholocks-aa74
Aug 26, 2026
Merged

hc-ui merged 7 commits into
mainfrom
cursor/optimize-wholocks-aa74

Conversation

@hc-ui

@hc-ui hc-ui commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • kill_block_reason now refuses the parent shell (os.getppid()) unless --force is passed, so wholocks --kill . cannot SIGTERM the terminal that launched it.
  • README safety lists (EN + 中文) mention the parent-shell guard.
  • Existing test test_refuses_parent_shell already covered this.

Notes

  • Could not add a ruff job to .github/workflows/ci.yml (no workflows scope). Existing pytest CI is unchanged.
  • Files were updated via the GitHub contents API (git push as cursor[bot] is denied).

Test plan

  • PYTHONPATH=src python3 -m pytest → 66 passed
  • Merge after review. --force still allows killing the parent shell if you really want that.

@hc-ui
hc-ui marked this pull request as ready for review August 26, 2026 10:28
@hc-ui
hc-ui merged commit 4f821cb into main Aug 26, 2026
14 checks passed
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.

1 participant