{"id":"sentinel-values-bootstrap-streaming-state","text":"Sentinel initial values (-1, 0, None) bootstrap the O(1)-space running accumulators that power single-pass streaming, encoding boundary conditions directly into loop initializers so the first iteration executes the same code path as all subsequent iterations.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["sentinel-initialization-encodes-boundary-conditions","o1-space-via-running-accumulators"],"outlist":[],"label":"Sentinels and accumulators are co-dependent: accumulators need correct initial state to avoid first-iteration branching, and sentinels exist precisely to provide that state — neither pattern works well without the other"}],"dependents":["correctness-by-construction-not-validation","streaming-needs-no-external-ordering"],"metadata":{"last_reviewed":"2026-06-07T22:02:22","review_result":"pass"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"sentinel-values-bootstrap-streaming-state","truth_value":"IN","reason":"SL justification valid","antecedents":["sentinel-initialization-encodes-boundary-conditions","o1-space-via-running-accumulators"],"label":"Sentinels and accumulators are co-dependent: accumulators need correct initial state to avoid first-iteration branching, and sentinels exist precisely to provide that state — neither pattern works well without the other"},{"node":"sentinel-initialization-encodes-boundary-conditions","truth_value":"IN","reason":"SL justification valid","antecedents":["ascending-check-uses-sentinel-minus-one","k-length-apart-sentinel-minus-one","prev-zero-sentinel","getheight-sentinel-neg1"],"label":"all four use domain-specific sentinels (-1 for \"no previous index\", 0 for \"no previous group\", -1 for \"any subtree unbalanced\") that make the first loop iteration produce the correct vacuous result without an explicit guard"},{"node":"ascending-check-uses-sentinel-minus-one","truth_value":"IN","reason":"premise"},{"node":"k-length-apart-sentinel-minus-one","truth_value":"IN","reason":"premise"},{"node":"prev-zero-sentinel","truth_value":"IN","reason":"premise"},{"node":"getheight-sentinel-neg1","truth_value":"IN","reason":"premise"},{"node":"o1-space-via-running-accumulators","truth_value":"IN","reason":"SL justification valid","antecedents":["highest-altitude-single-pass","longest-task-single-pass-o1-space","iterative-reversal-O1-space","min-tracking-pattern-shared"],"label":"Running accumulators trade re-traversal impossibility for constant memory across streaming-style problems"},{"node":"highest-altitude-single-pass","truth_value":"IN","reason":"premise"},{"node":"longest-task-single-pass-o1-space","truth_value":"IN","reason":"premise"},{"node":"iterative-reversal-O1-space","truth_value":"IN","reason":"premise"},{"node":"min-tracking-pattern-shared","truth_value":"IN","reason":"premise"}]}}