bulltrackers-module 1.0.330 → 1.0.331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -357,7 +357,7 @@ async function handleStandardDispatch(config, dependencies, computationManifest,
357
357
 
358
358
  const taskDetails = selectedTasks.map(t => `${t.name} (${t.reason})`);
359
359
  logger.log('INFO', `[Dispatcher] ✅ Dispatching ${selectedTasks.length} tasks for ${selectedDate}.`, {
360
- date: selectedDate, pass: passToRun, dispatchedCount: selectedTasks.length, etaSeconds, dispatchId: currentDispatchId
360
+ date: selectedDate, pass: passToRun, dispatchedCount: selectedTasks.length, etaSeconds, dispatchId: currentDispatchId, details: taskDetails
361
361
  });
362
362
 
363
363
  const mapToTaskPayload = (t) => ({
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Handles saving computation results with observability and Smart Cleanup.
3
3
  * UPDATED: Tracks specific Firestore Ops (Writes/Deletes) for cost analysis.
4
+ * UPDATED: Added Dynamic Circuit Breaker Bypass for Price-Only calculations.
4
5
  */
5
6
  const { commitBatchInChunks, generateDataHash } = require('../utils/utils');
6
7
  const { updateComputationStatus } = require('./StatusRepository');
@@ -54,12 +55,23 @@ async function commitResults(stateObj, dStr, passName, config, deps, skipStatusW
54
55
  try {
55
56
  const result = await calc.getResult();
56
57
  const configOverrides = validationOverrides[calc.manifest.name] || {};
58
+
59
+ // --- [DYNAMIC OVERRIDE LOGIC START] ---
57
60
  const dataDeps = calc.manifest.rootDataDependencies || [];
58
61
  const isPriceOnly = (dataDeps.length === 1 && dataDeps[0] === 'price');
59
62
  let effectiveOverrides = { ...configOverrides };
60
- if (isPriceOnly && !effectiveOverrides.weekend) {
61
- effectiveOverrides.weekend = { maxZeroPct: 100, maxFlatlinePct: 100, maxNullPct: 100 };
63
+
64
+ // If a calculation relies solely on price, we strictly bypass the circuit breaker.
65
+ // This handles Holidays (Weekday 0s), Weekends (Scheduler Gaps), and Crypto/Stock mix.
66
+ if (isPriceOnly) {
67
+ effectiveOverrides.maxZeroPct = 100;
68
+ effectiveOverrides.maxFlatlinePct = 100;
69
+ effectiveOverrides.maxNullPct = 100;
70
+ effectiveOverrides.maxNanPct = 100;
71
+ // Remove specific weekend config to ensure these permissive global limits apply 7 days/week
72
+ delete effectiveOverrides.weekend;
62
73
  }
74
+ // --- [DYNAMIC OVERRIDE LOGIC END] ---
63
75
 
64
76
  const contract = contractMap[name];
65
77
  if (contract) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.330",
3
+ "version": "1.0.331",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [