Skip to content

feat: seed the SDK from its contribution to the Omnigent repository - #1

Merged
bdchatham merged 2 commits into
mainfrom
seed/go-client
Aug 5, 2026
Merged

feat: seed the SDK from its contribution to the Omnigent repository#1
bdchatham merged 2 commits into
mainfrom
seed/go-client

Conversation

@bdchatham

Copy link
Copy Markdown
Collaborator

Seeds this repository with the Go client that was offered upstream as omnigent-ai/omnigent#4010, at the maintainers' suggestion that it live in our organisation instead.

Why this is better than upstreaming, concretely

As a fork PR against their monorepo it could never pass CI. Every substantive check — pytest, integration, end-to-end, the Docker build — skipped behind a security gate that a fork touching CI cannot clear. Nothing meaningful had ever run against this code in the four rounds of review it went through. Here, the checks are the gate.

It also removes an indirection that was a small lie: a consumer declared a dependency on the upstream module path at v0.0.0 and rewrote it with a replace onto a pseudo-version of a personal fork. That becomes an ordinary dependency on a tagged module.

What moved

The hand-written client (client, session, stream, event, errors, list, doc) with its tests, the two generated files, the generator, and bin/check.sh. Module path rewritten throughout; nothing references the old one.

300 tests pass, -race included. bin/check.sh is green — CI invokes that same script rather than reimplementing its steps, so the two cannot drift.

Licensing — the one non-mechanical part

The repository was scaffolded MIT. That's wrong here.

models.gen.go and events.gen.go are generated from a vendored copy of the Omnigent OpenAPI specification and reproduce its schema descriptions verbatim as Go doc comments. The generated half is therefore a derivative of an Apache-2.0 input owned by Databricks, Inc. So this is Apache-2.0, with a NOTICE carrying that attribution.

The NOTICE is scoped rather than copied verbatim: upstream's lists its Python runtime dependencies — pyyaml, fastapi, thirty others — none of which this module contains. Apache-2.0 §4(d) provides for excluding notices that don't pertain to a derivative work.

A test caught this. TestModuleShipsItsOwnLicence was written when the module was nested inside the Apache-2.0 repository, to keep the licence inside the module zip. It failed on the move to the MIT scaffold, which is the only reason the relicensing didn't happen silently. Its rationale is rewritten for the new layout rather than left describing a nesting that no longer exists.

One thing for reviewers to know

The vendored spec at spec/openapi.json is a snapshot, and the README says so where a reader will meet it. Several defects in the first consumer of this SDK came from reasoning about server behaviour off a stale — or simply the wrong — copy of that specification. Refreshing it should be a deliberate act with a diff to read, not a background sync.

The Omnigent maintainers asked that this live in our own organisation rather than
upstream, and that turns out to fix a real problem rather than only a political
one. As a fork pull request against their monorepo it could never pass CI: every
substantive check — pytest, integration, end-to-end, the Docker build — skipped
behind a security gate that a fork touching CI cannot clear, so nothing
meaningful had ever run against this code. Here the checks are the gate.

It also removes an indirection that was a small lie. A consumer declared a
dependency on the upstream module path at v0.0.0 and rewrote it with a `replace`
onto a pseudo-version of a personal fork. That collapses into an ordinary
dependency on a tagged module.

What moved: the hand-written client (client, session, stream, event, errors,
list, doc) with its tests, the two generated files, the generator, and the check
script. The module path is rewritten throughout and nothing references the old
one. 300 tests pass, `-race` included, and bin/check.sh — the same script a
developer runs locally, invoked by CI rather than reimplemented so the two cannot
drift — is green.

Licensing, which is the one part that is not mechanical. The repository was
scaffolded MIT. That is wrong here: models.gen.go and events.gen.go are generated
from a vendored copy of the Omnigent OpenAPI specification and reproduce its
schema descriptions as doc comments, so the generated half is a derivative of an
Apache-2.0 input owned by Databricks. This is therefore Apache-2.0 with a NOTICE
carrying that attribution. The NOTICE is scoped rather than copied verbatim:
upstream's lists its Python runtime dependencies, none of which this module
contains, and section 4(d) provides for excluding notices that do not pertain to
a derivative work.

A test caught that. TestModuleShipsItsOwnLicence was written when this module was
nested inside the Apache-2.0 repository, to keep the licence in the module zip; it
failed on the move and is why the relicensing did not happen silently. Its
rationale is rewritten for the new layout rather than left describing a nesting
that no longer exists.

The vendored spec is a snapshot, and the README says so where a reader will meet
it. Several defects in the first consumer of this SDK came from reasoning about
server behaviour off a stale or simply wrong copy of that specification, so
refreshing it is a deliberate act with a diff to read, not a background sync.
Removing the working-directory that scoped every step into the nested module
left `defaults:` with no value. PyYAML reads that as null and accepts it;
GitHub's workflow schema rejects it, and the rejection is a startup_failure with
no jobs and no annotation — so there is nothing in the run to read.

The block existed only to enter sdks/go-client. The module is the repository root
now, so the key goes rather than getting an empty body.
@bdchatham
bdchatham merged commit b3a03b2 into main Aug 5, 2026
3 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.

1 participant