This commit is contained in:
Macbook
2026-06-11 18:00:54 +09:00
parent acd236dcc1
commit 44c46eee1b
5 changed files with 33 additions and 4 deletions
@@ -65,4 +65,19 @@ export function markStrategyMissingFromPath(pathOnly: string): void {
if (m) markStrategyMissingOnServer(Number(m[1]));
}
/** 목록에 없는 참조 ID를 missing 으로 기록 — 삭제된 전략 404 반복 방지 */
export function markStrategyIdsMissingUnlessValid(
validIds: Iterable<number>,
referencedIds: Iterable<number | null | undefined>,
): void {
const valid = new Set(
[...validIds].map(id => Math.trunc(id)).filter(id => id > 0),
);
for (const raw of referencedIds) {
if (raw == null) continue;
const id = Math.trunc(raw);
if (id > 0 && !valid.has(id)) markStrategyMissingOnServer(id);
}
}
hydrateStrategyMissingCache();