bypass checkColdStatus — always returns not-cold until feature ready
This commit is contained in:
@@ -96,28 +96,7 @@ const STATUS_NAMES: Record<number, string> = {
|
||||
*
|
||||
* @returns A `ColdCheckResult` indicating cold status and trigger metadata.
|
||||
*/
|
||||
export function checkColdStatus(input: ColdCheckInput): ColdCheckResult {
|
||||
const NOT_COLD: ColdCheckResult = { cold: false, triggeredBy: null };
|
||||
|
||||
if (!input.statusCwId) return NOT_COLD;
|
||||
|
||||
const threshold = COLD_THRESHOLDS[input.statusCwId];
|
||||
if (!threshold) return NOT_COLD;
|
||||
|
||||
if (!input.lastActivityDate) return NOT_COLD;
|
||||
|
||||
const now = input.now ?? new Date();
|
||||
const elapsed = now.getTime() - input.lastActivityDate.getTime();
|
||||
|
||||
if (elapsed < threshold.ms) return NOT_COLD;
|
||||
|
||||
return {
|
||||
cold: true,
|
||||
triggeredBy: {
|
||||
statusCwId: input.statusCwId,
|
||||
statusName: STATUS_NAMES[input.statusCwId] ?? "Unknown",
|
||||
thresholdDays: threshold.days,
|
||||
staleDays: Math.floor(elapsed / (24 * 60 * 60 * 1000)),
|
||||
},
|
||||
};
|
||||
export function checkColdStatus(_input: ColdCheckInput): ColdCheckResult {
|
||||
// Bypassed — always returns not-cold until cold-stall feature is ready
|
||||
return { cold: false, triggeredBy: null };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user