Skip to content

An always-on second brain you talk to. Voice notes in Telegram → typed, linked knowledge in your Obsidian vault. Runs 24/7 on the Claude subscription you already have.

chore(autograph): sync upstream fix — block-list continuations skipped on rewrite

smixsb04d462832cd
diff --git a/vault/.claude/skills/autograph/scripts/common.py b/vault/.claude/skills/autograph/scripts/common.py
index 95e6043..698ee2f 100644
--- a/vault/.claude/skills/autograph/scripts/common.py
+++ b/vault/.claude/skills/autograph/scripts/common.py
@@ -255,7 +255,9 @@ def write_frontmatter(fields: dict, original_lines: list[str]) -> str:
written.add(key)
if key in fields:
out.append(format_field(key, fields[key]))
- if val_part in ('>-', '>', '|-', '|'):
+ # '' covers block-style lists and pending multiline values —
+ # their indented continuation lines are replaced wholesale too.
+ if val_part in ('>-', '>', '|-', '|', ''):
skip_continuation = True
else:
out.append(line)
diff --git a/vault/.claude/skills/autograph/tests/test_autograph.py b/vault/.claude/skills/autograph/tests/test_autograph.py
index 2709876..543e4f2 100644
--- a/vault/.claude/skills/autograph/tests/test_autograph.py
+++ b/vault/.claude/skills/autograph/tests/test_autograph.py
@@ -482,6 +482,26 @@ def main():
rebuilt_c2 == rebuilt_c,
f"r1={rebuilt_c!r}\nr2={rebuilt_c2!r}")
+ # 1.15c regression: BLOCK-style list continuations must be skipped when
+ # the key is rewritten — same bug family as 1.15b, different trigger.
+ # Before the fix the old "- item" lines survived as orphans under the
+ # new flow-style line.
+ block_fm = ("---\ntype: note\n"
+ "tags:\n"
+ " - project\n"
+ " - index\n"
+ "status: active\n---\n# Body\n")
+ fm_b, _, orig_b = parse_frontmatter(block_fm)
+ fm_b['tags'] = ['project', 'index', 'extra']
+ rebuilt_b = write_frontmatter(fm_b, orig_b)
+ test("block-list rewrite: no orphan items",
+ '\n - ' not in rebuilt_b and '- project' not in rebuilt_b.replace('[project', ''),
+ f"got: {rebuilt_b!r}")
+ fm_b_rt, _, _ = parse_frontmatter(f"---\n{rebuilt_b}\n---\n")
+ test("block-list rewrite: list intact",
+ fm_b_rt.get('tags') == ['project', 'index', 'extra'],
+ f"got: {fm_b_rt.get('tags')!r}")
+
# 1.16 deterministic link resolver
resolver_vault = tmp / 'resolver-vault'
(resolver_vault / 'docs/cards').mkdir(parents=True, exist_ok=True)