fix(preflight): report branch protection read outcomes #1012
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1012
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/914-preflight-input-diagnostics"
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?
Refs #914
This adds input-aware diagnostics to the branch-protection preflight:
All outcomes remain fail-safe
WARN + proceed; the change does not assert a cause for the historical v0.46.0 wrong-skip.Verification:
go test ./... -count=1go vet ./...go build ./...golangci-lint run ./...after a clean cachebats --print-output-on-failure tests/go run ./cmd/rt fragment-check changelog.dReviewed exact head
e3d61588af5f64b45a62d94f49523210e007149eagainst basedf1e307c98276b1624db437c4e20fa0102305617.APPROVED. The shared scalar reader preserves the existing sentinel contract: 404 remains
ErrNotFound, strict 2xx shape failures remainErrUnexpectedResponse, transport failures remain broadErrAPIerrors, and other non-2xx responses now retain their status inHTTPStatusErrorwhile unwrapping toErrAPI. The preflight remains fail-safeWARN + proceed, while its diagnostics distinguish absent 404, hidden 403, decode/unreadable, other API status, and transport outcomes and include repo/branch/identity.The controls cover each diagnostic with inverse assertions, exercise a real 403 through the client, and retain the dry-run
GetReleaseByTagversus executing-read sentinel distinction. Exact-head local checks passed:go test ./... -count=1,go vet ./...,go build ./..., 118 Bats tests, fragment-check, and golangci-lint. Forgejo CI is 25/25 success at this head.