Repository navigation
Conversation
Blank, ordering, span and target rules on the /v1/manage and /v1/ops operations move into Resolve methods; provider-app and 10DLC refusals answer in fixed words.
tbarbugli
marked this pull request as ready for review
November 30, 2026 14:29
👋 Hi Tommaso, want a second pair of eyes on this?I'm Jeffery, Stream's review agent. I look for bugs, regressions, missing tests and slow paths, and I only post findings I've checked against the code.
Or comment |
This branch has not been deployed
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.
Why
The
/v1/manage/*and/v1/ops/*operations still validated their input by hand in handlers, which the go skill'sapi.mdrules say belongs in struct tags or aResolvemethod. Some refusals also put internal text (a store error, the operator's public URL) into the response.Changes
Resolvemethods: blank after trim,from/toordering, span and horizon, UTF-8 and NUL, limit subject/level/id rules, user and scope rules, allowed IP ranges, price-change content rules. Handlers keep only checks that need stored state.entriesrequired withminItems: 1,Idempotency-Keyrequired on create,maxLength: 255on both keys.aton the active price list is a typedtime.Timeparameter.Resolveonly and no schema tag changed.openapi.yamlregenerated: the only diff is in the staff-only price-change operations.validation_failedenvelope naming the field.manageActormiddleware (refuses before Huma binds), cursor errors (already fixed messages), and thegetSpendrenamed-parameter errors inserver.go.Validation
go build ./...,go vet ./internal/api,go vet -tags integration ./internal/apiandgo test ./... -count=1pass.ROUTER_POSTGRES_DSN; they compile, but none of their cases ran, so behaviour through the store is untested here.humatestor a chi router with no store, so a refused request never reaches a handler, and a valid one does.