test: live-forge probe for repo protect set idempotency on slash-bearing pattern rules #397
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#397
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Follow-up from #375 (the
setcreate-or-update upsert).Gap
setdecides create-vs-update from a GET probe of the existing rule. #375 fixed a real bug where the branch-protection by-name client paths concatenated the rule name raw, so a slash-bearing pattern rule likerelease/*never matched the single-segment route: the probe 404d andsetalways re-created, breaking idempotency. The fixurl.PathEscapes the name in the get/update/delete client methods.The fix is verified by unit tests (
TestProtectSetCmdEscapesPatternNamepins the escaped wire path) and matches both the upstream Gitea SDK and the in-repo wiki-client precedent (client_wiki.go, legacy tracker 1203). The one link not machine-verified is the live forge's server-side routing of a%2F-encoded slash as a single{name}path segment. We have strong indirect evidence (the wiki client sends encoded slash-bearing segments against the live forge daily), so this is verification-completeness, not a suspected regression.Ask
Add a live-forge conformance probe: against a live Gitea/Forgejo, run
repo protect set release/*twice and assert the second run takes the UPDATE path (a 200 PATCH), not a duplicate-create error. This closes the last unverified link for pattern-rule idempotency.Related: #375.