bulltrackers-module 1.0.773 → 1.0.774
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.
|
@@ -95,7 +95,7 @@ class ManifestBuilder {
|
|
|
95
95
|
|
|
96
96
|
// Hash Composition
|
|
97
97
|
const usedLayers = this._detectLayerUsage(codeString);
|
|
98
|
-
const { usedRules, hashes: ruleHashes } = this.rulesRegistry.detectUsage(codeString);
|
|
98
|
+
const { usedRules, hashes: ruleHashes } = this.rulesRegistry.detectUsage(codeString); // TODO : The usedRules is unused? Bug? Investigate.
|
|
99
99
|
|
|
100
100
|
let compositeHash = codeHash + `|EPOCH:${this.epoch}`;
|
|
101
101
|
|
|
@@ -67,7 +67,6 @@ exports.dispatcherHandler = async (req, res) => {
|
|
|
67
67
|
// =====================================================================
|
|
68
68
|
|
|
69
69
|
// 2. Stale Task Protection
|
|
70
|
-
// Prevents execution if the task was scheduled with an older version of the configuration
|
|
71
70
|
if (configHash && !force) {
|
|
72
71
|
const manifest = await system.getManifest();
|
|
73
72
|
|
|
@@ -76,9 +75,13 @@ exports.dispatcherHandler = async (req, res) => {
|
|
|
76
75
|
const entry = manifest.find(c => c.name === normalizedName);
|
|
77
76
|
|
|
78
77
|
if (entry) {
|
|
79
|
-
//
|
|
80
|
-
const input = JSON.stringify(entry.schedule) + `|PASS:${entry.pass}`;
|
|
81
|
-
const currentHash = crypto.createHash('md5').update(input).digest('hex').substring(0, 8);
|
|
78
|
+
// OLD BROKEN LOGIC:
|
|
79
|
+
// const input = JSON.stringify(entry.schedule) + `|PASS:${entry.pass}`;
|
|
80
|
+
// const currentHash = crypto.createHash('md5').update(input).digest('hex').substring(0, 8);
|
|
81
|
+
|
|
82
|
+
// NEW CORRECT LOGIC:
|
|
83
|
+
// Use the authoritative hash from the Manifest (same one the Planner used)
|
|
84
|
+
const currentHash = entry.hash;
|
|
82
85
|
|
|
83
86
|
// Compare Task Hash vs Current Hash
|
|
84
87
|
if (configHash !== currentHash) {
|