repomatic.init.local_edits module¶
Spot the local edits repomatic init overwrites in a skill or agent copy.
init replaces each skill and agent copy it manages with the one the running
release bundles. An edit a repository made to its copy, and never sent
upstream, is lost to that rewrite, and the diff shows the loss as routine sync
churn.
A copy holds no local edit when it matches a file that the release the
repository adopted before the run bundled: the release its upstream uses:
pins name. The wheel of that release holds every such file, so init reads it
from PyPI and compares digests, in the normalized form init writes to disk.
- repomatic.init.local_edits.CHECKED_COMPONENTS = frozenset({'skills', 'subagents'})¶
Components whose copies
initchecks for local edits before it overwrites them.Skills and agents are prose a repository edits by hand. The other bundled files differ from the shipped ones for other reasons:
labelsis staged for one command, and the sync jobs bump the pins ofpublish-pypi-actionbetween two releases.
- repomatic.init.local_edits.shipped_digests(package, version)[source]¶
The digests of the data files one release of package bundled.
Reads the wheel PyPI serves for version, once its SHA-256 matches the one PyPI records. Hashes every text file under the
data/folder of the package withdigest(), which is the forminitwrites to disk. The folder layout of the release does not matter, so a wheel that bundled a skill under another path still counts.
- class repomatic.init.local_edits.LocalEditGuard(package, previous)[source]¶
Bases:
objectSpot the overwrites of one
initrun that lose a local edit.- property shipped: frozenset[str] | None[source]¶
The digests of the files
previousbundled.Read on first use, so a run that overwrites no copy reads nothing.
Nonewhen the wheel could not be read.