Repository navigation
Releases
0.1.12
What's Changed since v0.1.11
Fixes
- Per-root snapshot TTL: the dashboard runs
factory dashboard --jsonat most once per root per[defaults] dashboard_snapshot_ttlseconds (default 300, floor 60). Concurrent callers for a root share one in-flight call, and page or API traffic never adds polls. This cuts the dashboard's GitHub load from at least 80 to about 16gh apicalls a minute across five roots, staying under GitHub's secondary GraphQL limit. (#211, closes #210)
Internal
- Project page updated for 0.1.12. (#212)
Install / update
district update --to v0.1.12 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.12Full Changelog: v0.1.11...v0.1.12
0.1.11
What's Changed since v0.1.10
Features
- Accept factory host-claims keys:
repo_hostsaccepts factory's host-claims 1 schema (host_name,triage_host,land_host,release_host,claim_ttl) when District has nohostslist, and still treats that table as the local host. Existing hosts-list andhost=...rules are unchanged. (#192) - Apply does not strip those keys:
sync_local_claimsleaves host-claims keys on a single local host so the nextdistrict applycannot deletehost_nameorrelease_host. (#192) - Metrics keeps going: a per-repo error is recorded and later repos are still refreshed. The process exits nonzero only when every non-skipped repo failed, so a total failure stays visible in the unit result. (#192)
Internal
- Project page updated for 0.1.11. (#194)
Install / update
district update --to v0.1.11 --yes
district apply
Fresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.11
Full Changelog: v0.1.10...v0.1.11
0.1.10
What's Changed since v0.1.9
Features
- Write release_host: each host's synced factory config now includes
release_hostset to the same value astriage_host, and still writeshost_name,triage_host, andclaim_ttl. (#186, #189) - Claims probe on every listed host: before multi-host
district addordistrict apply,factory claims --supportedmust return exactlyhost-claims 1(with an optional final newline) and exit 0 on each host in the repo's host list. A missing command, different output, or non-zero exit refuses the operation without changing the registry, names the failing host, and links factory#722. Single-host repos are unchanged. (#186, #189)
Internal
- Project page updated for 0.1.10. (#191)
Install / update
district update --to v0.1.10 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.10Full Changelog: v0.1.9...v0.1.10
0.1.9
What's Changed since v0.1.8
Fixes
- Metrics skip remote factories:
district metricsnow skips any repo that runs only on a remote host and prints<slug>: skipped (runs on remote host NAME). Before, it read that repo's path on the controller, and a macOS path aborted every hourly refresh. (#181) - Metrics search without gh's cached detection: closed-issue and merged-PR counts now come from a paginated
gh api graphqlsearch.gh issue/pr list --searchhad been replaying a cached GraphQL rate-limit error for up to 24 hours, even with quota left. (#181) - Temporary /tmp reaper:
scripts/tmp-reaper-temp.shis now tracked in the repo. It gives the owner back permissions on read-only Factory review snapshots before removing them. Failed removals are counted instead of aborting the run, the log line recordsfailed=N, and the script exits non-zero only after that line is written. District does not install this script. (#182) - Paused timers: an inactive but enabled factory timer is reported as
timer pausedand no longer fails apply on its own. (#161)
Features
- Engine upgrades follow releases: with no ref,
district apply --upgradetargets the latest published non-prerelease Factory release. Tracking a branch now needs--upgrade BRANCHor[defaults].factory_track_branch = true.district statusflags hosts whose engine is behind the latest release. (#174) - Remote onboarding:
district add OWNER/REPO --host NAMEclones and configures through that host's SSH connection. Remote config replacements are atomic and keep a timestamped backup of any changed bytes. (#129, #165)
Upgrade note
If you set factory_ref = "main" (or any branch) without factory_track_branch = true, district apply now refuses with main: branch tracking requires --upgrade main or [defaults].factory_track_branch = true. That includes the drained apply that district update runs after installing. Choose a policy before upgrading: a release tag or latest-release, or keep the branch and set factory_track_branch = true.
Internal
- Project page updated for 0.1.9. (#183)
Install / update
district update --to v0.1.9 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.9Full Changelog: v0.1.8...v0.1.9
0.1.8
What's Changed since v0.1.7
Fixes
- Two-command Factory units: render validation checks every
ExecStart=in a oneshot service, including separate triage and dispatch commands, after stripping systemd exec prefixes (-,@,:,+,!,!!). Apply no longer reports a false "missing Factory argv" and skipsfactory installfor units with twoExecStartlines; a missing or invalid command still blocks installation and names the unit and argv. (#160, #162) - Remote commands on any login shell: District sends remote command scripts base64-encoded and runs them with
/bin/sh, so fish and POSIX login shells preserve quotes, backslashes, and stdin the same way. (#156, #159)
Features
- Repeated pass failures:
district statusraises operational attention anddistrict doctorreportsFAILwhen a factory's last N service passes on the same host all failed ([defaults] failed_pass_streak, default 6). It is a read-only alert, separate frommax_failed_passesand the timer failure cap. (#153, #157) - Scheduler toolchain preflight:
district addanddistrict applyresolvefactory,gh,git,uv,python3, review/manager commands, and every gate's first executable under the PATH and HOME of the rendered systemd service or launchd plist, and fail before installation with the host, binary, and searched PATH when one is missing.district doctorreruns the same read-only check. (#154, #158)
Internal
- Project page updated for 0.1.8. (#164)
Install / update
district update --to v0.1.8 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.8Full Changelog: v0.1.7...v0.1.8
0.1.7
What's Changed since v0.1.6
Features
- Drained engine apply:
district apply --drainwrites an atomic, expiring host flag so compatible timer-started Factory passes skip before starting work, waits up to 6 hours (--drain-timeout, at most 7h45m) for running and hand-run work to finish, then installs and post-checks the CI-green engine. A drain never stops, disables, masks, delays, or re-enables a timer and never kills a running pass; while drained, District does not callfactory installor apply the failure cap. Only hosts with pending engine work are drained.district drain --clear [--host NAME]removes a flag, doctor warns about stale or malformed flags, and the hourly apply drains after 3 deferrals or 24 hours. Drain admission needs Factory'sdrain-check(mikeroySoft/factory#563); older pass units ignore the flag, so District keeps checking busy work and times out safely. (#149, #150) - Post-apply checks: before clearing a drain, District checks Factory help, version, tool-Python import, receipt and target ancestry, dashboard HTTP 200, restarts the installed District dashboard, validates the previous engine in isolated uv directories, and runs
factory watch --dry-runfrom a registered repository checkout. (#149, #150)
Fixes
- Busy means Factory services: engine busy checks read the owning host's service manager (
factory-*.serviceon Linux, Factory launchd jobs on macOS) instead of every process's cwd and argv, sosshdand long-running dashboards no longer block an upgrade forever. Service probes share one idle deadline. (#151, #152)
Internal
- Install-state schema 3 records local
last_apply.drainand per-hostlast_apply.drains. (#150) - Project page updated for 0.1.7; the v0.1.6 and v0.1.4 changelog entries are restored to their shipped text. (#155)
Install / update
district update --to v0.1.7 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.7Full Changelog: v0.1.6...v0.1.7
0.1.6
What's Changed since v0.1.5
Features
- One Factory install per host: District owns the single Factory uv tool install on every host, local and remote.
district applydrops the stalefactory_sourcekey from the host config, keeping a timestamped backup (#111), and removes per-versionfactory-*folders under the District data dir that no unit, launchd agent, host config, or uv receipt still references; if the reference scan is incomplete, nothing is removed. An engine swap is deferred to the next apply while any factory work runs on the host; process state District cannot read counts as busy (fail-closed), and registry dashboard units do not block. (#136, #137) - One repo on several hosts: a repo table may list
hosts = [...]with atriage_host.district add --hostjoins a second host; apply pins the same Factory engine SHA on every host and rolls moved hosts back when one fails; doctor and status flag engine, worker, and model drift across hosts. (#134, #135) - Per-host engine source and defaults: remote hosts get their own Factory engine source and
[defaults]overrides (gh config dir, signing key, triage URL). (#130, #131)
Fixes
- Operator-stopped timers: when a repo's units change,
district applystops a timer again iffactory installstarted it after the operator stopped it, and records the stop inlast_apply.stopped; apply and--upgraderestore only the timers they paused. A first install, or an apply where the repo's units are unchanged, still runsfactory install, which re-enables a stopped timer; that is tracked in mikeroySoft/factory#549. (#138) - Hand-run uv-tool
factory gateandfactory dispatchwork defers an engine swap. (#138)
Internal
- Factory lessons file updated. (#144)
- Project page updated for 0.1.6.
Install / update
district update --to v0.1.6 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.6Full Changelog: v0.1.5...v0.1.6
0.1.5
What's Changed since v0.1.4
Features
- Remote hosts: one controller drives factories on other machines over bounded BatchMode SSH. District keeps the registry and operation lock on the controller and writes a host-filtered Factory config on each remote host; an unreachable host or a failed remote operation names that host while the others continue. (#99)
- launchd for macOS: systemd now sits behind a service-backend interface, with launchd agents under
~/Library/LaunchAgentsfor macOS hosts.district apply's unit-change check anddistrict install-stateread timer/job state through the same backend. (#98, #115, #114) - Fleet status and Atlas across hosts: status, report, and Atlas label every factory by host. An unreachable host shows its factories as unreachable with the last-seen time and exits 2 (unknown), not fleet failure. (#100)
- Per-host doctor: toolchain checks run on each factory's assigned host, with a
macos-xcodeprofile (Xcode, xcodebuild, xcodegen, swift, cargo, gh, iOS Simulator runtime). (#101) - Engine tracks the latest odd Factory tag:
factory_ref = "latest-odd"follows Factory's highest odd-patch semver tag, including prereleases, and installs only CI-green commits; engine state is recorded per host. (#118, #120)
Fixes
- Test setup no longer leaks a temporary directory per test into /tmp. (#124)
- Test modules import shared helpers through the
testspackage, with a suite-layout test. (#114, #127)
Internal
- Project page updated for 0.1.5. (#128)
Install / update
district update --to v0.1.5 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.5Full Changelog: v0.1.4...v0.1.5
0.1.4
What's Changed since v0.1.3
Features
district install-state: one timestamped, machine-readable record of install, engine, timer, hold, and last-apply state.--jsonemits a schema-versioned document; release lookup failures stayunknown. Everydistrict applyrewrites${XDG_STATE_HOME}/district/install-state.json, anddistrict reportreads its install section from that record. (#108, #109)
Fixes
- A busy factory no longer pauses the whole fleet.
district applyused to switch off every factory's timer and wait up to an hour for running passes. It now checks for running passes before touching any timer. A shared-engine install waits for the next apply while any factory is busy, leaving timers and the installed engine as they were, and exits 0. Only repositories whose units actually change are drained, and only while idle. (#110, #112) - Drains are bounded: an install keeps timers drained for at most 120 seconds, and timers return to their prior state on every exit path.
district metricsis no longer blocked by a waiting apply. (#112)
Internal
- The install-state record moves to schema 2, which records deferred work with its reason and since time. (#112)
- Apply tests now check behavior (no sleeping on a busy pass, unchanged units left alone), not internal call structure. (#112)
- Project page updated for 0.1.4. (#113)
Install / update
district update --to v0.1.4 --yes
district applyFresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.4Full Changelog: v0.1.3...v0.1.4
0.1.3
What's Changed since v0.1.2
Features
- Hosts registry (multi-machine groundwork): define remote machines under
[hosts.NAME](ssh,platform, optionalroot) and assign a factory withhost = "NAME"in its repo table ordistrict add --host NAME.localis reserved for this machine. Remote factories are recorded but skipped until remote execution lands (#96 step 1). (#104) - Follow a CI-green Factory branch: set
[defaults].factory_ref = "main"and every hourlydistrict applyinstalls the new Factory commit only after all its GitHub checks pass. Pending or failed commits are left alone. (#85) district status --slug OWNER/REPO/--unhealthy: narrow text and--jsonoutput to specific factories or only the ones that aren't normal. (#62)
Fixes
district applysmoke-checksgh --versionandfactory --versionunder each dispatch/dashboard unit's PATH and exits 1 naming the broken unit and binary. (#60)district statusreports an invalidghlogin once as a fleet-levelFAIL gh authrow (exit 1) instead of per-factory noise. (#61)- The uv package cooldown is written as a relative duration, so
district applyno longer restarts every factory dashboard hourly (#66). It's now ISO 8601 (PT24H), so an unquoted systemdEnvironment=line can't split it. (#90)
Internal
- District's own gate runs
uv run --frozenso the host'sUV_EXCLUDE_NEWERcan't rewriteuv.lockand dirty the worktree. (#103) - Project page embeds the Factory + District showreel and is updated for 0.1.3. (#72, #107)
- District skill uses narrowed status and names the real registry path. (#63, #64). Factory lessons updates (#74, #106) and a collector-threading test (#73).
Install / update
district update --to v0.1.3 --yes
district applydistrict apply rewrites factory units so they pick up UV_EXCLUDE_NEWER=PT24H.
Fresh install:
uv tool install git+https://github.com/mikeroySoft/district@v0.1.3Full Changelog: v0.1.2...v0.1.3