Remove remaining text truncation across delta engine, memory, and ideas

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>
This commit is contained in:
Greg Scher
2026-03-21 12:59:30 -04:00
parent 753c6766a0
commit 2d166c20e8
4 changed files with 8 additions and 5 deletions

View File

@@ -271,7 +271,7 @@ export class TelegramAlerter {
headline: `OSINT Surge: ${osintNew.length} New Urgent Posts`,
reason: `${osintNew.length} new urgent OSINT signals detected. Elevated conflict reporting tempo.`,
actionable: 'Review OSINT stream for pattern. Cross-check with satellite and ACLED data.',
signals: osintNew.map(s => (s.text || '').substring(0, 40)).slice(0, 3),
signals: osintNew.map(s => s.text || s.label || s.key).slice(0, 5),
crossCorrelation: 'telegram OSINT',
};
}
@@ -728,7 +728,10 @@ Respond with ONLY valid JSON:
}
if (evaluation.signals?.length) {
lines.push('', `Signals: ${evaluation.signals.join(' · ')}`);
lines.push('', `*Signals:*`);
for (const sig of evaluation.signals) {
lines.push(`${sig}`);
}
}
lines.push('', `_${new Date().toISOString().replace('T', ' ').substring(0, 19)} UTC_`);

View File

@@ -161,7 +161,7 @@ export function computeDelta(current, previous, thresholdOverrides = {}) {
if (hash && !prevHashes.has(hash)) {
signals.new.push({
key: `tg_urgent:${hash}`,
text: post.text?.substring(0, 120),
text: post.text,
item: post,
reason: 'New urgent OSINT post',
});

View File

@@ -199,7 +199,7 @@ export class MemoryManager {
bls: data.bls,
treasury: data.treasury,
gscpi: data.gscpi,
tg: { posts: data.tg?.posts, urgent: (data.tg?.urgent || []).map(p => ({ text: p.text?.substring(0, 80), date: p.date })) },
tg: { posts: data.tg?.posts, urgent: (data.tg?.urgent || []).map(p => ({ text: p.text, date: p.date })) },
thermal: (data.thermal || []).map(t => ({ region: t.region, det: t.det, night: t.night, hc: t.hc })),
air: (data.air || []).map(a => ({ region: a.region, total: a.total })),
nuke: (data.nuke || []).map(n => ({ site: n.site, anom: n.anom, cpm: n.cpm })),

View File

@@ -91,7 +91,7 @@ function compactSweepForLLM(data, delta, previousIdeas) {
// Geopolitical signals
const urgentPosts = (data.tg?.urgent || []).slice(0, 5);
if (urgentPosts.length) {
sections.push(`URGENT_OSINT:\n${urgentPosts.map(p => `- ${(p.text || '').substring(0, 120)}`).join('\n')}`);
sections.push(`URGENT_OSINT:\n${urgentPosts.map(p => `- ${p.text || ''}`).join('\n')}`);
}
// Thermal / fire detections