test(e2e/retrieval): on-disk LocalWorkspace conformance for sdkx retrieval#83
Merged
Conversation
…ieval A new build-tagged e2e module that exercises sdkx/retrieval/workspace against a real LocalWorkspace + os.* I/O, verifying behaviour the in-memory unit tests cannot observe: atomic Rename to disk, fsync of manifest/segments, byte-level CRC of corrupted docs.jsonl, RemoveAll shrinking segment dirs after compaction, and lockfile semantics (cross-process rejection + stale takeover). Pinned to sdk v0.2.11 + sdkx v0.2.9 (the tag that ships retrieval/workspace). Lives in its own go.mod, mirroring the tests/e2e/vesseld convention, and is excluded from default go test ./... by the e2e build tag. Run: cd tests/e2e/retrieval go test -tags e2e -count=1 -timeout 120s ./... Co-authored-by: Cursor <cursoragent@cursor.com>
… via GOWORK=off go.work now only lists modules whose sources are jointly edited (sdk + sdkx + vessel + voice + cmd/vesseld). tests/quality/vessel is dropped because it now pins vessel/v0.1.0-rc.2; the new tests/e2e/retrieval suite never belonged there because it pins released sdkx. Both join MODULES_OFFWORK in the Makefile so they keep running under \`make test\` (compile check; build-tagged lane runs via \`make test-e2e\`). This keeps go.work minimal and consistent with its stated purpose (coupled in-flight edits) while ensuring downstream test suites exercise the exact bytes consumers can \`go get\`. Verified with \`make ci-e2e\`. Co-authored-by: Cursor <cursoragent@cursor.com>
The previous commit moved these out of go.work, but ci.yml still ran their lint + test steps under the workspace. With go.work no longer listing them, `go test ./...` aborts with "directory prefix . does not contain modules listed in go.work or their selected dependencies". Fixes: - Lint vet + gofmt sweeps split into in-workspace modules and GOWORK=off ones; e2e modules also pass `-tags=e2e`. - test-vessel-quality job runs with GOWORK=off so the pinned vessel/v0.1.0-rc.2 + sdk v0.2.7 require directives win. - New test-retrieval-e2e job mirroring test-vesseld-e2e for the on-disk LocalWorkspace conformance suite, gated on sdk/sdkx changes plus the suite's own paths. Wired into the ci-pass gate. Co-authored-by: Cursor <cursoragent@cursor.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
tests/e2e/retrieval/coveringsdkx/retrieval/workspaceagainst a real on-diskLocalWorkspace.go.modpinned tosdk v0.2.11+sdkx v0.2.9(the tag that shipsretrieval/workspace). Mirrors thetests/e2e/vesseldconvention; excluded from defaultgo test ./...by thee2etag.Test cases:
RoundTripWALReplayAfterUngracefulShutdownDiskCorruptionDetectedos.WriteFileflips a byte indocs.jsonl→ Search returnserrdefs.IsInternalCompactionRemovesSegmentDirsOnDiskCompact→os.ReadDirsees 3 dirsCrossProcessLockRejectserrdefs.IsConflictStaleLockTakenOver.lock→ new Index takes over silentlyTest plan
cd tests/e2e/retrieval && GOWORK=off go test -tags e2e -count=1 -timeout 120s ./...go test ./...(no tag) reports[no test files](CI safety)Made with Cursor