Skip to content

fix: AQE project-scope and route projections make ak sync report permanent drift #129

Description

@adrianco

Summary

ak sync can report success while leaving AQE configuration warnings that it
cannot resolve. The writer and status checker use different project-scope and
routing projections.

Defect 1: non-Git directories never converge

applyAqeRouter() resolves paths.repoRoot(cwd) and returns not a project — aqe router unmanaged when there is no Git root. The status path nevertheless
expects the project-scoped router file and reports provider/router drift on
every run.

Expected: outside a Git project, either do not report project-router drift or
offer/use an explicit supported project root. ak sync should not report
convergence while leaving an actionable warning it cannot repair.

Defect 2: writer and status checker disagree on agent overrides

In a Git project with dual-host activity routing:

  • applyAqeRouter() writes
    configuredPolicyToAgentOverrides(policy), intentionally projecting only
    explicitly persisted routes.
  • status.mjs compares disk state to policyToAgentOverrides(policy), which
    calls resolveRoutes() and fills omitted routes from defaults.

Status therefore expects override entries that sync deliberately never writes,
so it reports llm-config.json out of sync after a successful sync.

Expected: status and writer must compare the same projection. The minimal fix
is to use configuredPolicyToAgentOverrides() for the status comparison.

Impact

These warnings make a healthy AQE setup look broken and instruct users to run
a sync that cannot resolve the reported drift. They also obscure real provider
or routing drift.

Related

This report is distinct: it concerns a status/write projection mismatch during
normal setup and sync.

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