fix: reuse connected engine for frontmatter reindex#906
Open
adriankae wants to merge 2 commits into
Open
Conversation
added 2 commits
May 12, 2026 06:06
- pass the CLI engine into reindex-frontmatter instead of creating a disconnected PGLite engine - only disconnect engines owned by the reindex command - ignore empty date-like frontmatter fields in doctor effective_date health - add regression coverage for command wiring and doctor check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reindex-frontmatterinstead of constructing a second, disconnected PGLite engine.reindexFrontmatterCliown/disconnect only engines it creates itself.effective_date_healthwarnings for empty date-like frontmatter fields.Why
In PGLite installs,
gbrain reindex-frontmattercould fail withPGLite not connected. Call connect() first.because the CLI had already initialized an engine, butreindex-frontmattercreated/used its own unconnected engine path. This also made downstream Hermes installs carry a local compatibility patch across upgrades.doctoralso treated the mere presence ofevent_date,date, orpublishedfrontmatter keys as evidence of parseable date metadata even when the values were empty, producing noisy effective-date warnings.Test plan
Both pass locally.
Note: running the full
test/doctor.test.tsfile in this container hits pre-existing 5s timeouts in unrelatedtakes_weight_gridtests while fresh PGLite migrations run; the new focused tests pass.Need help on this PR? Tag
@codesmithwith what you need.