Repository navigation
Replies: 1 comment
|
Follow-up: we tried a client-side fix. Our write wrapper quotes bare
The final version leaves any frontmatter it can't tokenize with certainty unchanged, so some dates still become |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What problem does this solve?
An unquoted
updated: 2026-11-03matches js-yaml's timestamp type (FRONTMATTER_SCHEMAinsrc/core/data-frontmatter.ts). It becomes aDate, and is stored and returned as2026-11-03T00:00:00.000Z. A brain written by both people and agents ends up with a mix of2026-11-03and full-timestamp values in the same key. String comparison and sorting onupdatedordatethen break, and agents that read a page and write it back spread the timestamp form. Today onlytitle(#1862) andeffective_date(src/core/effective-date.ts) are cut back toYYYY-MM-DD.What does the solution look like?
A date-only scalar (no time part) round-trips as the string
YYYY-MM-DD, on every key. Timestamps that include a time keep today's behaviour, including the naive-datetime handling. If changing the default is too risky, add a config switch (e.g.frontmatter.date_only: preserve). An optionalgbrain repairpass would rewrite storedT00:00:00.000Zvalues back to dates, with a dry run.Alternatives considered
Happy to send a PR if this direction is acceptable.
All reactions