bulltrackers-module 1.0.334 → 1.0.335

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.
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * FILENAME: computation-system/WorkflowOrchestrator.js
3
- * UPDATED: Implements Chain Repair logic for missing historical dependencies.
3
+ * UPDATED: Fixed 'Version Mismatch' deadlock for historical chains.
4
4
  */
5
5
 
6
6
  const { normalizeName, DEFINITIVE_EARLIEST_DATES } = require('./utils/utils');
7
7
  const { checkRootDataAvailability, checkRootDependencies } = require('./data/AvailabilityChecker');
8
8
  const { fetchExistingResults } = require('./data/DependencyFetcher');
9
- const { fetchComputationStatus, updateComputationStatus } = require('./persistence/StatusRepository');
9
+ const { fetchComputationStatus, updateComputationStatus } = require('./persistence/StatusRepository'); // Unused
10
10
  const { StandardExecutor } = require('./executors/StandardExecutor');
11
11
  const { MetaExecutor } = require('./executors/MetaExecutor');
12
12
 
@@ -43,11 +43,6 @@ function isDependencyReady(depName, isHistoricalSelf, currentStatusMap, prevStat
43
43
  return { ready: true, dataChanged: false };
44
44
  }
45
45
 
46
- /**
47
- * UPDATED: Added "Chain Repair" logic.
48
- * If a historical dependency (yesterday's self) is missing, we treat it as a fresh start
49
- * rather than blocking indefinitely.
50
- */
51
46
  function analyzeDateExecution(dateStr, calcsInPass, rootDataStatus, dailyStatus, manifestMap, prevDailyStatus = null) {
52
47
  const report = { runnable: [], blocked: [], impossible: [], failedDependency: [], reRuns: [], skipped: [] };
53
48
  const simulationStatus = { ...dailyStatus };
@@ -89,10 +84,12 @@ function analyzeDateExecution(dateStr, calcsInPass, rootDataStatus, dailyStatus,
89
84
  if (yesterday >= DEFINITIVE_EARLIEST_DATES.absoluteEarliest) {
90
85
  const check = isDependencyReady(calc.name, true, null, prevDailyStatus, manifestMap, stored);
91
86
  if (!check.ready) {
92
- // FIX: If yesterday is missing, we interpret it as drift (Chain Repair)
93
- // instead of blocking, provided we are running this optimization check.
94
- if (check.reason === 'Missing') hasDataDrift = true;
95
- else isBlocked = true;
87
+ // [FIX]: Treat Missing OR Version Mismatch as Data Drift (Fresh Start)
88
+ if (check.reason === 'Missing' || check.reason === 'Dependency Version Mismatch') {
89
+ hasDataDrift = true;
90
+ } else {
91
+ isBlocked = true;
92
+ }
96
93
  }
97
94
  else if (check.dataChanged) hasDataDrift = true;
98
95
  }
@@ -123,15 +120,12 @@ function analyzeDateExecution(dateStr, calcsInPass, rootDataStatus, dailyStatus,
123
120
  if (yesterday >= DEFINITIVE_EARLIEST_DATES.absoluteEarliest) {
124
121
  const check = isDependencyReady(calc.name, true, null, prevDailyStatus, manifestMap, stored);
125
122
  if (!check.ready) {
126
- // [FIXED LOGIC START]
127
- // If yesterday is missing (gap or first run), allow it to run as "Fresh Start"
128
- // to repair the computation chain.
129
- if (check.reason === 'Missing') {
123
+ // [FIX]: Allow fresh start if yesterday is Missing OR has different Code Version
124
+ if (check.reason === 'Missing' || check.reason === 'Dependency Version Mismatch') {
130
125
  hasDataDrift = true;
131
126
  } else {
132
127
  isBlocked = true;
133
128
  }
134
- // [FIXED LOGIC END]
135
129
  }
136
130
  else if (check.dataChanged) hasDataDrift = true;
137
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.334",
3
+ "version": "1.0.335",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [