Skip to content

test(e2e/retrieval): on-disk LocalWorkspace conformance for sdkx retrieval#83

Merged
lIang70 merged 3 commits into
mainfrom
feat/tests-e2e-retrieval
May 8, 2026
Merged

test(e2e/retrieval): on-disk LocalWorkspace conformance for sdkx retrieval#83
lIang70 merged 3 commits into
mainfrom
feat/tests-e2e-retrieval

Conversation

@lIang70

@lIang70 lIang70 commented May 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • New build-tagged e2e module at tests/e2e/retrieval/ covering sdkx/retrieval/workspace against a real on-disk LocalWorkspace.
  • Verifies behaviour the in-memory unit tests cannot observe: atomic Rename, fsync, CRC on disk-modified bytes, RemoveAll after compaction, cross-process lock rejection, stale lock takeover.
  • Own go.mod pinned to sdk v0.2.11 + sdkx v0.2.9 (the tag that ships retrieval/workspace). Mirrors the tests/e2e/vesseld convention; excluded from default go test ./... by the e2e tag.

Test cases:

Case What it proves
RoundTrip Flush + Close + Reopen surfaces hits (manifest/segment really persisted)
WALReplayAfterUngracefulShutdown Close-without-Flush + Reopen replays WAL into memtable
DiskCorruptionDetected os.WriteFile flips a byte in docs.jsonl → Search returns errdefs.IsInternal
CompactionRemovesSegmentDirsOnDisk 5 flushes → Compactos.ReadDir sees 3 dirs
CrossProcessLockRejects Two Index over same root → second Upsert returns errdefs.IsConflict
StaleLockTakenOver Hand-written stale .lock → new Index takes over silently

Test plan

  • cd tests/e2e/retrieval && GOWORK=off go test -tags e2e -count=1 -timeout 120s ./...
  • Default go test ./... (no tag) reports [no test files] (CI safety)

Made with Cursor

lIang70 and others added 3 commits May 8, 2026 22:28
…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>
@lIang70
lIang70 merged commit 5c4e7b4 into main May 8, 2026
19 checks passed
@lIang70
lIang70 deleted the feat/tests-e2e-retrieval branch May 8, 2026 14:50
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