MCPcopy Create free account
hub / github.com/Donnadieu/Epstein-File-Explorer / determineTier

Function determineTier

scripts/pipeline/batch-processor.ts:193–209  ·  view source on GitHub ↗
(
  hasText: boolean,
  textLength: number,
  budgetRemaining: number,
  forceTier?: AnalysisTier,
)

Source from the content-addressed store, hash-verified

191}
192
193function determineTier(
194 hasText: boolean,
195 textLength: number,
196 budgetRemaining: number,
197 forceTier?: AnalysisTier,
198): AnalysisTier {
199 if (forceTier !== undefined) return forceTier;
200
201 // No text or very short text: Tier 0 only
202 if (!hasText || textLength < MIN_TEXT_LENGTH) return 0;
203
204 // Budget exhausted: fall back to Tier 0
205 if (budgetRemaining <= 0) return 0;
206
207 // Has text and budget: use Tier 1
208 return 1;
209}
210
211// --- Batch Processing ---
212

Callers 1

processBatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected