Fix remaining OSINT signal text truncation#68
Fix remaining OSINT signal text truncation#68schergr wants to merge 5 commits intocalesthio:masterfrom
Conversation
Posts were being cut to 300 chars (source ingestion) and 150 chars (alert evaluation), losing valuable OSINT context. The sendMessage chunker already handles the 4096-char Telegram API limit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The prior fix (753c676) only removed truncation at source ingestion and alert formatting. Signals were still being cut to 120 chars in the delta engine, 80 chars in memory snapshots, and 120 chars in the ideas LLM context — so OSINT posts arrived at the alerter already truncated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR removes remaining upstream truncation of urgent Telegram/OSINT signal text so full post content can flow through delta computation, memory snapshots, LLM context, and Telegram alert rendering (with improved “Signals” formatting).
Changes:
- Removed substring/slice truncation in Telegram source ingestion, delta engine signal construction, and memory snapshot compaction.
- Updated LLM “ideas” sweep compaction to include full urgent OSINT post text.
- Improved Telegram alert formatting for signals (more items + bulleted list output).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/llm/ideas.mjs | Stops truncating urgent OSINT post text included in LLM ideas context. |
| lib/delta/memory.mjs | Stores full urgent post text in compacted memory snapshots. |
| lib/delta/engine.mjs | Emits full urgent post text in newly-detected OSINT signals. |
| lib/alerts/telegram.mjs | Expands/reshapes OSINT signal text shown in alerts and formats signals as bullets. |
| apis/sources/telegram.mjs | Stops truncating Telegram message text extracted via Bot API and web preview parsing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for opening this. The direction makes sense, but there are two issues I think should be fixed before this is merged:
Once those two are addressed, this looks much closer to mergeable. |
Addresses PR review: escape Markdown-sensitive characters in _formatTieredAlert signal bullets to prevent Telegram Bot API rejections, and add a 1500-char budget for URGENT_OSINT in compactSweepForLLM to bound prompt size while keeping full text upstream. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace single &calesthio#39; handler with generic numeric/hex entity decoder so &calesthio#39; and other unpadded entities are properly converted - Dedup urgent OSINT posts against all hot memory runs (last 3 sweeps) instead of only the previous sweep, preventing posts that drop out of one sweep from reappearing as "new" in the next Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
anything else you need? |
|
Added a follow-up commit on top of this branch to close the remaining review issues:
Rechecked the branch after the patch: sweep still completes, dashboard inject still runs, the new-post dedup false negative is fixed, and this stays scoped to Telegram/delta/ideas paths without touching jarvis core UI code. |
calesthio
left a comment
There was a problem hiding this comment.
Reviewed the updated branch including the follow-up fix commit. The truncation removal adds real value, and with the dedup identity + Markdown escaping fixes in place I don’t see a remaining blocker.
Summary
The prior fix (753c676) removed truncation at source ingestion and alert formatting, but signals were still arriving at the alerter pre-truncated from upstream. The
sendMessagechunker already handles Telegram's 4096-char API limit.Test plan
🤖 Generated with Claude Code