mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-23 16:25:30 +00:00
Round-2 review fixes: - ecc-context-monitor no longer suppresses its context warnings on configuration + bridge percentage alone. Deference now requires CONFIRMED gate activity via the shared gateOwnsTranscript (moved from suggest-compact into lib/context-gate-state.js): transcript readable, usage resolved, occupancy at/above threshold. When the gate cannot evaluate usage (missing/unreadable transcript) it cannot fire, so the monitor's CONTEXT CRITICAL warning survives as the fallback — an 8%-remaining session is never left with no guidance. The transcript read only happens when a context warning is possible (<=35% remaining). run()-level tests encode both the fallback and suppression paths. - resolveContextWindow accepts an env argument; context-gate and suggest-compact pass their (possibly injected) env through, so an options.env ECC_CONTEXT_WINDOW_TOKENS override now reaches window resolution instead of silently falling back to process.env. Regression tests cover the injected form and the registered-path process.env form. - hooks/README.md: 'At or above the gate threshold' (deferral is inclusive at 90%), plus the fallback behavior. - New tests/lib/context-gate-state.test.js covering threshold resolution, enabled/active checks, and gateOwnsTranscript semantics. Full suite: 4748/4748.