Repository navigation
fix: keep binary artifacts out of weekly brief text - #378
Merged
demegire merged 3 commits intoOct 12, 2026
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation matches the documented behavior and includes adequate regression coverage.
0 open findings
What changed in this PR
Prevents binary run artifacts from breaking weekly brief generation while retaining source references and run metadata.
Changes:
- Falls back to run receipts for invalid UTF-8 or NUL-containing artifacts.
- Preserves text artifacts and propagates storage failures.
- Adds regression tests and documents the behavior.
| File | Description |
|---|---|
src/tin_lite/activities.py |
Safely handles binary weekly brief sources. |
tests/test_weekly_brief_binary_sources.py |
Covers binary, NUL, text, and storage-error cases. |
docs/engineering.md |
Documents artifact fallback behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
What and why
Weekly brief decoded every run artifact as UTF-8. A demo video stopped the report before the model call. Use the existing run metadata fallback for invalid UTF-8 or NUL bytes, and keep the artifact reference. Text still contributes its content; storage errors are not hidden.
The reporter also rejected a useful summary when the model omitted the main heading. Add a standard heading in that case. Keep an existing heading, remove model-written source lists, and reject an empty summary. Tin still appends the exact recorded sources.
Verification
Limits
Provider and storage responses are synthetic. The fixed branch has not run against the deployed service; rerun both projects after rollout.