Skip to content

process(sync): define a cursor-lag SLO, compute real ledger queue metrics, and write an escalation policy (batch/checkpoint syncs) #100

Description

@IgorShevchik

Background

Strategy-level companion to #75 (which tracks the operational blockers: automation PR #67, branch protection, env ephemerality). Surfaced during the June 2026 multi-angle project audit (CTO review). The sync design itself is sound (kill-switch, idempotent ledger, gated PRs) — what's missing is a throughput model: at the current manual gated cadence the upstream queue grows without bound, and lag isn't even measured.

Evidence

.sync/nuxt-ui.json: cursor at b597f90, 7 commits processed (PRs #68#77) over ~3–4 weeks, sync_enabled: false, one-open-PR-at-a-time gate, and the stats block (queue_depth, noop_ratio, avg_pr_age) hardcoded to 0. nuxt/ui v4 lands commits daily. Process-fragility evidence: the ledger's last entry still says "b24ui_sha": "pending-merge" although that PR is merged at HEAD (overlap #75 §1).

Actions

  • Define a lag SLO — e.g. "cursor stays ≤ 20 commits / ≤ 14 days behind upstream/v4" — and record it in .sync/PLAN.md.
  • Compute queue metrics for real on every port: queue_depth = git rev-list --count <cursor>..upstream/v4, plus noop_ratio / avg PR age, written to the ledger so the trend is visible.
  • Written escalation policy for SLO breach: batch consecutive same-component upstream commits into one PR, and/or switch to upstream release-tag checkpoint syncs when per-commit cadence can't keep up.
  • Fix the stale ledger entry (pending-merge → actual merge SHA) and make "update ledger after merge" an explicit PORTING.md checklist line.
  • One-line status note in .sync/PORTING.md + RUNBOOK.md: both reference sync-porter.yml / sync-on-merge.yml workflows that don't exist yet (pipeline not deployed) — a "status: not yet deployed, manual cadence" line prevents newcomer confusion.

Priority: P2 (P1 if automation in PR #67 stays blocked — then the manual model is the only model).

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions