Skip to content

Local reconciliation cost model

The role does not batch REST or GraphQL operations. Each API operation is reconciled independently so its result, skip reason, and check-mode behavior remain attributable to the declared target. Public reconciliation validates the complete operation set in check-mode preflight before applying it. For an absent collection item, the representative REST path therefore performs one preflight lookup, one apply lookup, and one create request.

Run the development-only benchmark after changes affecting planner or reconciler cost:

python3 tools/benchmark_reconciliation.py

The benchmark uses an in-memory transport, so it measures controller-side Python work and request counts only. It does not represent GitLab response latency, rate limits, or Rails startup time.

Representative local run: 2026-07-24, Python 3.14, single process. Timing is informational and will vary by controller; request counts are the stable part of this contract.

Operations Planner time (s) Fake API time (s) List requests Write requests
100 0.006621 0.004702 200 100
500 0.032344 0.022742 1000 500

A batching design needs measured evidence that this per-operation model exceeds an agreed operational threshold; it is not implied by the resource count alone.