bulltrackers-module 1.0.319 → 1.0.320
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.
|
@@ -12,7 +12,7 @@ const { checkRootDataAvailability } = require('../data/AvailabilityChecker');
|
|
|
12
12
|
const crypto = require('crypto');
|
|
13
13
|
|
|
14
14
|
const OOM_THRESHOLD_MB = 1500;
|
|
15
|
-
const BASE_SECONDS_PER_WEIGHT_UNIT =
|
|
15
|
+
const BASE_SECONDS_PER_WEIGHT_UNIT = 3;
|
|
16
16
|
|
|
17
17
|
async function getHighMemReroutes(db, date, pass, tasks) {
|
|
18
18
|
const reroutes = [];
|
|
@@ -21,6 +21,7 @@ const packageVersion = packageJson.version;
|
|
|
21
21
|
const BUILD_RECORDS_COLLECTION = 'computation_build_records';
|
|
22
22
|
const BUILD_METADATA_DOC = 'system_build_metadata';
|
|
23
23
|
const SIMHASH_REGISTRY_COLLECTION = 'system_simhash_registry';
|
|
24
|
+
const REPORTER_EPOCH = require('../reporter_epoch')
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Publishes a message to trigger the dedicated Build Reporter Cloud Function.
|
|
@@ -61,7 +62,7 @@ async function handleBuildReportTrigger(message, context, config, dependencies,
|
|
|
61
62
|
function getSystemFingerprint(manifest) {
|
|
62
63
|
const sortedManifestHashes = manifest.map(c => c.hash).sort().join('|');
|
|
63
64
|
return crypto.createHash('sha256')
|
|
64
|
-
.update(sortedManifestHashes + SYSTEM_EPOCH)
|
|
65
|
+
.update(sortedManifestHashes + SYSTEM_EPOCH + REPORTER_EPOCH) // [UPDATED]
|
|
65
66
|
.digest('hex');
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -103,8 +104,8 @@ function calculateBlastRadius(targetCalcName, reverseGraph) {
|
|
|
103
104
|
const dependents = reverseGraph.get(current) || [];
|
|
104
105
|
dependents.forEach(child => {
|
|
105
106
|
if (!impactSet.has(child)) {
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
impactSet.add(child);
|
|
108
|
+
queue.push(child);
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
111
|
}
|
|
@@ -183,15 +184,25 @@ async function generateBuildReport(config, dependencies, manifest) {
|
|
|
183
184
|
const lastEarliestStr = latest?.windowEarliest || 'NONE';
|
|
184
185
|
const windowChanged = currentEarliestStr !== lastEarliestStr;
|
|
185
186
|
|
|
187
|
+
const epochChanged = latest?.reporterEpoch !== REPORTER_EPOCH; // [NEW]
|
|
188
|
+
|
|
186
189
|
// If fingerprints match AND the window is the same, we can truly skip.
|
|
187
|
-
if (latest &&
|
|
188
|
-
|
|
190
|
+
if (latest &&
|
|
191
|
+
latest.systemFingerprint === currentFingerprint &&
|
|
192
|
+
!windowChanged &&
|
|
193
|
+
!epochChanged) { // [NEW]
|
|
194
|
+
logger.log('INFO', `[BuildReporter] ⚡ System fingerprint, window, and reporter epoch stable. Skipping report.`);
|
|
189
195
|
return { success: true, status: 'SKIPPED_IDENTICAL' };
|
|
190
196
|
}
|
|
191
197
|
|
|
192
|
-
//
|
|
198
|
+
// Determine primary reason for logging
|
|
199
|
+
let reason = 'Code Change';
|
|
200
|
+
if (epochChanged) reason = 'Master Epoch Override'; // [NEW]
|
|
201
|
+
else if (windowChanged) reason = 'Data Window Drift';
|
|
202
|
+
|
|
203
|
+
// Increment patch version
|
|
193
204
|
const buildId = await getNextBuildId(db, packageVersion);
|
|
194
|
-
logger.log('INFO', `[BuildReporter] 🚀 Change Detected. Generating Build ${buildId}. Reason: ${
|
|
205
|
+
logger.log('INFO', `[BuildReporter] 🚀 Change Detected. Generating Build ${buildId}. Reason: ${reason}`);
|
|
195
206
|
|
|
196
207
|
const today = new Date();
|
|
197
208
|
const { absoluteEarliest } = DEFINITIVE_EARLIEST_DATES;
|
|
@@ -226,6 +237,7 @@ async function generateBuildReport(config, dependencies, manifest) {
|
|
|
226
237
|
buildId,
|
|
227
238
|
packageVersion,
|
|
228
239
|
systemFingerprint: currentFingerprint,
|
|
240
|
+
reporterEpoch: REPORTER_EPOCH,
|
|
229
241
|
windowEarliest: currentEarliestStr,
|
|
230
242
|
generatedAt: new Date().toISOString(),
|
|
231
243
|
status: 'IN_PROGRESS',
|