bulltrackers-module 1.0.638 → 1.0.640

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.
@@ -35,7 +35,8 @@ function isDependencyReady(depName, isHistoricalSelf, currentStatusMap, prevStat
35
35
  }
36
36
 
37
37
  if (storedStatus && storedStatus.dependencyResultHashes) {
38
- const lastSeenResultHash = storedStatus.dependencyResultHashes[depName];
38
+ // FIX: Normalize the dependency name for lookup
39
+ const lastSeenResultHash = storedStatus.dependencyResultHashes[depName] || storedStatus.dependencyResultHashes[norm];
39
40
  if (lastSeenResultHash && targetStatus.resultHash !== lastSeenResultHash) {
40
41
  return { ready: true, dataChanged: true, reason: 'Dependency Data Update' };
41
42
  }
@@ -399,24 +399,34 @@ async function generateBuildReport(config, dependencies, manifest) {
399
399
  trueReRuns.forEach(item => processItem(dateSummary.rerun, item, "Logic Changed"));
400
400
  stableUpdates.forEach(item => processItem(dateSummary.stable, item, "Logic Stable"));
401
401
 
402
- // Auto-Heal Status if Stable
403
- if (stableUpdates.length > 0) {
404
- const updatesPayload = {};
405
- for (const stable of stableUpdates) {
406
- const m = manifestMap.get(stable.name);
407
- const stored = dailyStatus[stable.name];
408
- if (m && stored) {
409
- updatesPayload[stable.name] = {
410
- hash: m.hash, simHash: stable.simHash, resultHash: stored.resultHash,
411
- dependencyResultHashes: stored.dependencyResultHashes || {},
412
- category: m.category, composition: m.composition, lastUpdated: new Date()
413
- };
414
- }
415
- }
416
- if (Object.keys(updatesPayload).length > 0) {
417
- await updateComputationStatus(dateStr, updatesPayload, config, dependencies);
402
+ // Auto-Heal Status if Stable
403
+ if (stableUpdates.length > 0) {
404
+ const updatesPayload = {};
405
+ for (const stable of stableUpdates) {
406
+ const m = manifestMap.get(stable.name);
407
+ const stored = dailyStatus[stable.name];
408
+
409
+ // [FIX] Only auto-heal if we have valid result data
410
+ // Otherwise, force re-run to regenerate everything properly
411
+ const hasValidResults = stored?.resultHash &&
412
+ stored.resultHash !== 'empty' &&
413
+ stored.dependencyResultHashes &&
414
+ Object.keys(stored.dependencyResultHashes).length > 0;
415
+
416
+ if (m && stored && hasValidResults) {
417
+ updatesPayload[stable.name] = {
418
+ hash: m.hash, simHash: stable.simHash, resultHash: stored.resultHash,
419
+ dependencyResultHashes: stored.dependencyResultHashes,
420
+ category: m.category, composition: m.composition, lastUpdated: new Date()
421
+ };
422
+ } else {
423
+ // No valid results - treat as true re-run
424
+ processItem(dateSummary.rerun, stable, "Epoch Change - Rebuilding");
418
425
  }
419
426
  }
427
+ if (Object.keys(updatesPayload).length > 0) {
428
+ await updateComputationStatus(dateStr, updatesPayload, config, dependencies);
429
+ }
420
430
  }
421
431
 
422
432
  // Add skipped items to Stable count for metrics
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.638",
3
+ "version": "1.0.640",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [