Skip to content

docs: Weaviate v6 Go client — Go docs CI lane, tested go6 snippets (connect + CRUD), language tab - #480

Draft
g-despot wants to merge 22 commits into
mainfrom
docs/go-v6-scaffold
Draft

docs: Weaviate v6 Go client — Go docs CI lane, tested go6 snippets (connect + CRUD), language tab#480
g-despot wants to merge 22 commits into
mainfrom
docs/go-v6-scaffold

Conversation

@g-despot

@g-despot g-despot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What

Foundational documentation support for the new Weaviate v6 Go client (github.com/weaviate/weaviate-go-client/v6), mirroring the java-v6 rollout: the CI lane + tested module + a parallel go6 language tab, plus the first slice of real v6 content (connect + object CRUD). Further increments (search, aggregate, collections config, tenants, RBAC, backup, aliases) will follow.

CI + infrastructure

  • test-go CI job in docs_tests.yml (mirrors Test Java): clones the go-client at go_client_branch (default v6), injects a -replace, runs the Go snippet tests. New go_client_branch workflow_dispatch input.
  • _includes/code/go-v6/ — a tested Go module.
  • go6 "Go v6" language tab with a go6 <-> go fallback, so a global "Go v6" selection degrades to the v5 Go tab on pages without a v6 snippet.
  • Branch-scoped CI gate: a workflow_dispatch on this branch runs only the Go job (the other languages are skipped) to avoid cross-language noise while iterating; main and the weekly schedule still run everything.

Content (increment 3a)

  • client-libraries/go.md — v6 preview admonition + "What changed in the v6 client" section.
  • Connect (connect-local, connect-cloud, OIDC include) and object CRUD (create / read / update / delete, cross-references) gain go6 tabs.
  • Operations not yet in the v6 client (partial update, fetch-by-id, cross-reference update/delete) render a "Coming soon" go6 tab rather than an empty panel.

Pre-release note

The v6 client is pre-release (v6.0.0-alpha.4) and not yet on the Go module proxy, so go.mod intentionally has no replace directive; CI injects it from a clone of the v6 branch (mirroring the Java lane). Editors show import errors on the committed state; that is expected and resolves under the CI replace. Draft until more of the surface lands.

Testing

The test-go lane passed in CI (4 smoke tests green against the live v6 client). Locally, go vet / go build pass against the v6 source; the doc build + full live snippet run are covered by this PR's checks and the Go-only dispatch.

…nguage tab

Bootstraps CI for the Go client (previously zero Go docs coverage), scope-capped
to a smoke set: connect, create-collection, insert, basic fetch.

- _includes/code/go-v6/: new Go module with // START/// END-marked *_test.go
  snippets for the four smoke ops, plus main.go anchor and shared helpers.
  Committed go.mod requires a placeholder version with no replace; the client
  is not on the module proxy yet, so CI redirects it to a fresh clone.
- .github/workflows/docs_tests.yml: new test-go job mirroring test-java
  (setup-go, clone + go mod edit -replace + go mod tidy, pytest -m go, same
  handle-test-results wiring), a go_client_branch dispatch input defaulting to
  the branch tip, and a GO_VERSION env. Ollama/Keycloak steps omitted (the
  smoke set needs neither embeddings nor OIDC).
- tests/test_go.py + go marker in pytest.ini: pytest wrapper shelling go test.
- src/theme/Tabs/index.js: go6 LANGUAGE_CONFIG entry plus a go6<->go family
  fallback so a global "Go v6" selection degrades to the Go tab instead of a
  dead panel. FilteredTextBlock.js gains a matching go6 DOC_SYSTEMS entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 1   low 0   info 0 View in Orca
☢️ The following Vulnerabilities (CVEs) have been detected
PACKAGE FILE CVE ID INSTALLED VERSION FIXED VERSION
high google.golang.org/grpc ...es/code/go-v6/go.mod GHSA-hrxh-6v49-42gf v1.81.1 1.82.1 View in code

g-despot added 3 commits July 22, 2026 18:19
…e 3a)

Focused v6 Go client rollout: document the implemented surface with tested
snippets, Coming-soon placeholders only where a touched page needs a go6 tab
for a not-yet-implemented feature.

Snippets (tested module _includes/code/go-v6/, mirrors the java-v6 lane):
- connect_test.go: NewLocal, custom host+port, local API key, local + cloud
  third-party header keys, NewWeaviateCloud, OIDC bearer token.
- manage_objects_test.go: Data.Insert (create), full Data.Replace (update),
  Data.Delete (by id), Data.DeleteSelected (delete-many by filter); placeholders
  for partial merge and fetch-by-id.
- cross_references_test.go: Data.AddReferences (one-way); placeholders for
  cross-reference delete and update.

Docs:
- client-libraries/go.md: :::info Go client v6 admonition + "What changed in the
  v6 client" section (language-agnostic prose, no version numbers, no em dashes).
- connections/connect-local, connect-cloud, oidc-connect include: go6 tabs.
- manage-objects/create, update, delete, read; manage-collections/cross-references:
  go6 tabs.

Validated locally with the CI replace injected: go mod tidy && go vet ./... &&
go build ./... && go test -run '^$' ./... all pass; committed go.mod keeps
require-no-replace.
…oon panels, go tab highlight)

- go.md: fix broken how-to link ../../guides.mdx -> ../guides.mdx (target is
  docs/weaviate/guides.mdx; matches sibling csharp.mdx).
- go-v6 placeholders: move the TODO[g-despot] lines above the START markers in
  all 4 Coming-soon blocks (manage_objects_test.go UpdateMerge/ReadObject,
  cross_references_test.go Delete Go/Update Go) so the rendered Go v6 tab shows
  only "// Coming soon"; TODOs stay in-file and greppable (java-v6 convention).
- connect-cloud.mdx: fix syntax highlighting on the two v5 Go tabs
  (language="py" -> "go" for APIKeyWCD and ThirdPartyAPIKeys).

Validated: go vet ./... && go build ./... pass with CI replace injected; committed
go.mod keeps require-no-replace. All 4 placeholder START..END regions confirmed to
contain only "// Coming soon".
@g-despot g-despot changed the title docs(ci): add Go v6 (go6) snippet-test lane, tested module, and language tab [scaffold] docs: Weaviate v6 Go client — Go docs CI lane, tested go6 snippets (connect + CRUD), language tab Jul 22, 2026
g-despot and others added 11 commits July 22, 2026 21:05
Add tested Go v6 snippets and parallel go/go6 tabs across the search and
aggregate how-to pages, continuing the focused v6 rollout.

Snippets (tested module _includes/code/go-v6/, compiled against v6 @f4fde3e):
- search_basic_test.go: OverAll fetch variants (list, limit, offset,
  properties, vector, id, cross-refs, metadata, multi-tenancy).
- search_test.go: NearText, NearVector, named-vector nearText, distance
  cutoff, limit/offset, autocut, group-by, filtered vector search.
- hybrid_test.go: Hybrid basics, score, alpha, fusion, properties, property
  weighting, explicit vector, limit, autocut, filter.
- filters_test.go: query/filter Cond/And/Or/Not, contains-any/all/none, like,
  reference-path, len, id/timestamp/null-state, near-text + filter.
- aggregate_test.go: Aggregate.OverAll (count, text, integer, group-by) plus
  Aggregate.NearVector.
- search_placeholders_test.go: Coming-soon placeholders (skip + marker) for
  near-object, geo filter, aggregation over near-text/hybrid, filtered
  aggregation.

Docs: go6 tabs added beside the existing go tabs on search/basics,
search/similarity, search/hybrid, search/filters, search/aggregate.

Validated with the CI replace injected: go vet ./... && go build ./... &&
go test ./... -run '^$' all pass; committed go.mod keeps require-no-replace.
…arget (phase 3c)

Phase 3c of the Weaviate v6 Go client docs: add parallel "Go v6" (go6)
tabs beside the existing "Go" tabs for the fully-implemented management
APIs, backed by real, compile-verified snippets under
_includes/code/go-v6/.

Snippet files (package main, compile-only; runtime tests skip and stay
out of test_go.py's -run set):
- tenants_test.go     multi-tenancy: MT config + auto-tenant, tenant
                      Create/Get(list)/Delete, tenant-scoped
                      insert/search/cross-ref
- rbac_test.go        roles (create with each permission category,
                      add/remove permissions, exists/get/list/assigned
                      users/delete), DB + OIDC users, OIDC groups,
                      role->group assignments
- backup_test.go      Create/Restore + Get*Status + Cancel* + await
                      helpers (AwaitCompletion / WithPollingInterval)
- aliases_test.go     alias Create/List/Get/Update/Delete + use-in-query
- multi_target_test.go  multi-target vectors: Sum/Min/Average/
                      ManualWeights/RelativeScore, Weighted, VectorName

Pages updated (63 go6 tabs total): multi-tenancy, collection-aliases,
rbac/manage-roles, rbac/manage-users, rbac/manage-groups, deploy backups,
search/multi-vector.

Two "// Coming soon" placeholders for ops the v6 client does not expose
yet: collection Update (UpdateAutoMT) and list-known-OIDC-groups
(GetKnownOidcGroups).

Verified: go vet ./... and go build ./... pass against the local v6
client via a temporary replace directive (dropped before commit);
go.mod/go.sum unchanged; gofmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…hase 3d)

Add "Go v6" tabs only on config sections the v6 Go client actually
implements: collection create/read/exists/list, properties + data types +
tokenization + nested, named/multi vectors, model2vec + self-provided
vectorizers, HFresh vector index, RQ compression, inverted index / BM25 /
stopwords, sharding, and replication.

Sections where v6 does not yet implement the operation (collection
update/alter, add-property, add named vectors to existing, multi-vector
embeddings, drop inverted index, PQ/BQ/SQ, non-model2vec vectorizers,
generative/reranker config, enable-compression-on-existing) get no go6 tab
and no placeholder; their existing go (v5) tab is left untouched.

Snippets live in _includes/code/go-v6/ (manage_collections_test.go,
vector_config_test.go, collection_config_test.go, compression_test.go),
verified against the v6 source at /private/tmp/go-client-v6 with
go vet ./... and go build ./... under a local replace directive. Config
snippets t.Skip a live server and stay out of the CI -run set.
…s stay compile-only

The test_manage_collections run pattern `TestCreateCollection` is an
unanchored regex that now also matches the new compile-only config tests
(TestCreateCollectionWithProperties / WithVectorizer / WithNamedVectors).
Anchor it to `TestCreateCollection$` so the CI run-set is exactly the
intended base smoke test; the new config tests stay out of the -run set and
remain compile-only (mirrors how 3b/3c model-dependent tests are handled).
…nce is anonymous)

TestConnectLocalAuth called NewLocal(WithAPIKey(...)), which dials the default
localhost:8080. In docs CI that port is the ANONYMOUS instance, so the auth
header returns HTTP 401. The API-key instance runs on a separate non-default
port (8099/50052) that NewLocal's defaults cannot target, and Go snippets are
not port-substituted the way Python/TS snippets are. Its old skip-guard
(WEAVIATE_API_KEY == "") did not fire because CI sets WEAVIATE_API_KEY.

Fix: make TestConnectLocalAuth skip unconditionally with a clear reason, keeping
the displayed NewLocal(WithAPIKey(...)) snippet idiomatic (java-v6 instead hard-
codes CI ports 8099/50052 into its rendered snippet; we keep ours clean and skip).

Also rename TestConnectWeaviateCloud -> TestConnectCloud so it falls inside the CI
run-set regex (TestConnectLocal|TestConnectCloud) and skips cleanly via its
WEAVIATE_URL guard.

Connect run-set audit (go test -run 'TestConnectLocal|TestConnectCloud'):
- TestConnectLocalNoAuth: runs, passes (anon 8080 smoke).
- TestConnectLocalAuth: runs, SKIPS (was 401).
- TestConnectLocalThirdPartyAPIKeys: runs, skips when COHERE_API_KEY unset
  (harmless header on anon 8080 if set).
- TestConnectCloud / TestConnectCloudThirdPartyAPIKeys: run, SKIP (WEAVIATE_URL unset).
- TestConnectCustomURL / TestConnectOIDC: not matched by the regex, not run.

Validated: go vet ./... && go build ./... pass with CI replace injected; go.mod
keeps require-no-replace.
Broaden the Go v6 docs lane past the 4-test smoke set so every snippet
test that needs NO new provisioning executes live against the anonymous
:8080 instance CI already starts.

test_go.py: replace the four narrow `-run`-pattern parametrized cases
with a single `@pytest.mark.go` test that runs the whole suite
(`go test ./... -v -count=1`, no `-run`). Selection is now by `t.Skip`,
not a run pattern: every test without a skip executes; every test with
one is excluded. Failure formatting/truncation is unchanged.

go-v6 module: make `t.Skip` presence match the Tier-1 boundary.
- Un-skip 10 Tier-1 tests that self-seed with BYO vectors (no vectorizer,
  auth, or external seed): TestBasicCreateCollection,
  TestCreateCollectionWithProperties, TestCheckIfExists,
  TestReadAllCollections, TestEnableMultiTenancy, TestEnableAutoMT,
  TestEnableInvertedIndex, TestSetInvertedIndexParams,
  TestShardingSettings, TestDistanceMetric.
- Add `t.Skip("enabled in a later CI tier")` to 28 non-Tier-1 tests that
  the whole-suite run would otherwise execute and fail (they need a
  vectorizer / seed / auth): all of filters_test.go (14) and
  hybrid_test.go (10), plus TestGetWithCrossRefs, TestMultiTenancy
  (search_basic), TestGetNearText, TestNamedVectorNearText.

Result: the non-skipped set is exactly the 33 Tier-1 tests plus the 4
pre-existing baseline smoke tests (TestConnectLocalNoAuth,
TestCreateCollection, TestCreateObject, TestBasicQuery). Tiers T2-T6
(seed/auth/vectorizer) stay skipped. `go vet`/`go build` clean under the
local client replace; go.mod left with no replace directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
test_go.py: on failure, list EVERY `--- FAIL:` line grepped from the full
captured stdout (the tail alone can hide failures that occurred early in
the run) and bump the stdout tail from 80 to 200 lines, so each CI run
surfaces the complete failure set. Also drop the unused `result` capture.

TestReplaceObject: skip with a documented reason. Root cause is a
go-client v6 (alpha) bug, NOT the snippet: Data.Replace serializes the PUT
body without the object id (sends it only in the URL path), but Weaviate's
class-scoped PUT handler requires the body id to equal the path id
(usecases/objects/update.go), so the server returns HTTP 422 "field 'id'
is immutable". The published UpdateReplace snippet is already idiomatic and
carries the UUID; re-enable once the client sends the id. Needs a client
fix (escalated on board 37ea394e).

TestDeleteMany: left running (not skipped). Verified against source: the
seed inserts category="GEOGRAPHY" which the category==GEOGRAPHY filter
matches, the filter targets a filterable text property (same filter.Cond
pattern that passes in TestGetWithFilter), and the res.Errors loop is a
correct no-op when Verbose is unset -- so there is no static defect to fix.
Single-object Data.Delete (TestDeleteObject) passes, so this is
batch-delete-specific; its true runtime error will surface via the
improved reporting on the next CI run.

Tier-1 boundary otherwise unchanged; no new tests un-skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…eMany; triage aggregate

test_go.py: on failure, extract each failing test's own RUN..FAIL block from
the captured stdout (walking back from `--- FAIL: TestX` to `=== RUN   TestX`)
and include every block in the pytest.fail details, alongside the failing-test
name list and the 200-line tail. Early failures (e.g. the aggregate tests,
which run first) no longer lose their real error to the tail.

TestConnectOIDC: skip. The default-port CI instance is anonymous with no OIDC
provider, so dialing it with a bearer token fails discovery with HTTP 404
"get openid configuration". OIDC needs an OIDC-configured instance (a later
tier). Snippet unchanged.

TestDeleteMany: skip. Confirmed CLIENT bug (not the snippet): Data.DeleteSelected
panics because *api.DeleteObjectsRequest is not wired into the gRPC transport
dispatch (internal/api/transport/transport.go:129-144 has no BatchDeleteRequest
case) -> dev.Assert(false, "...does not implement MessageMarshaler..."). Snippet
unchanged. Escalated on board 37ea394e.

Aggregate (5 tests): triaged, LEFT RUNNING. Not the same class of bug -- the
transport DOES have the aggregate case (transport.go:133), AggregateRequest
implements the full Message interface, and request-building / single-result
parsing are structurally sound. So aggregate is not clearly broken client-side;
Task-1 reporting will surface each test's real error on the next run. (One
caveat noted: internal/api/aggregate.go:293 by.GetPath()[0] could index-panic on
an empty group path, but that affects only GroupBy, not all five.)

go vet + go build clean under the local client replace; go.mod left with no
replace directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…esh distance test on old CI server

setupJeopardySearch built the "default" named vector as an empty VectorConfig
`{}`. That serializes to an empty vectorConfig.default, which the server rejects
at create time with HTTP 422 code 602 "vectorConfig.default in body is required"
(entities/models/class.go:217 validate.Required fails on the zero value). This
blocked ALL of search_basic_test.go, search_test.go, and aggregate_test.go (~16
tests) via their shared seed.

Not a client bug: the VectorConfig doc contract (collections/collection.go:86-91)
says that when no vectorizer module is selected the field must be set to the
"none" option. HELPER FIX: setupJeopardySearch now uses
`{Vectorizer: selfprovided.Vectorizer}` (Name() == "none"), which makes the
config non-zero; no index is required (the server defaults vectorIndexType to
hnsw). The fix is outside the // START/// END markers, so the published snippets
are unchanged. This unblocks the ~16 seed-dependent tests.

TestDistanceMetric: skipped. It creates its own collection with an explicit
selfprovided vectorizer, so it never hit the 602 -- it fails because it sets the
distance on vectorindex.HFresh, the v6 client's ONLY registered index, and docs
CI pins WEAVIATE_VERSION 1.35.0, which predates HFresh and rejects it with
HTTP 422 "invalid vector index 'hfresh'". No HNSW index type exists in the v6
client to substitute, so this needs a newer server (>= 1.37). Snippet unchanged.

Note: docs CI runs Weaviate 1.35.0 (docs_tests.yml), not the 1.38 the CodeBrief
assumed -- relevant for any version-gated feature.

go vet + go build clean under the local client replace; go.mod has no replace
directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…ectors idiom)

Add Name: "default" to the target vector in the 7 NearVector query snippets
(6 in search_test.go, 1 in aggregate_test.go) so the query target matches the
seed collection's "default" named vector, instead of sending an empty-name
target that the server cannot resolve. This is the correct v6 named-vectors
idiom (cf. example/basic/main.go). Approved published-snippet change.

The 6 search NearVector tests now pass live against Weaviate 1.38.

Two tests surfaced separate, newly-unmasked blockers and are skipped with
accurate reasons pending decisions:
- TestAggregateNearVector: Weaviate 1.38 panics server-side (nil pointer) on
  aggregate near-vector over a BYO/selfprovided collection, for every query
  shape tested. Core/server bug; the snippet is wired to no docs page.
- TestDistanceMetric: HFresh IS supported on 1.38 (the "1.35.0" WEAVIATE_VERSION
  workflow var is stale/unused; the compose files pin 1.38.0) — this corrects
  the old, false skip reason. Remaining blocker: HFresh requires
  maxPostingSizeKB >= 8, but the published vector-config.mdx snippet leaves it
  at 0. Verified MaxPostingSizeKB: 8 fixes it; the published-content change is
  pending sign-off.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
The DistanceMetric snippet built vectorindex.HFresh with maxPostingSizeKB at
the zero value, which Weaviate 1.38 rejects at create time (HTTP 422
"invalid hfresh config: maxPostingSizeKB is '0' but must be at least 8").
Set MaxPostingSizeKB: 8 in the displayed snippet (verified live to fix the
422) and remove the t.Skip so TestDistanceMetric runs in CI. HFresh is
supported by the docs-CI server (1.38); the stale "1.35.0" WEAVIATE_VERSION
workflow var is unused. Corrected comment retained.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Failed Failed Vulnerabilities high 1   medium 3   low 0   info 0 View in Orca
☢️ The following Vulnerabilities (CVEs) have been detected
PACKAGE FILE CVE ID INSTALLED VERSION FIXED VERSION
critical github.com/getkin/kin-openapi ...es/code/go-v6/go.mod GHSA-r277-6w6q-xmqw v0.139.0 0.144.0 View in code
high golang.org/x/net ...es/code/go-v6/go.mod CVE-2026-46600 v0.55.0 0.56.0 View in code
high golang.org/x/text ...es/code/go-v6/go.mod CVE-2026-56852 v0.37.0 0.39.0 View in code
high google.golang.org/grpc ...es/code/go-v6/go.mod GHSA-hrxh-6v49-42gf v1.81.1 1.82.1 View in code

g-despot and others added 7 commits July 30, 2026 13:54
…ility)

Replace the single opaque test_go_v6_suite (which reported "1 passed / 354
deselected" and hid the real Go pass/skip/fail breakdown) with one pytest case
per Go test function.

- A session-scoped fixture (go_suite_results) runs the suite ONCE via
  `go test ./... -json -count=1` in _includes/code/go-v6 and parses the JSON
  events into {topLevelTest: {outcome, output}}.
- Test names are discovered by a cheap static scan of `func TestXxx(t *testing.T)`
  in the *_test.go sources (no `go test -list`), so importing this module in the
  non-Go pytest jobs never spawns the Go toolchain. The suite has no subtests,
  so the scan matches the -json results 1:1; subtests (if added) roll up to
  their parent.
- Each @pytest.mark.go param maps its result: pass -> pass, skip -> pytest.skip
  with the reason pulled from the test's output, fail -> pytest.fail with that
  test's captured output. A build failure yields zero results and raises
  GoBuildError loudly with the compiler + stderr output.

Reporting only: no *_test.go snippet or t.Skip changed; `go` marker and its
pytest.ini registration preserved. pytest -m go now collects 150 cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…(self-seed + async-index settle)

Un-park the T2 snippet tests that run against the anon :8080 instance and only
need richer self-seeding (no vectorizer, no auth). All new seed/connect helpers
live outside the START/END markers, so the displayed snippets are unchanged.

Seed helpers added (main_test.go / topical files):
- setupJeopardyDemo: full JeopardyQuestion schema (question/answer/category/round/
  points/dateRecorded[date]) + hasCategory ref to a seeded JeopardyCategory, with
  the inverted-index null-state/property-length/timestamp flags on so those filters
  do not error.
- createMultiTenancyCollection / setupMultiTenancy: MT MultiTenancyCollection
  (+ hasCategory ref to JeopardyCategory) and tenantA, seeded.
- setupMultiTenancyJeopardy: MT JeopardyQuestion for the multi-tenancy read snippet.
- setupArticleForAliases (+ ensureAlias): Article/ArticlesV2 and a per-test alias so
  the alias lifecycle runs order-independently.
- setupJeopardyTiny: two BYO named vectors for multi-target near-vector.

Flake guard: waitForCount polls Aggregate.OverAll TotalCount (bounded 30s) after
every seed, so the ASYNC_INDEXING instance settles before the test queries.

Un-skipped: filters (Single, MultipleFiltersAnd, MultipleFiltersNested, ContainsAny,
ContainsAll, ContainsNone, Like, ById, PropertyLength, PropertyNullState, ByDate,
ByTimestamp, CrossReference); search_basic (GetWithCrossRefs, MultiTenancy); tenants
(AddTenantsToClass, ListTenants, RemoveTenants, CreateMtObject, MtSearch, MtAddCrossRef);
aliases (all 7); multi-target (NearVector, MultipleNearVectorsV1, MultipleNearVectorsV2).

Kept skipped: near-text/hybrid/named-vector (T3), RBAC (T4), Data.Replace,
Data.DeleteSelected, aggregate-near-vector, and the not-yet-supported placeholders.
…-bug ops

Tier-2 CI reported 18 Go failures. Root causes and dispositions:

- TestListTenants PANICKED (Tenants.Get -> *api.GetTenantsRequest is not wired
  into the gRPC transport MessageMarshaler switch; hits dev.Assert(false)). A
  panicking test aborts the whole `go test` binary, so every test scheduled
  after it produced no result — the 7 vector_config tests (all t.Skip) and 4
  MT tests. That is why vector_config "regressed": the binary never reached
  them, not cross-test contamination. Skipped TestListTenants (client bug,
  escalate); this un-blocks all 11 "did not run" tests.

- "invalid UUID (got 15 bytes)" on filters/search (5 tests): Weaviate's gRPC
  search reply encodes the object id in `id_as_bytes`, which drops leading
  zero bytes. filterByIdSeedUUID began 0x00 ("00037775-…") -> 15 bytes ->
  client uuid.FromBytes rejects the whole reply, failing every query over the
  collection (empirically confirmed live: 0x00 -> 15 bytes, 0x0000 -> 14).
  Gave filterByIdSeedUUID (and the matching FilterById snippet) and every
  setupJeopardyDemo object a fixed, non-leading-zero id — deterministic and
  leading-zero-safe.

- TestMultiTargetMultipleNearVectorsV2: the Go client de-duplicates
  TargetVectors but sends one weight per query vector, so a repeated weighted
  target yields len(weights)=3 vs len(targets)=2; Weaviate 1.38 rejects it.
  The Python/Java clients duplicate the target name to match the weights; the
  snippet is idiomatic. Skipped (client bug, escalate).

All seed helpers already delete-before-create, so the sequential run is
order-independent. Validated: go vet ./... and go build ./... clean against a
reconstructed origin/v6 client; multi-target V1 passes, the 4 MT ops (insert,
tenant query, tenant AddReferences, delete-unknown-tenant) pass live, and the
two skips register. Reproduced against local Weaviate 1.38.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…extionary seed)

Enable the vectorized search tests against the anon :8080 instance's
text2vec-contextionary module (no new Docker image, no API key). A test-only
contextionaryVectorizer{} that implements modules.Module (Name() only) is
passed as the seed VectorConfig.Vectorizer; the client reflect-encodes it to
{"text2vec-contextionary": {}}, so the collections get server-side vectors and
near-text/hybrid can vectorize their query text. No client registration needed
(that is only for the decode/read path).

Seed helpers (outside START/END markers, delete-before-create + waitForCount):
- setupJeopardyVectorized     JeopardyQuestion, contextionary "default" vector
- setupWineReviewNV           WineReviewNV, named "title_country" vector
- setupJeopardyTinyVectorized JeopardyTiny, two contextionary named vectors

Un-skipped: TestGetNearText, TestNamedVectorNearText, TestNearTextWithFilter,
all hybrid tests, and the multi-target near-text joins (MultiBasic,
MultiTargetWithSimpleJoin, MultiTargetManualWeights, MultiTargetRelativeScore).
TestHybridWithVector's NearVector target now names the "default" vector.

Confirmed client/server bugs, OIDC, RBAC/T4, model2vec and placeholders stay
skipped.
…panic, not a dim mismatch)

The T3 run failed only on TestHybridWithVector. The coordinator hypothesized a
3-dim-vs-300-dim mismatch against the contextionary "default" vector. Verified
live against a MATCHING-dimension BYO-vector collection (Weaviate 1.38.0,
localhost gRPC): the same rpc code=Unknown "panic occurred: nil pointer
dereference" still happens. Controls on the same collection pass (plain
NearVector returns objects, plain Hybrid returns objects), so the defect is
specific to Hybrid with a provided NearVector, independent of dimensions.

The v6 client marshals proto.Hybrid.NearVector via marshalNearVector
(internal/api/search.go:675) into VectorForTargets/Targets, a shape the 1.38
hybrid path mishandles into a nil-pointer panic. This is a real client/server
bug, not a docs/snippet bug, so the test is t.Skip'd with the reason (not
hacked). The displayed snippet keeps the idiomatic Name:"default" target.

Escalation candidates: (1) hybrid + provided NearVector to a server nil-pointer
panic; (2) a dimension mismatch should be a clean 4xx, not a server panic.
…leanup)

Broaden the Go v6 docs CI lane to execute the RBAC snippets against the
RBAC-enabled instance the docs stack already runs (service weaviate_rbac,
http :8580 / grpc :50551, root user root-user / key root-user-key).

- main_test.go: add connectRBACAdmin(t) plus getenvOr/getenvPortOr helpers
  (env-driven, localhost:8580/:50551 fallbacks). It authenticates with a Bearer
  Authorization header rather than WithAPIKey to sidestep a v6-client bug:
  WithAPIKey attaches a gRPC per-RPC oauth credential whose
  RequireTransportSecurity() is true, so over the plaintext-http RBAC instance
  grpc.NewClient() refuses to build the channel and NewClient fails to connect at
  all (origin/v6 @8a70091, internal/transports/grpc.go). RBAC endpoints are REST,
  so the header authenticates every one as root-user.
- rbac_test.go: un-skip the 32 role/permission/db-user/OIDC/group snippets, swap
  connectLocal -> connectRBACAdmin, and add out-of-marker isolation: roles and
  users are cluster-global, so each test delete-before-creates and defer-deletes
  the role/user it touches and seeds any prerequisite (seedRole/seedDBUser, plus
  pre-assigning a role for the revoke snippets). Snippets between // START/// END
  are byte-for-byte unchanged.
- Keep skipped: TestRBACAdminClient (connect is inside the marker, same class as
  TestConnectLocalAuth) and TestRBACGetKnownOidcGroups (placeholder).

Validated live against a local RBAC+OIDC+Keycloak stack: 32 pass / 2 skip / 0
fail, order-independent (passes shuffled and per-test in isolation). go vet and
go build clean under the CI replace directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…es flake)

The gRPC SearchReply carries an object id in the id_as_bytes field, which drops
leading zero bytes: an id beginning 0x00 comes back as 15 bytes and the client's
uuid.FromBytes rejects the whole reply ("invalid UUID (got 15 bytes)"), failing
every query that returns that object. Seeds that inserted objects with
server-assigned / uuid.New() ids therefore carried a latent ~1/256 flake per
seeded object across all search/near-vector tests (T4 CI rolled it for
TestGetProperties). Give every seeded object a fixed, non-leading-zero UUID —
the same fix already applied to setupJeopardyDemo — so the id can never truncate.

Seed helpers reseeded with explicit ids (all OUTSIDE // START/// END markers, so
displayed snippets are byte-for-byte unchanged):
- search_test.go setupJeopardySearch (3 BYO-vector objects; also added waitForCount)
- multi_target_test.go setupJeopardyTiny (3 BYO named-vector objects)
- main_test.go setupMultiTenancy (2nd tenantA object -> new mtSourceID2 var) and
  setupMultiTenancyJeopardy (2 tenantA objects)
- aliases_test.go setupArticleForAliases (2 objects)
- search_basic_test.go TestBasicQuery inline seed (1 object)
Hygiene (REST-only tests, not flake sources, but non-deterministic ids):
- manage_objects_test.go (2x uuid.New() -> MustParse, plus the DeleteMany seed)
- cross_references_test.go (2x uuid.New() -> MustParse)

Left untouched: the two server-assigned inserts that live INSIDE snippet markers
(manage_objects CreateObject, tenants CreateMtObject) — neither test queries the
object back, so no flake; changing them would alter a displayed snippet.

Validated live on a vanilla weaviate:1.38.0 (:8080/:50051): every test whose seed
changed passes (search_basic set 3x, multi-target BYO near-vector, aliases,
tenants, manage-objects, cross-references). go vet + go build clean under the CI
replace directive; replace dropped, go.mod clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
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