reconciliationSubmitTabGate.js
877 Bytes
/**
* 对账校验/增量待处理 Tab 门控:与基线有 diff 时,若基线中已有可对该 Tab 比对的行(含 phantom),
* 需用户在本会话有交互(classificationUserTouched)或新 Tab(sessionAdded),
* 避免「接口行 vs getBackendFormat 合并」假脏导致无操作也全量进 incremental。
* 无基线槽位时(如新增可提交规则、仅 substantive)不拦,由 reconciliationTabDiffersFromBaseline 侧语义处理。
*
* @param {object} o
* @param {boolean} o.hasBaselineSlot
* @param {boolean} o.classificationUserTouched
* @param {boolean} o.sessionAdded
* @returns {boolean}
*/
export function shouldIncludeReconciliationTabForProcess({
hasBaselineSlot,
classificationUserTouched,
sessionAdded
}) {
if (!hasBaselineSlot) return true
return classificationUserTouched === true || sessionAdded === true
}