fix: keep request payloads out of the issue store #23
Reference in New Issue
Block a user
Delete Branch "fix/no-store-for-label-payloads"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #19.
labels.pypassed the issue store to_gitea.apifor one reason only: therequest file needed somewhere to live. On a checkout without a store that
silently created
tmp/issues/.payload/— a store materialized as a side effectof an operation that has nothing to do with issues, and nothing said so.
What changed
Where a request body goes is now the transport's decision, not the caller's.
_gitea.pyresolvesPAYLOAD_ROOT(<repo>/tmp/payload) from its ownlocation, the same way
issue.store_rootandpage.store_rootdo, so everycaller writes to one directory whatever it was invoked from.
out_rootis gone fromapi()andadd_dependency(), and from all six callsites:
labels.py,push.py(x3),comment.py(x2),wiki_push.py(x2).Sync and wiki move together — no mixed state.
--dry-runor a run with nothing to send leaves nothing behind.tmp/is already gitignored, so the new location is covered.payload/beside
issues/andwiki/, not a dotdir among an issue's files. A storeholds the only copy of something; this holds debris kept for a retry.
Docs updated:
AGENTS.md(a new "Request payloads" section, pluslabels.pyin the repo layout),
skills/sync/SKILL.md,skills/wiki/SKILL.md.Acceptance criteria
labels.pyneither creates nor requires the issue store on any pathis visible
they all moved together
.gitignorecovers the new location (it is undertmp/)labels.pyon a tree withouttmp/issuesdoes not createit
Tests
tests/test_payload_root.py(new, 12 tests) runs the reallabels.pyinside athrowaway repository with a fake
teafirst onPATH— no network, and thedeveloper's own store is never in reach. It asserts that no store appears, that
the payloads land in
tmp/payload/and are the bodies actually sent, that adry run writes nothing, and that a run from a subdirectory still resolves to the
repo root. Two source checks keep the callers from drifting apart again.
Against the pre-fix tree these fail with
labels.py created the issue store.🤖 Generated with Claude Code