Skip to content

Fast-path quality-gate escalation could re-route instead of hard-switching to DIRECT #75

Description

@jsogarro

Finding (from PR #73 adversarial review)

When a fast-path response fails the quality gate, `DirectExecutionService` escalates by mutating the routing decision to `CollaborationMode.DIRECT` (direct_execution_service.py ~695). This is a graceful degradation — DIRECT still runs the full single-agent pipeline including the verification QA gate — so it is not a bug.

However, a quality-gate failure is a strong signal that the initial `SIMPLE` complexity classification was wrong. For a query that is actually HIERARCHICAL/PARALLEL-worthy, DIRECT may still under-serve it.

Possible enhancement

On quality-gate failure, re-run `masr_router.route(query, context={"reroute_from_failed_fast_path": True})` and let re-analysis pick the correct non-fast-path mode, instead of hard-coding DIRECT.

Caveat / why deferred

The re-route path must guard against re-selecting FAST_PATH (the context flag must force `_should_use_fast_path` to return False), or it risks an escalation loop. This is a routing-behavior change and should be its own PR with its own live-eval, not folded into the fast-path introduction. Current DIRECT escalation is acceptable and verified.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions