cc-continuity 0.3.69__tar.gz → 0.3.70__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/PKG-INFO +1 -1
  2. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/README.md +1 -0
  3. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/__init__.py +1 -1
  4. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/bootstrap.py +10 -2
  5. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity.egg-info/PKG-INFO +1 -1
  6. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/pyproject.toml +1 -1
  7. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_bootstrap.py +52 -0
  8. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/LICENSE +0 -0
  9. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/__main__.py +0 -0
  10. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/atomic.py +0 -0
  11. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/blink.py +0 -0
  12. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/blink_watch.py +0 -0
  13. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/checkpoint.py +0 -0
  14. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/cli.py +0 -0
  15. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/config.py +0 -0
  16. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/daemon_supervisor.py +0 -0
  17. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/doctor.py +0 -0
  18. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/gitsnap.py +0 -0
  19. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/__init__.py +0 -0
  20. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/common.py +0 -0
  21. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/pre_compact.py +0 -0
  22. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/pre_tool_use.py +0 -0
  23. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/session_end.py +0 -0
  24. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/session_start.py +0 -0
  25. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/stop.py +0 -0
  26. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/task.py +0 -0
  27. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/tool_use.py +0 -0
  28. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hooks/user_prompt.py +0 -0
  29. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/hosting.py +0 -0
  30. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/install.py +0 -0
  31. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/launch.py +0 -0
  32. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/ledger.py +0 -0
  33. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/lock.py +0 -0
  34. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/managed.py +0 -0
  35. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/naming.py +0 -0
  36. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/notify.py +0 -0
  37. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/overflow.py +0 -0
  38. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/paths.py +0 -0
  39. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/power_plug.py +0 -0
  40. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/progress_pane.py +0 -0
  41. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/project.py +0 -0
  42. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/redact.py +0 -0
  43. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/rotator.py +0 -0
  44. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/settings_merge.py +0 -0
  45. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/skills.py +0 -0
  46. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/state.py +0 -0
  47. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/statusline.py +0 -0
  48. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/thresholds.py +0 -0
  49. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/transcript.py +0 -0
  50. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/validate.py +0 -0
  51. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/watchdog.py +0 -0
  52. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/watchdog_digest.py +0 -0
  53. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity/watchdogd.py +0 -0
  54. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity.egg-info/SOURCES.txt +0 -0
  55. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity.egg-info/dependency_links.txt +0 -0
  56. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity.egg-info/entry_points.txt +0 -0
  57. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/cc_continuity.egg-info/top_level.txt +0 -0
  58. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/setup.cfg +0 -0
  59. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_atomic.py +0 -0
  60. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_blink.py +0 -0
  61. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_blink_watch.py +0 -0
  62. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_changelog_notes.py +0 -0
  63. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_checkpoint.py +0 -0
  64. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_cli.py +0 -0
  65. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_cli_ledger.py +0 -0
  66. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_cli_log.py +0 -0
  67. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_config.py +0 -0
  68. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_daemon_supervisor.py +0 -0
  69. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_doctor.py +0 -0
  70. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_gitsnap.py +0 -0
  71. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_common.py +0 -0
  72. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_pre_compact.py +0 -0
  73. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_pre_tool_use.py +0 -0
  74. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_session_end.py +0 -0
  75. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_session_start.py +0 -0
  76. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_stop.py +0 -0
  77. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_task.py +0 -0
  78. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_tool_use.py +0 -0
  79. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hooks_user_prompt.py +0 -0
  80. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hosting.py +0 -0
  81. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_hygiene.py +0 -0
  82. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_install.py +0 -0
  83. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_integration_phase5.py +0 -0
  84. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_integration_phase6.py +0 -0
  85. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_integration_phase7.py +0 -0
  86. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_launch.py +0 -0
  87. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_ledger.py +0 -0
  88. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_lock.py +0 -0
  89. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_managed.py +0 -0
  90. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_naming.py +0 -0
  91. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_notify.py +0 -0
  92. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_notify_integration.py +0 -0
  93. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_overflow.py +0 -0
  94. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_paths.py +0 -0
  95. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_power_plug.py +0 -0
  96. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_progress_pane.py +0 -0
  97. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_project.py +0 -0
  98. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_readme_badges.py +0 -0
  99. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_readme_gif.py +0 -0
  100. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_redact.py +0 -0
  101. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_rotator.py +0 -0
  102. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_settings_merge.py +0 -0
  103. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_skills.py +0 -0
  104. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_state.py +0 -0
  105. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_status.py +0 -0
  106. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_statusline.py +0 -0
  107. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_statusline_cache.py +0 -0
  108. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_thresholds.py +0 -0
  109. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_tmux_host.py +0 -0
  110. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_transcript.py +0 -0
  111. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_transcript_finalize.py +0 -0
  112. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_uninstall.py +0 -0
  113. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_validate.py +0 -0
  114. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_watchdog.py +0 -0
  115. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_watchdog_digest.py +0 -0
  116. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_watchdog_integration.py +0 -0
  117. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_watchdogd.py +0 -0
  118. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_wsl_doctor.py +0 -0
  119. {cc_continuity-0.3.69 → cc_continuity-0.3.70}/tests/test_wsl_install.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-continuity
3
- Version: 0.3.69
3
+ Version: 0.3.70
4
4
  Summary: Zero-touch session rotation for Claude Code (local large-context model)
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -41,6 +41,7 @@ The five most recent updates, newest first. Each line links to its
41
41
  commit, so you can see what changed lately without digging through the
42
42
  log:
43
43
 
44
+ - **2026-11-26**: An adopted successor no longer keeps the off marking of its abandoned startup. When Claude Code native auto-resume abandons a fresh startup the SessionEnd hook marks that record off (by design, so dead startups stop posing as live); the same record can later be revived as the live session by successor adoption, which refreshed the session id and state but not the off flag, so hooks, the rotator and the watchdog all ignored a real attached pane and the status line showed off instead of the usage segment; both adoption branches now clear off in the same write, abandoned startups stay off exactly as before, and two tests were written first ([commit](https://github.com/pqant/claude-continuity/commit/06c48c1)).
44
45
  - **2026-11-24**: A claim no longer skips a successor that died after attaching. The dead ACTIVE record used to force a fresh `max(counter)+1` name while the corpse kept looking live in the session list; the claim now probes the candidate's recorded pane (`tmux_session` against `tmux list-sessions`) and, only when that pane is gone, adopts the record at its same index and resets it to BOOTSTRAPPING so the SessionStart hook drives it like a fresh claim; the probe is conservative by construction (no recorded pane, tmux missing or any error means the candidate is treated as live), so a live pane is never hijacked, with eight tests written first ([commit](https://github.com/pqant/claude-continuity/commit/fa9b972)).
45
46
  - **2026-11-24**: Resuming now opens with a one-line at-a-glance preview. The SessionStart bootstrap block starts with the checkpoint number, the predecessor session, the VALIDATION result and the first Next Atomic Action item, so you can see what is being resumed without waiting for the first reply; the line is parsed display-only from the handoff text, silently omitted when nothing parses, and the block otherwise stays exactly the old format, with six tests written first ([commit](https://github.com/pqant/claude-continuity/commit/96341cb)).
46
47
  - **2026-11-24**: Handoff search is now a first-class surface. `cc-continuity search <query>` takes the search phrase directly, without typing `history` first, and the new `/continuity-search <phrase>` skill makes the invocation argument itself the query (invoked bare it asks for the keyword once); both reuse the read-only keyword engine from v0.3.66 verbatim, the `--nnn` and `--since`/`--until` filters keep working and `cc-continuity history <query>` continues to work unchanged, with four tests written first ([commit](https://github.com/pqant/claude-continuity/commit/b05b31c)).
@@ -4,4 +4,4 @@ Spec: docs/PRD.md (v1.0). Platform facts verified in docs/VERIFICATION.md.
4
4
  Standard library only at runtime; pytest is dev-only.
5
5
  """
6
6
 
7
- __version__ = "0.3.69"
7
+ __version__ = "0.3.70"
@@ -347,13 +347,21 @@ def try_claim(key: str, *, new_session_id: str, cfg: dict,
347
347
  # the same way after its recorded pane is probed dead.
348
348
  nnn_new = int((reuse or corpse)["nnn"])
349
349
  name_new = (reuse or corpse)["name"]
350
+ # Issue #99 (connector-280 live): the successor may carry the
351
+ # off=True marking its abandoned startup got from
352
+ # SessionEnd(reason=resume) (regression 2026-09-27 047). Adoption
353
+ # makes this record the live session, so clear off in the same
354
+ # write - a stale off would leave hooks/rotator/watchdog gating
355
+ # out a real attached pane and the status line rendering "off".
350
356
  if corpse is not None:
351
357
  state.update_fields_unlocked(key, nnn_new,
352
358
  session_id=new_session_id,
353
- state="BOOTSTRAPPING")
359
+ state="BOOTSTRAPPING",
360
+ off=False)
354
361
  else:
355
362
  state.update_fields_unlocked(key, nnn_new,
356
- session_id=new_session_id)
363
+ session_id=new_session_id,
364
+ off=False)
357
365
  entry = next((s for s in pref["sessions"]
358
366
  if int(s.get("nnn", -1)) == nnn_new), None)
359
367
  if entry is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-continuity
3
- Version: 0.3.69
3
+ Version: 0.3.70
4
4
  Summary: Zero-touch session rotation for Claude Code (local large-context model)
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cc-continuity"
7
- version = "0.3.69"
7
+ version = "0.3.70"
8
8
  description = "Zero-touch session rotation for Claude Code (local large-context model)"
9
9
  requires-python = ">=3.11"
10
10
  classifiers = [
@@ -703,3 +703,55 @@ def test_pane_record_dead_false_on_probe_error():
703
703
  raise _sp.SubprocessError("tmux exploded")
704
704
  rec = {"tmux_session": "cc-spike-repo-zz99"}
705
705
  assert bootstrap._pane_record_dead(rec, runner=boom) is False
706
+
707
+ # --- issue #99: adoption must clear the stale off flag ----------------------
708
+
709
+
710
+ def test_try_claim_adopted_dead_successor_clears_off(cc_home, tmp_path,
711
+ monkeypatch):
712
+ # issue #99 (connector-280 live): the successor was off-marked by its
713
+ # own SessionEnd(reason=resume) (regression 2026-09-27 047); adoption
714
+ # makes it the live session again, so off must not survive or the pane
715
+ # renders "◆ off" and runs unmonitored (hooks/rotator/watchdog gate).
716
+ repo, key, nnn = _verified(cc_home, tmp_path)
717
+ state.transition(key, nnn, "ROTATING", rotation_id="r1")
718
+ _active_dead_successor(key)
719
+ state.update_fields(key, 42, off=True) # abandoned-startup marking
720
+ monkeypatch.setattr(bootstrap, "REUSE_MIN_AGE_S", 0.0)
721
+ monkeypatch.setattr(bootstrap, "_pane_record_dead",
722
+ lambda rec, **kw: True)
723
+ with lock.held(key):
724
+ res = bootstrap.try_claim(key, new_session_id=_NEW_SID,
725
+ cfg=config.load_config(cwd=repo))
726
+ assert res is not None and res["new_nnn"] == 42
727
+ assert state.load_state(key, 42)["off"] is False
728
+
729
+
730
+ def test_try_claim_reused_never_attached_successor_clears_off(cc_home,
731
+ tmp_path):
732
+ # same root cause on the BUG-10 reuse branch: an off-marked
733
+ # never-attached BOOTSTRAPPING successor is revived as the live
734
+ # session; the stale off flag must be cleared with the sid refresh.
735
+ import datetime as _dt
736
+ repo, key, nnn = _verified(cc_home, tmp_path)
737
+ state.transition(key, nnn, "ROTATING", rotation_id="r1")
738
+ orphan_name = "spike-repo-042"
739
+ state.create_session_state(key, orphan_name, 42, "sid-orphan",
740
+ predecessor="spike-repo-001",
741
+ initial_state="BOOTSTRAPPING")
742
+ pfile = paths.project_dir(key) / "project.json"
743
+ pref = json.loads(pfile.read_text())
744
+ pref["sessions"].append({"name": orphan_name, "session_id": "sid-orphan",
745
+ "nnn": 42,
746
+ "created": _dt.datetime.now(
747
+ _dt.timezone.utc).isoformat()})
748
+ pref["counter"] = 42
749
+ pfile.write_text(json.dumps(pref))
750
+ state.update_fields(key, 42, created=(_dt.datetime.now(
751
+ _dt.timezone.utc) - _dt.timedelta(hours=1)).isoformat())
752
+ state.update_fields(key, 42, off=True) # abandoned-startup marking
753
+ with lock.held(key):
754
+ res = bootstrap.try_claim(key, new_session_id=_NEW_SID,
755
+ cfg=config.load_config(cwd=repo))
756
+ assert res is not None and res["new_nnn"] == 42
757
+ assert state.load_state(key, 42)["off"] is False
File without changes
File without changes