Repository navigation
fix: 清零车道 Y4 三单(#12-#14)——探针不再吞错 / 扫描触顶可判定 / Multiplier 缺省归一 - #15
Merged
Merged
Conversation
…SHA 触顶 yield ErrTooManyPages 与 Paginate 同纪律/RetryPolicy.Multiplier 零值按文档缺省 2.0 归一
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.
清零车道 Y4,base v0.16.0(master = 6e2a49c)。三单真缺陷逐条修复,每单配回归测试(
hardening_y4_test.go,与 #4-#10 的 hardening_test.go 同风格)。isNotFoundError改结构化判定——errors.As(*NotFoundError)+errors.As(*APIError)后比对 HTTP 状态码,字符串回落删除(手写contains/searchString一并删除);types.go的IsRepositoryStarred与pulls.go的IsPullRequestMerged两处裸strings.Contains(err.Error(), "404")改走同一 helper。7 个布尔探针方法不再吞错:404 ⇒ (false, nil),其余错误原样上抛。回归:403+路径含 404、500+body 含 404、真 404、结构化判定单测四组。ErrTooManyPages的错误(与同仓Paginate的 issue Paginate 无页数上限且不跟随 NextPage —— 服务端异常返回满页时无限游走(实测 300ms 发起 125589 次请求) #5 纪律同哨兵),不再与ErrActionRunNotFound共用出口;godoc 里写错的 "returns the last error of exhaustion" 改为实际语义。回归:恒返满页 ⇒errors.Is(err, ErrTooManyPages)且非ErrActionRunNotFound;短页收尾仍 NotFound;第 2 页命中仍返回 run。getRetryWaitTime补零值归一(与 Retry-After 解析缺三道闸:未夹 MaxBackoff(3600 秒照等)、负数秒产出负时长、HTTP-date 格式静默忽略退化成指数退避 #4 已归一的 InitialBackoff/MaxBackoff 同款),math.Pow(0, n>0)=0造成的「第 2 次起退避为 0」忙等复现路径关闭;Multiplier=1.0(恒定退避)是合法显式选择不归一。回归:漏填 vs 显式 2.0 退避序列一致且 >0、指数递增、1.0 恒定不吞。验证:GOWORK=off go build ./... / go vet ./... / go test ./... -race 全绿;gofmt clean。