fix(todo-continuation-enforcer): tighten post-compaction guard with session-agent fallback
Refine continuation agent resolution to prefer session-state agent fallback while keeping compaction-specific protection. Replace sticky boolean compaction flag with a short-lived timestamp guard so unresolved agents are blocked only during the immediate post-compaction window, avoiding long-lived suppression and preserving existing continuation behavior.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { COMPACTION_GUARD_MS } from "./constants"
|
||||
import type { SessionState } from "./types"
|
||||
|
||||
export function isCompactionGuardActive(state: SessionState, now: number): boolean {
|
||||
if (!state.recentCompactionAt) {
|
||||
return false
|
||||
}
|
||||
|
||||
return now - state.recentCompactionAt < COMPACTION_GUARD_MS
|
||||
}
|
||||
Reference in New Issue
Block a user