FIX [SCMS] Make seedMarkerNote boot-idempotent + pointer-repair safe 🧬#16
Merged
AdaInTheLab merged 1 commit intomainfrom Jan 7, 2026
Merged
FIX [SCMS] Make seedMarkerNote boot-idempotent + pointer-repair safe 🧬#16AdaInTheLab merged 1 commit intomainfrom
AdaInTheLab merged 1 commit intomainfrom
Conversation
co-authored-by: Lyric <lyric@thehumanpatternlab.com> co-authored-by: Carmel <carmel@thehumanpatternlab.com>
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
This PR fixes a long-standing mismatch between how the API marker note was seeded and how the Lab Notes system actually identifies and serves notes.
The root cause was an identity mismatch:
lab_note_revisions.note_idis a foreign key tolab_notes.idid = api-marker:enid = slug:locale(api-marker-note:en)What changed
(slug, locale)lab_notes.idif presentlab_note_revisions.note_idcorrectly referenceslab_notes.idcurrent_revision_idandpublished_revision_idare always set to the latest revisionstatus = publishedpublished_atensuredcontent_htmlpopulated if missingWhy this matters
This aligns the marker note with the system’s real identity model instead of an assumed one.
It makes seeding:
:memory:test DBsIt also prevents future regressions where a note “exists” but is invisible due to mismatched IDs or missing revision pointers.
Notes
api-marker:en)lab_notes.id === slug:localeTests
Lab Note detail › GET /lab-notes/:slug returns a note with contentHtmlnow passes