cc-continuity 0.3.72__tar.gz → 0.3.73__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.72 → cc_continuity-0.3.73}/PKG-INFO +1 -1
  2. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/README.md +1 -1
  3. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/__init__.py +1 -1
  4. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/checkpoint.py +37 -16
  5. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity.egg-info/PKG-INFO +1 -1
  6. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/pyproject.toml +1 -1
  7. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_checkpoint.py +45 -0
  8. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/LICENSE +0 -0
  9. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/__main__.py +0 -0
  10. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/atomic.py +0 -0
  11. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/blink.py +0 -0
  12. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/blink_watch.py +0 -0
  13. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/bootstrap.py +0 -0
  14. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/cli.py +0 -0
  15. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/config.py +0 -0
  16. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/daemon_supervisor.py +0 -0
  17. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/doctor.py +0 -0
  18. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/gitsnap.py +0 -0
  19. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/__init__.py +0 -0
  20. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/common.py +0 -0
  21. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/pre_compact.py +0 -0
  22. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/pre_tool_use.py +0 -0
  23. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/session_end.py +0 -0
  24. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/session_start.py +0 -0
  25. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/stop.py +0 -0
  26. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/task.py +0 -0
  27. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/tool_use.py +0 -0
  28. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hooks/user_prompt.py +0 -0
  29. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/hosting.py +0 -0
  30. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/install.py +0 -0
  31. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/launch.py +0 -0
  32. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/ledger.py +0 -0
  33. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/lock.py +0 -0
  34. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/managed.py +0 -0
  35. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/naming.py +0 -0
  36. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/notify.py +0 -0
  37. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/overflow.py +0 -0
  38. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/paths.py +0 -0
  39. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/power_plug.py +0 -0
  40. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/progress_pane.py +0 -0
  41. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/project.py +0 -0
  42. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/redact.py +0 -0
  43. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/rotator.py +0 -0
  44. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/settings_merge.py +0 -0
  45. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/skills.py +0 -0
  46. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/state.py +0 -0
  47. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/statusline.py +0 -0
  48. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/thresholds.py +0 -0
  49. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/transcript.py +0 -0
  50. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/validate.py +0 -0
  51. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/watchdog.py +0 -0
  52. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/watchdog_digest.py +0 -0
  53. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity/watchdogd.py +0 -0
  54. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity.egg-info/SOURCES.txt +0 -0
  55. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity.egg-info/dependency_links.txt +0 -0
  56. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity.egg-info/entry_points.txt +0 -0
  57. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/cc_continuity.egg-info/top_level.txt +0 -0
  58. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/setup.cfg +0 -0
  59. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_atomic.py +0 -0
  60. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_blink.py +0 -0
  61. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_blink_watch.py +0 -0
  62. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_bootstrap.py +0 -0
  63. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_changelog_notes.py +0 -0
  64. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_cli.py +0 -0
  65. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_cli_ledger.py +0 -0
  66. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_cli_log.py +0 -0
  67. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_config.py +0 -0
  68. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_daemon_supervisor.py +0 -0
  69. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_doctor.py +0 -0
  70. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_gitsnap.py +0 -0
  71. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_common.py +0 -0
  72. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_pre_compact.py +0 -0
  73. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_pre_tool_use.py +0 -0
  74. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_session_end.py +0 -0
  75. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_session_start.py +0 -0
  76. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_stop.py +0 -0
  77. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_task.py +0 -0
  78. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_tool_use.py +0 -0
  79. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hooks_user_prompt.py +0 -0
  80. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hosting.py +0 -0
  81. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_hygiene.py +0 -0
  82. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_install.py +0 -0
  83. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_integration_phase5.py +0 -0
  84. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_integration_phase6.py +0 -0
  85. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_integration_phase7.py +0 -0
  86. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_launch.py +0 -0
  87. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_ledger.py +0 -0
  88. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_lock.py +0 -0
  89. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_managed.py +0 -0
  90. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_naming.py +0 -0
  91. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_notify.py +0 -0
  92. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_notify_integration.py +0 -0
  93. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_overflow.py +0 -0
  94. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_paths.py +0 -0
  95. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_power_plug.py +0 -0
  96. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_progress_pane.py +0 -0
  97. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_project.py +0 -0
  98. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_readme_badges.py +0 -0
  99. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_readme_gif.py +0 -0
  100. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_redact.py +0 -0
  101. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_rotator.py +0 -0
  102. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_settings_merge.py +0 -0
  103. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_skills.py +0 -0
  104. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_state.py +0 -0
  105. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_status.py +0 -0
  106. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_statusline.py +0 -0
  107. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_statusline_cache.py +0 -0
  108. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_thresholds.py +0 -0
  109. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_tmux_host.py +0 -0
  110. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_transcript.py +0 -0
  111. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_transcript_finalize.py +0 -0
  112. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_uninstall.py +0 -0
  113. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_validate.py +0 -0
  114. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_watchdog.py +0 -0
  115. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_watchdog_digest.py +0 -0
  116. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_watchdog_integration.py +0 -0
  117. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_watchdogd.py +0 -0
  118. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/tests/test_wsl_doctor.py +0 -0
  119. {cc_continuity-0.3.72 → cc_continuity-0.3.73}/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.72
3
+ Version: 0.3.73
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,12 +41,12 @@ 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**: A hyphenated template heading no longer degrades a handoff draft. The template's seventh heading contains an em dash (U+2014) in its middle; a model obeying a no-em-dash writing rule retypes it with a plain hyphen, and strict matching called the section both missing and unexpected, throwing away a complete nine-section draft and finalizing a deterministic-only (degraded) checkpoint; template matching now folds em and en dashes to the hyphen at every comparison site, the draft text and the printed template stay verbatim, and four tests were written first ([commit](https://github.com/pqant/claude-continuity/commit/cee7a7e)).
44
45
  - **2026-11-26**: The hard-limit brick self-heal now fires in production. v0.3.71 admitted HANDOFF_REQUESTED to the context-400 recovery gates, but the watchdog tick loop only dispatched the scan for sessions its classifier judged ALIVE, TURN_DEAD, STALLED or FROZEN, and the classifier SKIPs everything outside ACTIVE/WARNED, so the hard-limit brick never reached the gate and the fix stayed unreachable code; the SKIP branch now carries HANDOFF_REQUESTED into recovery next to CHECKPOINT_VERIFIED, with one test written first ([commit](https://github.com/pqant/claude-continuity/commit/63ec16e)).
45
46
  - **2026-11-26**: A hard-limit context-400 brick now self-heals. The hard-limit gate parks the session in HANDOFF_REQUESTED and the model writes the handoff draft, but when the next API call 400s (input plus requested output over the window) the turn dies without a Stop hook and nothing finalized the draft: the deterministic context-400 recovery refused to run for exactly this state although its own route starts from it; both state gates now include HANDOFF_REQUESTED so the watchdog verifies the draft and restarts the pane on its own, two tests written first ([commit](https://github.com/pqant/claude-continuity/commit/fe8032a)).
46
47
  - **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)).
47
48
  - **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)).
48
49
  - **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)).
49
- - **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)).
50
50
  ## How it works
51
51
 
52
52
  The whole flow in one picture: the automatic session loop, the optional
@@ -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.72"
7
+ __version__ = "0.3.73"
@@ -109,6 +109,20 @@ def _parse_headings(text: str) -> list[tuple[int, str]]:
109
109
  return out
110
110
 
111
111
 
112
+ def _norm_title(title: str) -> str:
113
+ """Fold typographic dashes to ASCII hyphen for template matching only.
114
+
115
+ Issue #101 (connector-280 live): the template carries an em dash
116
+ (U+2014) in the middle of "Rejected Approaches <dash> Do Not Repeat"; a
117
+ model obeying a no-em-dash writing rule emits the hyphen variant, and
118
+ strict equality then called the section both missing AND unexpected,
119
+ degrading an otherwise complete draft. The dash is typography: matching
120
+ folds it (em dash U+2014 and en dash U+2013 to "-"), the draft text
121
+ itself is preserved verbatim.
122
+ """
123
+ return title.replace("—", "-").replace("–", "-")
124
+
125
+
112
126
  def _section_bodies(text: str) -> dict:
113
127
  """Map level-2 title → body text (up to the next heading of any level)."""
114
128
  bodies: dict = {}
@@ -137,12 +151,16 @@ def validate_draft(text: str, cfg: dict) -> DraftReport:
137
151
  problems: list = []
138
152
  headings = _parse_headings(redacted_text)
139
153
  h2 = [t for lvl, t in headings if lvl == 2]
154
+ # Issue #101: every template comparison folds typographic dashes (see
155
+ # _norm_title); the draft text itself is kept verbatim.
156
+ h2n = [_norm_title(t) for t in h2]
157
+ template_n = [_norm_title(h) for h in TEMPLATE_HEADINGS]
140
158
  first_level: dict[str, int] = {}
141
159
  for lvl, t in headings:
142
- first_level.setdefault(t, lvl)
143
- for h in TEMPLATE_HEADINGS:
144
- if h not in h2:
145
- lvl = first_level.get(h)
160
+ first_level.setdefault(_norm_title(t), lvl)
161
+ for h, hn in zip(TEMPLATE_HEADINGS, template_n):
162
+ if hn not in h2n:
163
+ lvl = first_level.get(hn)
146
164
  if lvl is not None:
147
165
  # Actionable for weak models: name the exact required form so
148
166
  # the fix is a copy, not a guess (2026-10-27 e2e: H1 draft).
@@ -151,23 +169,26 @@ def validate_draft(text: str, cfg: dict) -> DraftReport:
151
169
  else:
152
170
  problems.append(f"missing heading: {h}")
153
171
  seen: list = []
154
- for h in h2:
155
- if h in TEMPLATE_HEADINGS and h not in seen:
156
- seen.append(h)
157
- expected = [h for h in TEMPLATE_HEADINGS if h in h2]
172
+ for hn in h2n:
173
+ if hn in template_n and hn not in seen:
174
+ seen.append(hn)
175
+ expected = [hn for hn in template_n if hn in h2n]
158
176
  if seen != expected:
159
177
  problems.append(f"headings out of order: got {seen}")
160
178
  for h in dict.fromkeys(h2):
161
- if h in TEMPLATE_HEADINGS and h2.count(h) > 1:
179
+ hn = _norm_title(h)
180
+ if hn in template_n and h2n.count(hn) > 1:
162
181
  problems.append(f"duplicate heading: {h}")
163
182
  for h in dict.fromkeys(h2):
164
- if h not in TEMPLATE_HEADINGS:
183
+ if _norm_title(h) not in template_n:
165
184
  problems.append(f"unexpected heading: {h}")
166
- bodies = _section_bodies(redacted_text)
185
+ bodies = {_norm_title(k): v for k, v in _section_bodies(redacted_text).items()}
167
186
  for idx in REQUIRED_NONEMPTY:
168
- h = TEMPLATE_HEADINGS[idx]
169
- if h in bodies and len(bodies[h].strip()) < MIN_REQUIRED_CHARS:
170
- problems.append(f"section too short (< {MIN_REQUIRED_CHARS} chars): {h}")
187
+ hn = _norm_title(TEMPLATE_HEADINGS[idx])
188
+ body = bodies.get(hn)
189
+ if body is not None and len(body.strip()) < MIN_REQUIRED_CHARS:
190
+ problems.append(f"section too short (< {MIN_REQUIRED_CHARS} chars): "
191
+ f"{TEMPLATE_HEADINGS[idx]}")
171
192
  word_count = len(redacted_text.split())
172
193
  max_words = cfg.get("handoff_max_words", 5000)
173
194
  if word_count > max_words:
@@ -181,9 +202,9 @@ def headings_in_order(text: str) -> bool:
181
202
 
182
203
  Used on the FINAL handoff.md, whose appendix adds extra H2s (allowed).
183
204
  """
184
- h2 = [t for lvl, t in _parse_headings(text) if lvl == 2]
205
+ h2 = [_norm_title(t) for lvl, t in _parse_headings(text) if lvl == 2]
185
206
  it = iter(h2)
186
- return all(any(h == t for t in it) for h in TEMPLATE_HEADINGS)
207
+ return all(any(_norm_title(h) == t for t in it) for h in TEMPLATE_HEADINGS)
187
208
 
188
209
 
189
210
  MAX_STATUS_LINES = 200 # PRD §10.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-continuity
3
- Version: 0.3.72
3
+ Version: 0.3.73
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.72"
7
+ version = "0.3.73"
8
8
  description = "Zero-touch session rotation for Claude Code (local large-context model)"
9
9
  requires-python = ">=3.11"
10
10
  classifiers = [
@@ -912,3 +912,48 @@ def test_finalize_silent_when_notify_disabled(cc_home, tmp_path, monkeypatch):
912
912
  lambda *a, **kw: sent.append(a) or True)
913
913
  checkpoint.finalize(key, nnn, cfg=_cfg_for(repo), root=repo)
914
914
  assert sent == []
915
+
916
+
917
+ # --- issue #101: dash tolerance for template headings (connector-280 live) --
918
+
919
+
920
+ def _hyphen_draft(**overrides):
921
+ # A local model following a no-em-dash writing rule rewrote the em dash
922
+ # in the template heading to an ASCII hyphen. Same heading, different
923
+ # dash: it must still be recognized as that section.
924
+ bodies = {k.replace("—", "-"): v for k, v in DRAFT_BODIES.items()}
925
+ bodies.update(overrides)
926
+ order = [t.replace("—", "-") for t in HEADING_ORDER]
927
+ return "\n".join(f"## {t}\n{bodies[t]}\n" for t in order)
928
+
929
+
930
+ def test_draft_hyphen_dash_heading_variant_ok():
931
+ # connector-280 live case: the draft was complete (9 sections) but the
932
+ # heading carried a hyphen, so validate_draft called it missing AND
933
+ # unexpected, and finalize degraded the whole checkpoint to
934
+ # deterministic state. The dash is typography; matching must fold it.
935
+ r = checkpoint.validate_draft(_hyphen_draft(), _cfg())
936
+ assert r.ok is True, r.problems
937
+
938
+
939
+ def test_draft_both_dash_variants_of_one_heading_reported_duplicate():
940
+ r = checkpoint.validate_draft(
941
+ _draft() + "\n## Rejected Approaches - Do Not Repeat\nDuplicate too.\n",
942
+ _cfg())
943
+ assert r.ok is False
944
+ assert any(p.startswith("duplicate heading:") for p in r.problems)
945
+ assert not any(p.startswith("unexpected heading:") for p in r.problems)
946
+
947
+
948
+ def test_draft_hyphen_variant_still_enforces_required_content():
949
+ # Dash tolerance must not silently skip the required-section content
950
+ # checks: a short required body is still flagged.
951
+ r = checkpoint.validate_draft(_hyphen_draft(Objective="short"), _cfg())
952
+ assert r.ok is False
953
+ assert any("section too short" in p for p in r.problems)
954
+
955
+
956
+ def test_headings_in_order_accepts_hyphen_dash_variant():
957
+ # The finalized handoff.md embeds the model's heading verbatim; the
958
+ # final verify (headings_in_order) must fold dashes the same way.
959
+ assert checkpoint.headings_in_order(_hyphen_draft()) is True
File without changes
File without changes