feat: add V3 dictionaries and bounded text processing (R1–R3) - #244
Merged
Conversation
This was referenced Sep 6, 2026
Merged
skyoo2003
added a commit
that referenced
this pull request
Sep 6, 2026
`builds[].main` named `cmd/acor/main.go`, a file rather than a package. Go compiles a file path as `command-line-arguments` and drops its siblings in the same package, so the release binary was built from main.go alone. That held by accident: until #244, `cmd/acor` contained only `main.go` and `main_test.go`. #244 added `dictionary.go`, and `main.go:224` calls `dispatchDictionary` from it — so the v1.6.0 tag build failed with `undefined: dispatchDictionary` after every CI gate had passed. No gate could have caught it. `make build` and CI run `go build ./cmd/acor`, the package; GoReleaser was compiling something else. Naming the package makes the two builds the same build, so `make build` now gates the release path. Verified with `goreleaser build --snapshot --single-target`: builds `paths=cmd/acor`, and the binary's `--help` lists `dictionary`.
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.
Pull Request
Description
Add opt-in V3 collections for million-keyword dictionaries: callers can inspect a pinned snapshot, compare or atomically update keywords with an expected version, and continue searching the previous immutable engine while a replacement builds. Existing V1/V2 APIs and the Go module version remain compatible.
Scan,MaskText, andReplaceTextAPIs with original rune/byte positions, leftmost-longest rewriting, and explicit input, match, work and output limits.Type of Change
Checklist
make test)make vetmake lint)make build)changes/unreleased/20260906-versioned-dictionaries.yaml)Validation
docs/content/reference/andbenchmarks/results/.Additional Notes
Writes acknowledge the Redis commit; callers needing local search visibility must use
WaitForVersion. Local engines still rebuild in full. Collections occupy one Redis Cluster slot. Operation receipts and committed-version markers are retained indefinitely.The local Valkey default-prefetch build crashed during an exploratory run. Both successful benchmark matrices used
prefetch-batch-max-size 0; default Valkey configuration is not validated by these measurements. The crash excerpt and condition are documented. Workstation measurements with two repetitions are not latency or memory guarantees. Real Cluster/Sentinel failover and production persistence-recovery matrices remain unverified.By submitting this PR, I agree that my contributions will be licensed under the Apache License 2.0.