Skip to content

Commit 438f243

Browse files
committed
docs: mark v2 expectation-TTL policy split on clear_expected
Future marker only (no behaviour change): when bidirectional / Pika right-context passes land, clear_expected's policy splits — clear one-step expectations as now, but retain multi-step HorizonPolarity::InferredRight slots with a TTL so right-context memo entries survive across sentences. https://claude.ai/code/session_0147hSzjmWZDuy2MSQNrhEK5
1 parent f299543 commit 438f243

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

crates/deepnsm/src/window.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,16 @@ impl SentenceWindow {
170170
}
171171
}
172172

173-
/// Drain the expected slots, returning them in FIFO order.
173+
/// Clear all expectation slots.
174174
///
175-
/// Called implicitly by `resolve_pronoun`. After a clause closes, the
176-
/// caller should clear expectations that were consumed.
175+
/// `ReadingState::step` calls this at the start of each sentence: v1 treats
176+
/// every expectation as a **single-step** left-corner prediction, so the
177+
/// buffer can never accumulate stale slots toward `MAX_EXPECTED`.
178+
///
179+
/// Future (v2, bidirectional / Pika right-context passes): this policy
180+
/// splits — clear one-step expectations as now, but **retain** multi-step
181+
/// `HorizonPolarity::InferredRight` slots with a TTL so right-context memo
182+
/// entries survive across sentences until their window elapses.
177183
pub fn clear_expected(&mut self) {
178184
self.expected_count = 0;
179185
}

0 commit comments

Comments
 (0)