Skip to content

fix: strip null bytes from parsed file content before retain#535

Merged
nicoloboschi merged 7 commits intomainfrom
fix/null-bytes-in-file-upload
Mar 10, 2026
Merged

fix: strip null bytes from parsed file content before retain#535
nicoloboschi merged 7 commits intomainfrom
fix/null-bytes-in-file-upload

Conversation

@nicoloboschi
Copy link
Copy Markdown
Collaborator

Summary

  • Uploaded files (PDFs, etc.) can contain null bytes (\u0000) after parsing, which PostgreSQL rejects when storing as JSONB
  • Apply the existing sanitize_llm_output() to parsed markdown content in _handle_file_convert_retain before it's put into the task payload

Test plan

  • Upload a file containing null bytes and verify it retains without PostgreSQL errors

- Tag the document upload post with `hindsight-cloud`
- BlogListPage renders two sections, capping Cloud at 3 posts with a "View all →" link
- Swizzle BlogTagsPostsPage so /blog/tags/hindsight-cloud uses the custom grid layout
Replace the generic "Hindsight Team" author with the real author entry
(nicoloboschi) across all 15 blog posts. GitHub profile image is loaded
from https://github.com/nicoloboschi.png.
- Add benfrank241 (Ben Bartholomew) and chrislatimer (Chris Latimer) to authors.yml
- Assign 7 posts to Ben, 1 post to Chris, remainder stay with Nicolò
@nicoloboschi nicoloboschi merged commit cd3a6a2 into main Mar 10, 2026
36 of 37 checks passed
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