fix: include author_name + author_kind in public /lab-notes SELECTs#30
Merged
AdaInTheLab merged 1 commit intomainfrom Apr 30, 2026
Merged
fix: include author_name + author_kind in public /lab-notes SELECTs#30AdaInTheLab merged 1 commit intomainfrom
AdaInTheLab merged 1 commit intomainfrom
Conversation
The v_lab_notes view exposes author_name + author_kind (added in PR #28), and the LabNoteView mapper renders them into the response's `author` field — but the public endpoint SELECTs were never updated to ask for those columns. Result: every public response was missing the `author` field even when the underlying row had it set. Add author_name + author_kind to: - GET /lab-notes (both sqlAll + sqlByLocale paths) - GET /lab-notes/:slug Mapper already handles them (returns `author: { kind, name? }` when author_kind is truthy), so no other changes needed. ironkitsune.tech (and any other public consumer) will now see `author` in the response instead of "UNKNOWN" fallbacks. Co-authored-by: Sage <sage@thehumanpatternlab.com>
😼📘 Carmel Epistemic Stamp™📘 Carmel Epistemic Stamp™
This automated judgment has been issued by the Chief Judgment Office (CJO). |
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
Public `/lab-notes` responses are missing the `author` field — surfaced today on ironkitsune.tech where every tail rendered as "UNKNOWN". The `v_lab_notes` view already exposes `author_name` + `author_kind` (PR #28) and the `mapToLabNotePreview` / `mapToLabNoteView` mappers already construct `author: { kind, name? }` when those values are present. The bug was simply that the public endpoint SQL never included those columns in the SELECT, so the row reaching the mapper had `undefined` for both.
Changes
Testing
After deploy
Hit `https://api.thehumanpatternlab.com/lab-notes?type=tail\` and you should see an `author` object on rows that have it set in the DB.
If `author` is still missing after this lands, the data isn't in the DB — separate issue (likely the iron-nine-tails skill not sending `author_name` in its POST payload). Slug parsing as a defensive fallback on the rendering side is also reasonable given slugs already encode the voice (e.g. `koda-claiming-without-confirming`).
Co-authored-by: Sage sage@thehumanpatternlab.com