chore: repository hygiene — .gitignore, artifact untracking, checksum automation#2
Merged
Conversation
Repository hygiene pass. No runtime logic changed. - .gitignore: new. Covers Python caches, virtualenvs, build output, test/coverage output, editor/OS files, and Relay build artifacts. - Untrack 47 .pyc files (cpython-312 and -314 were both committed) plus relay.pyz, SHA256SUMS.txt, and MANIFEST.txt. Files stay on disk. - build_release.py: now writes SHA256SUMS.txt alongside relay.pyz, so the checksum can no longer drift from the artifact. Previously SHA256SUMS.txt was maintained by hand and had already gone stale (its README.md and RELEASE_NOTES.md entries did not match the working tree). - Delete MANIFEST.txt: nothing in the repository generates or reads it. - CONTRIBUTING.md: fix clone URL (miter37/Relay -> miter37/Relay-agent); switch to `unittest discover` so add-agent tests are included; document the optional build step. - pyproject.toml: version is now read from relay.__version__ instead of being duplicated as a literal. Tests: 60 run, 9 pre-existing Windows failures (WinError 193 on the extensionless mock CLIs). Verified identical on unmodified master via a throwaway worktree, so this commit changes nothing about them. This is the cross-platform gap already recorded in docs/KNOWN_LIMITATIONS.md.
This was referenced Jul 23, 2026
miter37
added a commit
that referenced
this pull request
Jul 23, 2026
…one (#11) relay.pyz stopped being tracked in #2, but the documented install flow was still "git clone && run the installer" -- and the installers hard-failed when the file was absent. Since no release has been published yet, the fallback they suggested ("use the packaged release") did not exist either, so a fresh clone could not be installed at all. Both installers now build the artifact themselves when it is missing and a build_release.py is present, and only fail if it is still absent afterwards. The Python version check moved above the build, since the build needs it. README documents both paths: build from source (default) or download the release asset.
miter37
added a commit
that referenced
this pull request
Jul 23, 2026
Pushing a tag matching v* now builds and publishes the release. Nothing is built or uploaded by hand. The workflow refuses to publish unless everything agrees: - the tag must match relay.__version__ (single source of truth since #2) - RELEASE_NOTES.md must name the version being released - the full test suite must pass - the built relay.pyz must actually execute All four run before the release is created, so a mislabelled or broken release cannot reach users. build_release.py emits relay.pyz and SHA256SUMS.txt in one run, so the checksum cannot drift from the artifact. Also documents the procedure in CONTRIBUTING.md -- releases are infrequent enough that an undocumented process is a forgotten one -- and records in the self-update spec that release assets are the only source of truth for relay.pyz and SHA256SUMS.txt, so `relay update` has no ambiguity about where to fetch from.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repository hygiene pass from the audit in
docs/Relay-agent_repo_audit.md(P0 items 1.1–1.4). No runtime logic changed.What changed
.gitignore.pycfilesrelay.pyz,SHA256SUMS.txtMANIFEST.txtSHA256SUMS.txtgenerationbuild_release.pymiter37/Relay(404)miter37/Relay-agentpyproject.tomlrelay.__version__Why the checksum change matters
SHA256SUMS.txtwas maintained by hand and had already gone stale — itsREADME.mdandRELEASE_NOTES.mdentries did not match the working tree after the add-agent commit. The committedrelay.pyzwas also two commits behind and did not contain theadd-agentcommand at all, while its checksum still validated cleanly. A hand-maintained checksum that certifies a stale artifact is worse than no checksum.build_release.pynow emits both files together, so they cannot drift apart.Verification
python build_release.py→ rebuilt artifact hashf8e1e054…matchesSHA256SUMS.txtpython relay.pyz version→ runs;add-agentpresent in--help.gitignoreconfirmed working: reran the suite, regenerated.pycfiles produce zero git changesgit ls-files→ no__pycache__,.pyc,relay.pyz,SHA256SUMS.txt, orMANIFEST.txtTest status — please read
python -m unittest discover -s tests→ 60 run, 9 errors.These 9 failures are pre-existing and unrelated to this PR. They were reproduced identically on unmodified
master(33a9be6) in a throwaway worktree — same 9 test names, sameWinError 193on the extensionless mock CLIs under Windows. This is the cross-platform gap already documented indocs/KNOWN_LIMITATIONS.md, and is exactly what the CI workflow (next PR) is meant to surface.Not included
History rewriting. Past
.pyccommits remain in the log; removing them would rewrite every commit hash for no meaningful size benefit.