You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the easymongo refactor (see PLAN.md on the refactor branch).
Working context (read this first)
Repository github.com/tophergopher/easymongo. Start from branch claude/mongotest-easymongo-refactor-wu2vhm; create a branch issue-<number>-<short-slug> from it and open a pull request back into it. PLAN.md on that branch is the source of truth; read it before writing code.
Go project, single module, all packages at the repo root except the new easymongotest/ subpackage. The final toolchain target is Go 1.27 (set by Toolchain: go 1.27, latest dependencies, tidy, remove replace directives #10); any Go 1.24 or newer works until then. Before pushing: gofmt -l . prints nothing, go vet ./..., go test -race ./....
The existing test suite (*_test.go at the root, package easymongo_test, every test function calling setup(t) from common_test.go) is the regression net for this refactor. It must pass after your change. It needs a Docker daemon reachable through the normal Docker environment and the mongo:8 image.
Method is test-driven: write the tests listed under "Tests first", confirm they fail for the expected reason, then implement. Never delete, skip or weaken an existing test to get green; if a test must change because the public API changed (for example primitive.ObjectID to bson.ObjectID), change only the types.
Commit messages: imperative summary line, blank line, body explaining why. Mention this issue number in the pull request description.
Scope
.github/workflows/go.yml:
actions/checkout and actions/setup-go at @v7 (both; verified 2026-09-09); setup-go with go-version-file: go.mod and check-latest: true.
Replace go get -v -t -d ./... (deprecated -d) with go mod download.
build job: gofmt -l . must print nothing, go vet ./..., go build ./....
test job: pre-pull mongo:8 for stable timings, then go test -v -race -covermode=atomic -coverpkg=./... -coverprofile=coverage.out ./... (Docker is available on ubuntu-latest; integration tests fail rather than skip when it is not).
Coverage conversion and upload with jandelgado/gcov2lcov-action@v1 and coverallsapp/github-action@v2.
Trigger on push to master and on pull requests.
New .github/dependabot.yml with gomod (weekly) and github-actions (weekly) ecosystems; the repo currently has none.
Implementation details
Workflow skeleton to adapt. Action versions verified on 2026-09-09 from each project's releases page: actions/checkout v7.0.1 (pin @v7), actions/setup-go v7.0.0 (pin @v7; supports the go-version-file and check-latest inputs), coverallsapp/github-action v2.3.8 (pin @v2), jandelgado/gcov2lcov-action v1.2.0 (pin @v1). Re-check the releases pages before merging in case a new major has shipped since.
Part of the easymongo refactor (see
PLAN.mdon the refactor branch).Working context (read this first)
github.com/tophergopher/easymongo. Start from branchclaude/mongotest-easymongo-refactor-wu2vhm; create a branchissue-<number>-<short-slug>from it and open a pull request back into it.PLAN.mdon that branch is the source of truth; read it before writing code.easymongotest/subpackage. The final toolchain target is Go 1.27 (set by Toolchain: go 1.27, latest dependencies, tidy, remove replace directives #10); any Go 1.24 or newer works until then. Before pushing:gofmt -l .prints nothing,go vet ./...,go test -race ./....*_test.goat the root, packageeasymongo_test, every test function callingsetup(t)fromcommon_test.go) is the regression net for this refactor. It must pass after your change. It needs a Docker daemon reachable through the normal Docker environment and themongo:8image.*mongo.Clienttype flows fromConnectiontoDatabasetoCollection), so the four driver issues Driver v2: migrate connect.go (mongo.Connect, Disconnect, BSONOptions, write concern) #2, Driver v2: options struct literals become builders; drop MaxTime; ArrayFilters and Delete option changes #3, Driver v2: primitive package merged into bson; replace x/bsonx in index.go #4 and Driver v2: Distinct returns a DistinctResult that must be decoded #5 land together in one pull request, worked in that order. Before them, New easymongotest subpackage wrapping mongotest/v2 #7 and Switch the easymongo test suite to easymongotest #8 must land so the test suite no longer depends on the oldgithub.com/tophergopher/mongotestv0.1.0 module (which itself imports easymongo and breaks the moment easymongo's types change). Until mongotest'sv2module is tagged, use a localreplace github.com/tophergopher/mongotest/v2 => ../mongotest/v2ingo.modand say so in the pull request; Toolchain: go 1.27, latest dependencies, tidy, remove replace directives #10 removes it.primitive.ObjectIDtobson.ObjectID), change only the types.Scope
.github/workflows/go.yml:actions/checkoutandactions/setup-goat@v7(both; verified 2026-09-09);setup-gowithgo-version-file: go.modandcheck-latest: true.go get -v -t -d ./...(deprecated-d) withgo mod download.buildjob:gofmt -l .must print nothing,go vet ./...,go build ./....testjob: pre-pullmongo:8for stable timings, thengo test -v -race -covermode=atomic -coverpkg=./... -coverprofile=coverage.out ./...(Docker is available onubuntu-latest; integration tests fail rather than skip when it is not).jandelgado/gcov2lcov-action@v1andcoverallsapp/github-action@v2.masterand on pull requests.New
.github/dependabot.ymlwithgomod(weekly) andgithub-actions(weekly) ecosystems; the repo currently has none.Implementation details
Workflow skeleton to adapt. Action versions verified on 2026-09-09 from each project's releases page:
actions/checkoutv7.0.1 (pin@v7),actions/setup-gov7.0.0 (pin@v7; supports thego-version-fileandcheck-latestinputs),coverallsapp/github-actionv2.3.8 (pin@v2),jandelgado/gcov2lcov-actionv1.2.0 (pin@v1). Re-check the releases pages before merging in case a new major has shipped since..github/dependabot.yml:Acceptance
Depends on: #10.