# Reliability & Accuracy

> **Status:** initial — opened 2026-06-14 (Pass 1 scaffold). **No
> items yet.**
> A federation-sibling-scoped reliability tracker for `mgf-cloud`.
> The repo is new at **0.1.0**; the core abstraction and the
> Infomaniak adapter (the surface this tracker would audit) land in
> Passes 2–3. This file establishes the canonical tracker shape;
> items get opened as the surface lands.
>
> **Scope (when populated):** reliability + accuracy of the
> provider abstraction and the adapters — idempotency of mutating
> ops, partial-failure cleanup (never leak a billable resource),
> no-leak teardown, retry/backoff discipline on transient cloud
> errors, and the accuracy of the stateless live-query +
> `mgf:owner` tagging model. NOT a re-audit of mgf-common's RA
> items. NOT an audit of the provider SDKs or the cloud platform.
>
> **Audience:** the maintainer + future AI agents doing
> reliability work on this sibling.
> **Cross-references:** [`../design/DESIGN.md`](../design/DESIGN.md)
> (the stateless / guardrail model),
> [`SECURITY_HARDENING.md`](SECURITY_HARDENING.md),
> [`mgf-common/docs/inprogress/RELIABILITY_AND_ACCURACY.md`](https://codeberg.org/magogi-admin/mgf-common/src/branch/main/docs/inprogress/RELIABILITY_AND_ACCURACY.md)
> (the cornerstone's tracker — the cross-cutting invariants tracked
> there apply to this sibling too).

This document is the **living priority tracker** for reliability +
accuracy work in `mgf-cloud`. The shape mirrors mgf-common's
canonical tracker shape: priority table at the top, work-unit
detail below, status flipped as items close.

---

## §1 You are here

`mgf-cloud` is at 0.1.0 (Pass 1 — the conformant scaffold). The
only code today is the `__init__` + `__main__` CLI dispatch
skeleton; there is no provider abstraction and no adapter, so
there are no reliability invariants to pin yet. **No items are
open.**

The first reliability-relevant surfaces arrive with:

- **Pass 2** — the `CloudProvider` Protocol + the in-memory
  `FakeProvider` that backs the test suite, plus `models` /
  `config` / `exceptions` (the typed error hierarchy mapped onto
  `mgf-common`'s `AppError`).
- **Pass 3** — the Infomaniak adapter, where the load-bearing
  reliability concerns live: every mutating op MUST be idempotent
  or safe-to-retry, partial failures MUST be cleaned up (no
  orphaned billable resources), and transient cloud errors MUST
  use bounded retry/backoff (EH-11).
- **Pass 7** — the live end-to-end teardown smoke that verifies no
  resource leaks.

**Counts (2026-06-14):**

| Priority | Open | Closed | Total |
|---|---|---|---|
| P0 — blockers | 0 | 0 | 0 |
| P1 — should land before/with 1.0 | 0 | 0 | 0 |
| P2 — hardening | 0 | 0 | 0 |
| **Total** | **0** | **0** | **0** |

**Do first:** nothing yet — open the first RA item when Pass 2/3
gives it a surface to audit.

---

## §2 Priority table

_No items yet._ Each item, when opened, ties to a rule + concrete
`file:line` evidence + a falsifiable concrete output.

| ID | Concern | One-liner | Effort | Status |
|---|---|---|---|---|
| _(none)_ | — | — | — | — |

Effort scale: XS (≤ 15 min); S (≤ 1 h); M (≤ 1 session); L
(multiple sessions).

---

## §3 Invariants we hold

The list of "closed elsewhere; do not re-open" — populated as the
surface lands. The design already commits to these (to be pinned
by tests as the code arrives):

- **RA-INV-1 (design intent)** — **Stateless / live-query.** The
  cloud is the source of truth; there is no local state file to
  drift or lose. Federation resources are identified by the
  `mgf:owner` metadata tag, not by a tracked id list. See
  [`../design/DESIGN.md`](../design/DESIGN.md) §4.
- **RA-INV-2 (design intent)** — Adapters **clean up partial
  failures** and never leak billable resources; verified by the
  Pass 7 live teardown smoke. See DESIGN §10.

---

## §4 Work units

_No work units yet._ When the first item opens, follow the
canonical shape: **Why** (with `file:line` evidence) → **Concrete
output** → **Locked in by** → **Cross-references** → **Status**.

---

## §5 Closed items

_None yet._

---

## §6 Notes on methodology

When the surface lands, the audit method mirrors mgf-common's RA
tracker:

1. Read each source file end-to-end with the **RA / EH / SC** rule
   set in mind.
2. For every concern surfaced, verify `file:line` against the live
   source.
3. Cross-reference against mgf-common's RA tracker — every
   sibling-side pattern that has a cornerstone analog should
   benefit from the parent's prior work.
4. Triage: a concern that doesn't tie to a rule + concrete evidence
   is an "observation," not a tracker item.

The first pass should target the adapter (Pass 3): idempotency,
partial-failure cleanup, retry/backoff on transient errors, and the
accuracy of the `mgf:owner` live-query filter.
