From 369c086adde3d0524605a624483fd3bb5ee68400 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 20 Oct 2026 13:24:22 +0000 Subject: [PATCH] fix(test): point container_rendermode_test at the v2 BSON driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main is red. The merge of #1497, which removed go.mongodb.org/mongo-driver v1 from go.mod, landed just after #1498 added mdl/backend/pagemutator/container_rendermode_test.go — a file written against v1. The package now fails to compile at all: container_rendermode_test.go:8:2: no required module provides package go.mongodb.org/mongo-driver/bson FAIL github.com/mendixlabs/mxcli/mdl/backend/pagemutator [setup failed] and TestNoV1DriverImports names the file, which is what it is for. Neither PR is at fault. #1498 was authored and tested against a main that still required v1, the two touched different files so nothing conflicted, and each was green on its own base. The combination is what breaks. The file uses bson.D only, so this is the import path and nothing else: v2 nests bson.D inside bson.D exactly as v1 nested primitive.D, so its assertions are already correct and it needs no modelsdk/bsoncompat helper. Checked the whole tree rather than just the file CI named, since `go test` stops at the first [setup failed] package and a second offender would only surface on the next run: this is the only one. Verified: go build ./... clean, go vet clean, gofmt clean, 106 test packages pass with 0 failures, the two packages that failed in CI (mdl/backend/pagemutator and modelsdk/bsoncompat) both pass, and `go mod tidy` exits 0 leaving go.mod and go.sum unchanged — so v1 stays out. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Rer1mzP69XxbXKxQqheipM --- .../2026-10-20-concurrent-merge-reintroduced-v1-driver.json | 1 + mdl/backend/pagemutator/container_rendermode_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .claude/skills/fix-issue/findings/other/2026-10-20-concurrent-merge-reintroduced-v1-driver.json diff --git a/.claude/skills/fix-issue/findings/other/2026-10-20-concurrent-merge-reintroduced-v1-driver.json b/.claude/skills/fix-issue/findings/other/2026-10-20-concurrent-merge-reintroduced-v1-driver.json new file mode 100644 index 0000000000..02bd11fd83 --- /dev/null +++ b/.claude/skills/fix-issue/findings/other/2026-10-20-concurrent-merge-reintroduced-v1-driver.json @@ -0,0 +1 @@ +{"area": "mdl/backend/pagemutator", "date": "2026-10-20", "symptom": "main went red immediately after ako/mxcli#1497 (the v1 BSON driver removal) merged: `mdl/backend/pagemutator/container_rendermode_test.go:8:2: no required module provides package go.mongodb.org/mongo-driver/bson`, the package failing [setup failed], plus `--- FAIL: TestNoV1DriverImports ... imported again by 1 file(s)`", "cause": "Not a defect in either PR. ako/mxcli#1498 was authored and tested against a main that still required the v1 driver, and merged just before #1497 removed it. Neither PR conflicted with the other — different files — so nothing flagged the combination, and each was green on its own base. The file uses bson.D only, so the fix is the import path alone", "file": "`mdl/backend/pagemutator/container_rendermode_test.go` — v1 bson import -> v2", "insight": "Removing a module the whole repo imports is not finished when the PR is green: any PR already open at that moment is still written against the old module, and a merge of two non-conflicting PRs can break main where neither breaks it alone. This happened TWICE in one change — first caught in-branch when merging origin/main pulled in #1495's 7 new v1 imports, then again post-merge from #1498 — so expect it rather than being surprised. TestNoV1DriverImports is what names the file both times, and its value is exactly here: a re-added import is not a build error while the module is still required, and after removal the compile error names only the package, not the reason. The structural fix is a repo setting, not code: require branches to be up to date before merging, for the window around any dependency removal. When it does happen, check the whole tree (`grep -rn '\"go.mongodb.org/mongo-driver/bson'`) rather than only the file CI named — CI stops at the first [setup failed] package and a second offender would surface only on the next run", "refs": ["ako/mxcli#1497", "ako/mxcli#1498", "ako/mxcli#1495"]} diff --git a/mdl/backend/pagemutator/container_rendermode_test.go b/mdl/backend/pagemutator/container_rendermode_test.go index a0f112b8c5..d9ea665208 100644 --- a/mdl/backend/pagemutator/container_rendermode_test.go +++ b/mdl/backend/pagemutator/container_rendermode_test.go @@ -5,7 +5,7 @@ package pagemutator import ( "testing" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" "github.com/mendixlabs/mxcli/mdl/backend/bsonnav" )