Skip to content

Add Gerrit client wrapper - #27

Merged
xobotyi merged 3 commits into
mainfrom
feat/gerritclient
Jul 10, 2026
Merged

Add Gerrit client wrapper#27
xobotyi merged 3 commits into
mainfrom
feat/gerritclient

Conversation

@xobotyi

@xobotyi xobotyi commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

The single seam all Gerrit traffic flows through: authenticated go-gerrit client with startup credential validation (self-account fetch) and error-body recovery — go-gerrit's errors carry only the status line while the response body holds Gerrit's actual message; apiError reads it (capped, XSSI-stripped) into structured fields. A learning test pins the library contract this rests on (non-2xx responses returned unread/unclosed).

Also carried here:

  • .claude/rules/golang.md — path-scoped Go conventions rule (golib/e mandatory, golib/must boundaries, testify/black-box testing)
  • config error handling refactored to golib/e per that rule

Dependencies (latest): andygrunwald/go-gerrit v1.1.1, dev.gaijin.team/go/golib v0.8.1.

Closes #4

xobotyi added 3 commits July 10, 2026 21:27
Path-scoped agent rule for Go files: golib/e structured errors with
sentinels-as-objects and field-carried context, golib/must boundaries,
testify-only testing with black-box naming, godoc and Run/Start
conventions.
Sentinels become e.New objects; dynamic context moves from message
interpolation into structured fields per the Go conventions rule.

go.mod gains golib (used here) and go-gerrit (used by the following
commit).

Refs: #3
Authenticated go-gerrit client with startup credential validation via
the self account. apiError recovers Gerrit error response bodies the
library discards - on non-2xx go-gerrit returns the response unread
and unclosed, a contract pinned by a learning test - and attaches
status and message as structured fields.

All Gerrit traffic flows through this package; scoping restrictions
hook in here later.

Refs: #4
@xobotyi
xobotyi merged commit b709469 into main Jul 10, 2026
4 checks passed
@xobotyi
xobotyi deleted the feat/gerritclient branch July 10, 2026 19:32
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.

Implement Gerrit client wrapper

1 participant