Skip to content

docs: cover orphan-claude / UserPromptSubmit / singleton-flock fixes#87

Merged
Time4Mind merged 1 commit into
mainfrom
docs/cover-orphan-hook-flock-fixes
May 16, 2026
Merged

docs: cover orphan-claude / UserPromptSubmit / singleton-flock fixes#87
Time4Mind merged 1 commit into
mainfrom
docs/cover-orphan-hook-flock-fixes

Conversation

@Time4Mind
Copy link
Copy Markdown
Owner

Summary

Bring CLAUDE.md, the .claude/rules/* set, the spec doc, and the /help body in line with PRs #82#86 (orphan-claude cleanup, orphan-window detection, UserPromptSubmit hook self-heal, <tool_use_error> strip, byte-budget sub-page split, singleton flock). No code changes — only docs + i18n strings.

  • CLAUDE.md — Core Design Constraints (hook self-heal + singleton lock), Configuration (ccbot.lock), Hook Configuration (full block, safety contract).
  • rules/architecture.md — state-files diagram, key-decisions list (hook self-heal, lock, archive orphan kill, startup orphan-window scan).
  • rules/dm-architecture.md — both events in the window_id→session description and "What is unchanged" line.
  • rules/secrets.mdccbot.lock in the where-things-are table.
  • doc/dm-multisession-spec.md — state persistence list, Section 9 Recovery (flock acquire, orphan-window scan, orphan-claude cleanup).
  • src/ccbot/i18n.py — /help → Tips body in en / ru / zh, two new bullets for single-instance lock + hook self-heal.

Test plan

  • ruff check / ruff format / pyright clean; full suite 473/473 green (no behavior changes, but tests still gate the diff).
  • /help renders correctly in all three locales when invoked from Telegram (no parse-mode regressions — only added bullets to existing string blocks).

🤖 Generated with Claude Code

Recent PRs (#82#86) changed bot behaviour in user-facing and
operator-facing ways that the docs hadn't caught up with yet:

- CLAUDE.md
  * Core Design Constraints: add the SessionStart + UserPromptSubmit
    hook story (self-heal) and the singleton flock.
  * Configuration: add ``ccbot.lock`` to the state-files list.
  * Hook Configuration: full block with both events + the safety
    contract (zero stdout, always exit 0, fast-path skip).

- .claude/rules/architecture.md
  * State-files diagram: ``session_map.json`` now lists both hook
    events; new ``ccbot.lock`` entry.
  * Key Design Decisions: hook self-heal, singleton lock, archive-
    time orphan-claude kill, startup orphan-window detection.

- .claude/rules/dm-architecture.md
  * window_id → claude session_id: both hook events update the map.
  * "What is unchanged": session_map.json description matches.

- .claude/rules/secrets.md
  * Add ``ccbot.lock`` to the where-things-are table.

- doc/dm-multisession-spec.md
  * State persistence: list ``ccbot.lock``.
  * Section 9 Recovery: flock acquire step, orphan-window scan, and
    the archive cleanup path that SIGTERMs orphan claude processes.

- src/ccbot/i18n.py
  * /help → Tips body (en / ru / zh): two new bullets — single-
    instance lock, hook self-heal — so operators have visibility
    into the new guarantees without digging through code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Time4Mind Time4Mind merged commit 986e6be into main May 16, 2026
4 checks passed
@Time4Mind Time4Mind deleted the docs/cover-orphan-hook-flock-fixes branch May 16, 2026 23:52
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