Skip to content

fix(memory): read flow lists in the family memory's frontmatter as lists - #234

Merged
arthware-dev merged 3 commits into
feature/0.5.0-beta.1from
fix/frontmatter-one-parser
Oct 16, 2026
Merged

arthware-dev merged 3 commits into
feature/0.5.0-beta.1from
fix/frontmatter-one-parser

Conversation

@arthware-dev

Copy link
Copy Markdown
Contributor

Summary

  • The frontmatter parser read tags: [a, b] and tags: [] as strings, so a hand-edited page lost its tags and persons. A one-line flow list now reads as a list; flow maps, anchors, block scalars and unquoted values YAML reads differently (title: Notes: Admin) raise FrontmatterError.
  • Every reader of a family memory page's frontmatter (search, person and correspondent loaders, wiki and its publish gate, curator, diary, capture correction, email thread fold) now goes through stack.frontmatter. PyYAML and the hand-rolled parser in the capture pipeline are gone from these paths.
  • A page whose frontmatter does not parse is no longer guessed at: search reads it without its header, a correction or email fold leaves the entry as it is, and the file is named in the log.

Refs: #192

@arthware-dev
arthware-dev force-pushed the fix/frontmatter-one-parser branch from 0c8316d to a1e3e7f Compare October 16, 2026 12:56
Test added 3 commits October 16, 2026 17:07
The frontmatter parser read `tags: [a, b]` and `tags: []` as the
strings "[a, b]" and "[]", so a hand-edited page lost its tags and
persons to every reader. It also accepted unquoted values that YAML,
and so the wiki's Quartz build, reads differently or refuses, such as
`title: Notes: Admin`.

- A one-line flow list of scalars is read as a list of strings.
  Writers still emit block lists.
- Flow maps, nested lists, anchors, aliases, block scalars, unquoted
  `: ` and ` #`, and unclosed quotes raise `FrontmatterError`.
- Double-quoted values resolve their escapes, so a title `dump`
  writes with a quote in it reads back unchanged.

Refs: #192
A correction to a capture and a reply to an email thread both rewrite
the entry from its frontmatter. Both read it with their own parser: the
capture with a hand-rolled one that skipped lines it did not
understand, the email thread with PyYAML, which fell back to an empty
header and rewrote the thread without its type and title.

Both now read through the shared frontmatter parser. When the header
does not parse, the entry is left as it is and the archivist log names
the file: `frontmatter does not parse (...), reprocess skipped` for a
capture, `email not folded` for a thread.

Refs: #192
Search, the person and correspondent loaders, the wiki, the curator and
the diary read a page's frontmatter in three different ways: the shared
parser, silently dropping a header it refused, and PyYAML in the diary
and in the wiki's publish gate. A hand edit could read one way in
search and another in the wiki.

All of them now read through the shared parser. A page whose header
does not parse is read without it and named on stderr, which shows up
in `stack memory search` output, the archivist's and curator's
container logs, and the wiki and diary command output. The wiki's
publish gate uses the same parser, which refuses every unquoted value
Quartz's YAML parser would read differently.

Refs: #192
@arthware-dev
arthware-dev force-pushed the fix/frontmatter-one-parser branch from a1e3e7f to 0b29c9e Compare October 16, 2026 15:07
@arthware-dev
arthware-dev merged commit f123c27 into feature/0.5.0-beta.1 Oct 16, 2026
1 check passed
arthware-dev added a commit that referenced this pull request Oct 17, 2026
…sts (#234)

## Summary
- The frontmatter parser read `tags: [a, b]` and `tags: []` as strings, so a hand-edited page lost its tags and persons. A one-line flow list now reads as a list; flow maps, anchors, block scalars and unquoted values YAML reads differently (`title: Notes: Admin`) raise `FrontmatterError`.
- Every reader of a family memory page's frontmatter (search, person and correspondent loaders, wiki and its publish gate, curator, diary, capture correction, email thread fold) now goes through `stack.frontmatter`. PyYAML and the hand-rolled parser in the capture pipeline are gone from these paths.
- A page whose frontmatter does not parse is no longer guessed at: search reads it without its header, a correction or email fold leaves the entry as it is, and the file is named in the log.

Refs: #192
arthware-dev added a commit that referenced this pull request Oct 20, 2026
…sts (#234)

## Summary
- The frontmatter parser read `tags: [a, b]` and `tags: []` as strings, so a hand-edited page lost its tags and persons. A one-line flow list now reads as a list; flow maps, anchors, block scalars and unquoted values YAML reads differently (`title: Notes: Admin`) raise `FrontmatterError`.
- Every reader of a family memory page's frontmatter (search, person and correspondent loaders, wiki and its publish gate, curator, diary, capture correction, email thread fold) now goes through `stack.frontmatter`. PyYAML and the hand-rolled parser in the capture pipeline are gone from these paths.
- A page whose frontmatter does not parse is no longer guessed at: search reads it without its header, a correction or email fold leaves the entry as it is, and the file is named in the log.

Refs: #192
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