fix(digest): skip sub-agent (sidechain) turns in extract_corrections (L6)
Problem
digest.extract_corrections scans user turns for correction signals and builds a DigestRule — which is injected as a hard behavioral rule into the MAIN session. It filters _is_system_noise but has no isSidechain guard. So a SUB-AGENT conversation's user-turn (role:user, type:text, inside a sidechain) carrying an explicit-correction phrase is mined as if it were the human's direct correction → untrusted sub-agent content becomes a learned behavioral rule. Sidechain turns are sub-agent scaffolding/prompts, not the user correcting Claude.
Fix
One if _is_sidechain(msg): continue at the TOP of the loop (reusing the canonical tokens._is_sidechain), placed BEFORE the pre-window split — so neither a sidechain user-turn is mined NOR a sidechain assistant-turn pollutes prev_assistant_text (the before evidence) for a following main rule. extract_corrections is the sole turn-mining chokepoint (update_digest / flush_digest / recover_digest all funnel through it), so the one guard closes the class.
Tests
tests/test_digest.py::TestSidechainInjectionGuard — RED-at-base proven (a sidechain correction turn yields a rule at base: 1 != 0), GREEN after. Plus a positive control (the IDENTICAL phrase WITHOUT isSidechain DOES yield a rule — proving the flag, not the phrasing, is the discriminant) and a bleed control (a sidechain assistant turn no longer populates the next main rule's before). test_digest.py = 216/216.
Scope
L6 untrusted-input / digest pollution. digest.py only, stdlib.