reconcilekit
A tiny, stateless fetch-diff-apply reconciliation kernel — the pattern a fleet-wide config tool repeats for every resource it manages, with none of the domain specifics.
There is no state file, no backend, no daemon. Each run reads live state, compares it to what you want, and either reports the plan or applies it.
The pattern
- Enumerate targets — anything with a
name. - Fetch each target's current state.
- Compare to the desired state: already there? partly blocked?
- Dry-run → report the plan, or apply → mutate and report the outcome.
- Classify into
Status(OK,UNCHANGED,LIMITED,LIMITED_UNCHANGED,FAILED). - Run the fleet in bounded parallel, isolating per-target failures and raising them together at the end.
API
Full API reference, generated from the docstrings:
hugoh.github.io/fleet-tools/reconcilekit
(rebuilt on every push that touches this package -- see
.github/workflows/docs.yml).
Example
import asyncio
from dataclasses import dataclass
from reconcilekit import (
Result,
Status,
classify_status,
result_line,
run_parallel,
run_reconcile,
)
@dataclass
class File:
name: str
path: str
want: str
def make_worker(dry_run: bool):
async def worker(f: File) -> Result[File]:
async def fetch() -> str:
return f.path_text() # read current contents
def plan(current: str) -> Result[File]:
status = classify_status(
at_target=current == f.want, changed=current != f.want
)
return Result(
f,
result_line(
f.name, "would rewrite" if current != f.want else "ok", status
),
status,
)
async def apply(current: str) -> Result[File]:
if current != f.want:
f.write(f.want)
status = classify_status(at_target=True, changed=current != f.want)
return Result(
f,
result_line(f.name, "written" if current != f.want else "ok", status),
status,
)
return await run_reconcile(
dry_run=dry_run, fetch=fetch, plan_result=plan, apply_result=apply
)
return worker
asyncio.run(run_parallel(files, make_worker(dry_run=True)))
Consumers
repo-admin/ (in this repo) uses it for every account-wide GitHub sync
command, consumed as a uv workspace member there.
Metadata
Release files for reconcilekit 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reconcilekit-0.6.0.tar.gz | 10.6 kB | With provenance | Details for reconcilekit-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reconcilekit-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for reconcilekit-0.6.0-py3-none-any.whl |
Total release size: 20.6 kB
Release files / reconcilekit-0.6.0.tar.gz
| Download URL | reconcilekit-0.6.0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39c0b95c2f29c2d95622b73b67410b1895f6bb6cb1470a6d44b3b1bf67a5f1ac
|
|
BLAKE2b-256 checksum How to use checksums |
2f411fb3bba44841586aa8c796f7f4216dee17b6e78158bf128bdca977b0323d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / reconcilekit-0.6.0-py3-none-any.whl
| Download URL | reconcilekit-0.6.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3760b08ef16e0288a7d10195e35e5747f8280fd833dc8c01b14640cbf6c770e2
|
|
BLAKE2b-256 checksum How to use checksums |
4c2c7a4bd605c48c001fe7ae8b1548ef1c9186d16f385dea39368383d68d40b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for reconcilekit 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for reconcilekit-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.