Skip to content

Commit bd5dc24

Browse files
committed
fix: align apply lane comment sync accounting
1 parent f3fe159 commit bd5dc24

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎dashboard/worker.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6859,12 +6859,14 @@ function renderApplyHealth(data) {
68596859
const synced = Number.isFinite(item.comment_synced) ? fmt.format(item.comment_synced) : "unknown";
68606860
const closureProcessed = Number.isFinite(item.lanes?.closure?.processed) ? fmt.format(item.lanes.closure.processed) : processed;
68616861
const syncProcessed = Number.isFinite(item.lanes?.comment_sync?.processed) ? fmt.format(item.lanes.comment_sync.processed) : processed;
6862+
const closureSynced = Number.isFinite(item.lanes?.closure?.comment_synced) ? fmt.format(item.lanes.closure.comment_synced) : "0";
6863+
const syncLaneSynced = Number.isFinite(item.lanes?.comment_sync?.comment_synced) ? fmt.format(item.lanes.comment_sync.comment_synced) : "0";
68626864
return '<div class="apply-health-alert" role="status" title="' + esc(topInfo.summary + " Next: " + topInfo.action) + '">' +
68636865
'<div class="apply-health-heading"><strong>Pruning sweep ' + esc(applyHealthStatusLabel(item.status)) + " - " + esc(item.target_repo || "target repo") + '</strong><span class="pill" title="' + esc("Latest " + applyHealthModeLabel(item.mode) + " status from the sweep-status marker.") + '">' + esc(applyHealthModeLabel(item.mode)) + '</span></div>' +
68646866
'<p>' + esc(applyHealthOperatorSummary(item, topInfo)) + '</p>' +
68656867
'<p class="apply-health-next"><strong>Next check:</strong> ' + esc(topInfo.action) + '</p>' +
68666868
applyHealthActionHtml(action) +
6867-
'<div class="apply-health-meta"><span class="pill" title="Records checked in this pruning window.">' + esc(processed) + ' processed</span><span class="pill" title="' + esc("Closure lane: " + closureProcessed + " records processed; " + closed + " closed.") + '">' + esc(closed) + ' closed</span><span class="pill" title="' + esc("Comment-sync lane: " + syncProcessed + " records processed; " + synced + " review comments refreshed.") + '">' + esc(synced) + ' comments synced</span>' + cursorPill + reasons + linkClass(item.run_url, "workflow run", "pill run-link") + '</div></div>';
6869+
'<div class="apply-health-meta"><span class="pill" title="Records checked in this pruning window.">' + esc(processed) + ' processed</span><span class="pill" title="' + esc("Closure lane: " + closureProcessed + " records processed; " + closed + " closed.") + '">' + esc(closed) + ' closed</span><span class="pill" title="' + esc("Durable review comments refreshed across lanes: " + synced + ". Closure lane refreshed " + closureSynced + "; comment-sync lane refreshed " + syncLaneSynced + " from " + syncProcessed + " records.") + '">' + esc(synced) + ' comments synced</span>' + cursorPill + reasons + linkClass(item.run_url, "workflow run", "pill run-link") + '</div></div>';
68686870
}).join("");
68696871
}
68706872
function applyHealthNeedsAttention(status) {

‎src/repair/workflow-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ function summarizeApplyLanes(
383383
const lane = lanes[laneName];
384384
lane.processed += 1;
385385
if (entry.action === "closed") lane.closed += 1;
386-
if (entry.action === "review_comment_synced") lane.comment_synced += 1;
386+
if (reportsReviewCommentSync(entry)) lane.comment_synced += 1;
387387
if (!isProductiveApplyAction(entry)) {
388388
lane.skipped += 1;
389389
lane.skip_reasons[entry.action] = (lane.skip_reasons[entry.action] || 0) + 1;

‎test/repair/workflow-utils.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ test("workflow utilities flag operator-action skips when every result is blocked
399399
"skipped_same_author_pair",
400400
]);
401401
assert.equal(summary.lanes.closure.skipped, 10);
402+
assert.equal(summary.lanes.closure.comment_synced, 1);
402403
assert.equal(summary.lanes.closure.skip_reasons.kept_open, 1);
403404
assert.equal(summary.lanes.closure.skip_reasons.retry_pr_close_coverage_proof, 1);
404405
assert.equal(summary.lanes.closure.skip_reasons.skipped_pr_close_coverage_proof, 1);

0 commit comments

Comments
 (0)