fix: bump dalgo to v0.74.0, close duplicate-insert conformance gap - #5
Merged
Conversation
…conformance gap
dal.DB's sealing (the unexported dalgoDB() marker method) has not changed
shape since this adapter adopted it for v0.64.2; the interface is satisfied
unchanged at v0.74.0 with no adapter redesign required.
dal-go/record v0.1.3 added the cross-adapter ErrRecordExists / IsAlreadyExists
sentinel that dalgo's dalgotest.Checks() conformance suite now mandates
("rejects an Insert over an existing key with record.IsAlreadyExists").
Insert's existing-key error in tx_readwrite.go now wraps
record.ErrRecordExists in both the MapOfRecords and single-record branches,
so callers can distinguish "created" from "duplicate key" via
record.IsAlreadyExists(err) instead of string-matching an ad hoc message.
Fixture fix: newGitHubContentsServer's GET handler 404'd any path not present
in the server's static fixture set, even after that path had been written via
PUT during the test. That masked the new conformance check: a record written
by a seed Insert always read back as "not found" on the next Insert, so
duplicate-key detection looked broken. Directory listings still come from the
static fixtures; file content now comes from the live contents map for any
path, matching what the real GitHub Contents API does.
go.mod's `go` directive moved from 1.26.0+toolchain 1.27.0 to a plain 1.27.0
as a mechanical side effect of `go get`/`go mod tidy` against dalgo v0.74.0's
own go.mod floor.
go build ./... && go vet ./... && go test ./... all green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFsyYhYi9h9Am1JbAMxuhv
Coverage Report for CI Build 33022483860Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 84.572%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
trakhimenok
added a commit
that referenced
this pull request
Aug 26, 2026
dalgo v0.74.0 declared `go 1.27.0` incidentally (a go get run on a 1.27 machine; its real floor was 1.24.0). dalgo v0.74.1 fixed that upstream and declares the founder's convention (go 1.26.0 + toolchain go1.27.0) itself, so this repo's own directive - bumped to 1.27.0 by the previous dalgo v0.74.0 bump (#5) - can now be restored without go mod tidy fighting it. Bumped github.com/dal-go/dalgo v0.74.0 -> v0.74.1 (dal-go/record unchanged at v0.1.3, it did not move). Verified go mod tidy, run AFTER restoring the directive, leaves it at go 1.26.0 + toolchain go1.27.0 (does not rewrite it back to 1.27.0 the way it would have against v0.74.0). GOTOOLCHAIN=go1.26.0 go build ./... && go vet ./... && go test ./... all green; gofmt clean. Claude-Session: https://claude.ai/code/session_01KFsyYhYi9h9Am1JbAMxuhv Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github.com/dal-go/dalgov0.64.2 -> v0.74.0 andgithub.com/dal-go/recordv0.1.1 -> v0.1.3.dal.DB's sealing (unexporteddalgoDB()marker) is unchanged in shape since this adapter adopted it in chore: adopt sealed dal.DB from dalgo v0.64.2 #4 for v0.64.2 — no redesign needed, this is a pure version bump.dal-go/recordv0.1.3 added the cross-adapterErrRecordExists/IsAlreadyExistssentinel, and dalgo'sdalgotest.Checks()conformance suite now mandates it ("rejects an Insert over an existing key with record.IsAlreadyExists").Insert's existing-key error now wrapsrecord.ErrRecordExistsin both theMapOfRecordsand single-record branches instead of returning a barefmt.Errorf.newGitHubContentsServerindb_github_test.go) that the new conformance check exposed: its GET handler 404'd any path not present in the server's static fixture list, even after that same path had just been written via PUT during the test. That made every dynamically-written record read back as "not found" on a secondInsert, which silently defeated duplicate-key detection in the test harness (not in production code — the real GitHub Contents API doesn't have this gap).Before/after test output
Before (dalgo v0.74.0 + record v0.1.3, adapter code unchanged):
After (this PR):
TestReadwriteTx_InsertMapOfRecords_AlreadyExistswas updated to asserterrors.Is(err, record.ErrRecordExists)/record.IsAlreadyExists(err)instead of an exact error string, since the string now has an appended: record already existsfrom the wrapped sentinel.Test plan
gofmt -l .cleango build ./...go vet ./...go test ./...(including the fulldalgotest.Checks()conformance suite)🤖 Generated with Claude Code
https://claude.ai/code/session_01KFsyYhYi9h9Am1JbAMxuhv