Skip to content

feat(go): add HTTP errors and shared Problem Details conformance - #27

Merged
KyleJune merged 3 commits into
mainfrom
go/http-error
Dec 6, 2026
Merged

KyleJune merged 3 commits into
mainfrom
go/http-error

Conversation

@KyleJune

@KyleJune KyleJune commented Dec 5, 2026

Copy link
Copy Markdown
Member

Implements the Go module in go/ using the standard library. The same error can be inspected with errors.As, serialized with encoding/json, or written to a net/http response. The parser retains literal extension keys, null values and numeric representations. Response writing preserves ordered Set-Cookie values and conversion discards upstream headers.

Tested with Go 1.27.4 using go test -race ./..., go vet ./... and go mod verify. The shared fixture supplies 27 serialization cases, 26 parser cases and 200 status defaults. CI also runs Staticcheck and govulncheck.

Closes #24 and closes #25. Part of udibo/oauth2#419.

KyleJune added a commit to udibo/oauth2 that referenced this pull request Dec 5, 2026
)

## Summary

Start the Go implementation with the public HTTP error boundary, clock
and expiry rules, PKCE, Basic credentials, scope parsing, discovery
cache and atomic DPoP replay store. The Go error renderer consumes the
untagged http-error implementation from udibo/http-error#27.

## Changes

- Add the Go module, porting guide, export map and vector inventory.
- Exercise both OAuth error formats, ordered Set-Cookie headers, literal
keys, null extensions and every shared expiry case.
- Add adapter contract suites for discovery and replay. Compare
successful Go test IDs with the shared catalog in CI.
- Record pending server, client and cross scenarios and uncovered store
IDs with tracking issues. This increment covers 9 of 339 contracts and 4
of 19 vector files. All 146 HTTP scenarios await harness integration.

## Testing

Go 1.27.4 race tests, vet, module verification, Staticcheck and
govulncheck. The CI matrix also runs the minimum supported Go 1.26
series.

## Related Issues

Part of #419, #420, #421 and #423.

Co-authored-by: Kyle June <openai@kylejune.com>
@KyleJune KyleJune mentioned this pull request Dec 5, 2026
5 of 17 tasks
@KyleJune
KyleJune merged commit e1128ef into main Dec 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run all Problem Details vectors against Go in CI Implement the Go HTTP error and Problem Details API

1 participant