Skip to content

Improve session flow recovery and reduce audit noise#496

Merged
dmoliveira merged 11 commits intomainfrom
feat/session-flow-hardening-ae
Mar 20, 2026
Merged

Improve session flow recovery and reduce audit noise#496
dmoliveira merged 11 commits intomainfrom
feat/session-flow-hardening-ae

Conversation

@dmoliveira
Copy link
Owner

Summary

  • harden session flow behavior by making long-turn progress visible, recovering incomplete idle tails, auto-rerouting protected-branch mutations, and tightening /doctor auto-routing
  • reduce classifier churn and shadow/runtime event volume by compacting cache keys and removing repeated healthy no-op audits across watchdog, continuation, compaction, context, and recovery hooks
  • align gateway-core config expectations with the new long-turn defaults and keep the full lint/test suite green

Validation

  • npm --prefix plugin/gateway-core run lint
  • npm --prefix plugin/gateway-core test
  • node --test plugin/gateway-core/test/long-turn-watchdog-hook.test.mjs plugin/gateway-core/test/session-recovery-hook.test.mjs plugin/gateway-core/test/workflow-conformance-guard-hook.test.mjs plugin/gateway-core/test/primary-worktree-guard-hook.test.mjs plugin/gateway-core/test/auto-slash-command-hook.test.mjs

Reduce silent stalls by keeping watchdog progress pulses in visible output, auto-rerouting protected-branch mutations to the maintenance helper, and tightening idle/session recovery plus auto-slash diagnostics gating.
Reduce repeated helper churn by normalizing cache keys across PR-body evidence, done-proof checks, delegation fallback routing, agent routing, and denied-tool inference hooks.
Reduce repeated continuation classifier churn by switching the todo-continuation fallback cache key to the shared compact decision-key builder.
Reduce audit noise by emitting a single state event for deferred shadow-mode LLM decisions instead of recording both decision and shadow-deferred entries for the same outcome.
Trim high-frequency skip audits from healthy watchdog and recovery paths so event logs stay focused on actionable warnings, recoveries, and failures.
Reduce decision-runtime event noise by dropping routine skip audits for nested-child, cooldown, and max-concurrency short-circuits while keeping request, cache-hit, success, and failure telemetry.
Reduce continuation-loop log noise by dropping routine idle skip events that occur during healthy no-op checks while keeping actual loop state transitions and injections visible.
Reduce preemptive-compaction event noise by dropping routine cooldown and token-delta skip audits while preserving missing-metadata, success, and failure signals.
Reduce repeated healthy-state log churn across continuation enforcement, context monitoring, long-turn watchdog, and token-limit recovery while preserving meaningful failures, injections, and blocked actions.
Update config-load assertions to match the intentional long-turn watchdog defaults so the full gateway-core suite stays green after the session-flow hardening changes.
Keep the gateway command output and handbook examples consistent with the hardened long-turn watchdog defaults so operators see the same thresholds everywhere.
@dmoliveira dmoliveira merged commit e5e2e75 into main Mar 20, 2026
1 check passed
@dmoliveira dmoliveira deleted the feat/session-flow-hardening-ae branch March 20, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant