Skip to content

fix(render): drop doubled mode: prefix in vault note frontmatter - #119

Open
aarontrowbridge wants to merge 1 commit into
mainfrom
opencode/issue-117-vault-note-mode-yaml
Open

aarontrowbridge wants to merge 1 commit into
mainfrom
opencode/issue-117-vault-note-mode-yaml

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Contributor

Closes #117

render_vault_note wrote mode: {mode} into frontmatter, but mode is the composite line from mode_line() and already carries its own mode: prefix, so the note read mode: mode: jev, ok (invalid YAML). The frontmatter now strips that prefix. mode_line(), the note body, the Slack header and stdout are unchanged.

Evidence

  • New tests/test_vault_note.py parses the written frontmatter with yaml.safe_load; reverting the fix makes it fail with ScannerError: mapping values are not allowed here, restoring it passes.
  • pytest: 287 passed. ruff check .: clean.
  • The committed fixture tests/fixtures/vault/digests/2026-10-01.md is regenerated by the e2e tests on every run and carried the same bug; it is updated to match.

Not in this PR: digests already written to real vaults (e.g. a 2026-10-31 digest) stay invalid, since arJev never edits existing notes. Those need a one-time manual fix.

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review October 31, 2026 16:25
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.

fix(render): vault digest note frontmatter is invalid YAML (doubled mode: prefix)

1 participant