bulltrackers-module 1.0.581 → 1.0.582
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,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FILENAME: computation-system/WorkflowOrchestrator.js
|
|
3
3
|
* UPDATED: Fixed 'Version Mismatch' deadlock for historical chains.
|
|
4
|
+
* UPDATED: Added Force-Run logic for 'isTest' computations on current day.
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
7
|
const { normalizeName, DEFINITIVE_EARLIEST_DATES } = require('./utils/utils');
|
|
@@ -46,12 +47,17 @@ function isDependencyReady(depName, isHistoricalSelf, currentStatusMap, prevStat
|
|
|
46
47
|
function analyzeDateExecution(dateStr, calcsInPass, rootDataStatus, dailyStatus, manifestMap, prevDailyStatus = null) {
|
|
47
48
|
const report = { runnable: [], blocked: [], impossible: [], failedDependency: [], reRuns: [], skipped: [] };
|
|
48
49
|
const simulationStatus = { ...dailyStatus };
|
|
50
|
+
const isToday = dateStr === new Date().toISOString().slice(0, 10);
|
|
49
51
|
|
|
50
52
|
for (const calc of calcsInPass) {
|
|
51
53
|
const cName = normalizeName(calc.name);
|
|
52
54
|
const stored = simulationStatus[cName];
|
|
53
55
|
const currentHash = calc.hash;
|
|
54
56
|
|
|
57
|
+
// [NEW] Rule: 'isTest' computations always re-run on the current day.
|
|
58
|
+
// This ensures debug/test probes fire immediately to test system changes.
|
|
59
|
+
const shouldForceRun = isToday && (calc.isTest === true);
|
|
60
|
+
|
|
55
61
|
// 1. Root Data Check
|
|
56
62
|
const rootCheck = checkRootDependencies(calc, rootDataStatus);
|
|
57
63
|
if (!rootCheck.canRun) {
|
|
@@ -65,7 +71,8 @@ function analyzeDateExecution(dateStr, calcsInPass, rootDataStatus, dailyStatus,
|
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
// --- OPTIMIZATION: Early skip if code matches AND data is stable ---
|
|
68
|
-
if
|
|
74
|
+
// [UPDATED] We bypass this optimization if shouldForceRun is true
|
|
75
|
+
if (stored?.hash === currentHash && !shouldForceRun) {
|
|
69
76
|
let hasDataDrift = false;
|
|
70
77
|
let isBlocked = false;
|
|
71
78
|
let missingDeps = [];
|
|
@@ -161,6 +168,9 @@ function analyzeDateExecution(dateStr, calcsInPass, rootDataStatus, dailyStatus,
|
|
|
161
168
|
report.runnable.push({ ...taskPayload, reason: "New Calculation" });
|
|
162
169
|
} else if (stored.hash !== currentHash) {
|
|
163
170
|
report.reRuns.push({ ...taskPayload, oldHash: stored.hash, newHash: currentHash, reason: "Hash Mismatch" });
|
|
171
|
+
} else if (shouldForceRun) {
|
|
172
|
+
// [NEW] Logic to handle the forced run for Test probes
|
|
173
|
+
report.reRuns.push({ ...taskPayload, oldHash: stored.hash, newHash: currentHash, reason: "Test Computation (Always Run Today)" });
|
|
164
174
|
} else if (hasDataDrift) {
|
|
165
175
|
report.runnable.push({ ...taskPayload, reason: "Input Data Changed" });
|
|
166
176
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {
|
|
3
|
-
* type: uploaded file
|
|
4
|
-
* fileName: computation-system/context/ManifestBuilder.js
|
|
5
|
-
* }
|
|
6
|
-
*/
|
|
7
1
|
/**
|
|
8
2
|
* @fileoverview Dynamic Manifest Builder - Handles Topological Sort and Auto-Discovery.
|
|
9
3
|
* UPDATED: Removed Automatic Infra Hashing. Now relies strictly on SYSTEM_EPOCH.
|
|
10
|
-
* UPDATED: Whitelisted 'rootDataSeries', 'dependencySeries',
|
|
4
|
+
* UPDATED: Whitelisted 'rootDataSeries', 'dependencySeries', 'mandatoryRoots', and 'isTest'.
|
|
11
5
|
*/
|
|
12
6
|
const { generateCodeHash, LEGACY_MAPPING } = require('../topology/HashManager.js');
|
|
13
7
|
const { normalizeName } = require('../utils/utils');
|
|
@@ -240,11 +234,12 @@ function buildManifest(productLinesToRun = [], calculations) {
|
|
|
240
234
|
type: metadata.type,
|
|
241
235
|
isPage: metadata.isPage === true,
|
|
242
236
|
isHistorical: metadata.isHistorical !== undefined ? metadata.isHistorical : false,
|
|
237
|
+
isTest: metadata.isTest === true, // [NEW] Whitelisted for WorkflowOrchestrator
|
|
243
238
|
rootDataDependencies: metadata.rootDataDependencies || [],
|
|
244
239
|
// [NEW] Pass Series & Mandatory Config
|
|
245
240
|
rootDataSeries: metadata.rootDataSeries || null,
|
|
246
241
|
dependencySeries: metadata.dependencySeries || null,
|
|
247
|
-
mandatoryRoots: metadata.mandatoryRoots || [],
|
|
242
|
+
mandatoryRoots: metadata.mandatoryRoots || [],
|
|
248
243
|
|
|
249
244
|
canHaveMissingRoots: metadata.canHaveMissingRoots || false,
|
|
250
245
|
userType: metadata.userType,
|