Classify invalid delivery destinations during preflight
This commit is contained in:
@@ -170,9 +170,10 @@ both credential sources, returns status 2. Omission of `token_file` retains
|
||||
environment-only loading.
|
||||
|
||||
After resolving the token, delivery performs an authenticated, read-only
|
||||
repository access check. Missing or rejected credentials, known insufficient
|
||||
permissions, and inaccessible destinations are configuration/credential
|
||||
failures. An unavailable service or canceled check is an operational failure.
|
||||
repository access check. Invalid destination settings, missing or rejected
|
||||
credentials, known insufficient permissions, and inaccessible destinations are
|
||||
configuration/credential failures. An unavailable service or canceled check is
|
||||
an operational failure.
|
||||
See the [CLI contract](cli.md) for exact exit statuses. Successful preflight
|
||||
confirms authentication and repository access and accounts for any exposed
|
||||
delivery-permission deficiency. It does not guarantee later release or asset
|
||||
|
||||
@@ -168,9 +168,10 @@ should follow credential verification. The check needs no checkout or published
|
||||
tag and performs no test release or upload. For Gitea it verifies authenticated
|
||||
repository access; exposed metadata can identify known deficiencies, but
|
||||
successful preflight does not guarantee later release or asset writes. A
|
||||
`DeliveryPreflightError` identifies missing credentials, rejected credentials,
|
||||
known insufficient permissions, an inaccessible destination, or unavailable
|
||||
verification. Its `Unwrap` method preserves the cause for `errors.Is` and
|
||||
`DeliveryPreflightError` identifies invalid destination settings, missing or
|
||||
rejected credentials, known insufficient permissions, an inaccessible
|
||||
destination, or unavailable verification. Its `Unwrap` method preserves the
|
||||
cause for `errors.Is` and
|
||||
`errors.As`. A 403 means access was denied, not necessarily that a token
|
||||
expired; a 404 can mean a missing repository or hidden access.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Remediation: forge boundary and credential preflight review
|
||||
|
||||
Status: open; the findings below are unaddressed.
|
||||
Status: remediation in progress; completion is recorded per issue below.
|
||||
|
||||
## Review baseline and scope
|
||||
|
||||
@@ -31,7 +31,14 @@ separate Git authentication and completion semantics.
|
||||
|
||||
## 1. Complete local destination preflight error handling — P2
|
||||
|
||||
Status: open.
|
||||
Status: complete.
|
||||
|
||||
**Completed:** Added the facade-owned `DeliveryPreflightInvalidDestination`
|
||||
classification, preserved the adapter's validation cause, and mapped it to CLI
|
||||
status 2 for ordinary and CI delivery. Updated consumer/configuration guidance.
|
||||
Focused standalone, automatic, and CLI regressions cover invalid URLs, owners,
|
||||
and repository names, early termination, and absence of hosted/build work.
|
||||
Focused preflight tests and the compiled API/dependency check passed.
|
||||
|
||||
**Evidence:** [Gitea preflight](../../internal/gitea/backend.go),
|
||||
[public error conversion](../../delivery.go), and
|
||||
|
||||
Reference in New Issue
Block a user