Repository navigation
Adds the README and the wire format pointer - #9
Merged
Merged
Conversation
The README now reads what, why, install (the Maven dependency block and the Gradle coordinate at 1.0.0), one basic-usage block that was run, Compatibility and Documentation, and states the behaviours a caller can hit: decode never throws, the stricter validity checks than the Elixir reference, the deterministic prefix refusal, and the state a Monotonic keeps. docs/wire-format.md points at the reference spec at v2.10.0. The Javadoc now says the same: Builder.prefix on the surrogate refusal, decode on the clock edge near Long.MIN_VALUE, Monotonic on the pair of time and random value that increases and on its state growing with each prefix and width, and the two validity checks on their stricter reading. Tests: a time-based id keeps a prefix with no UTF-8 encoding; the SOURCE.json tag and sha are pinned to v2.10.0 and its commit; two sabotage notes name the assertion that actually fails. Refs: uxjv-0tl
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.
Refs: uxjv-0tl
What
README.mdin the family recipe: what, why, install (the Maven<dependency>block and the Gradle coordinate forsystems.riddler:uxidat 1.0.0), one basic-usage block (compiled and run against the built classes before it went in), Compatibility (Java 17 and later, no dependencies, the modulesystems.riddler.uxid, thread safety ofMonotonic) and Documentation.docs/wire-format.md: a short pointer toguides/wire-format.mdin uxid-ex at the tagv2.10.0and toconformance/SOURCE.json.UxidOptions.Builder.prefixsays a deterministic id refuses a prefix holding an unpaired surrogate and a time-based id keeps it;Uxid.decodesays the clock arithmetic wraps silently within about 2^40 ms ofLong.MIN_VALUE;Monotonicsays the pair of time and random value increases (a fresh seed after a later clock or an overflow can be a smaller random value alone) and that its state grows by one entry for each distinct prefix and random width;isValidandisDeterministicsay they are stricter than the Elixir reference'svalid?anddeterministic?.changelog.d/uxjv-5tk.mdcarries the same twoMonotoniccaveats.CLAUDE.mdlists the README and the pointer in the tree paragraph, rewrapped to the file's width.Tests
UxidGenerateTest.aTimeBasedIdKeepsAPrefixWithNoUtf8EncodingAsGivenpins that the time path never encodes the prefix.CorpusHashTest.sourceJsonRecordsTheSameHashAndTheTagItCameFromnow pins the tag tov2.10.0and the sha to57235777cb29c70f751552ce7aa20ab5fe71fb74instead of checking their shape.DecodeClockTest.theWindowEndIsExclusiveAndItsLastMillisecondRecoversTheGuardCasefails on the END assertion;UxidDecodeTest.eitherCaseDecodesToTheSameValuefails on thedecoded()instance check.Sabotage rows (each mutation applied, run, restored byte-equal)
DecodeClockTest.theWindowEndIsExclusiveAndItsLastMillisecondRecoversTheGuardCasetime - now > ONE_DAYmade>=inDecoder.compactTimeUxidDecodeTest.eitherCaseDecodesToTheSameValueBase32.valuedecoded()(instance check)UxidGenerateTest.aTimeBasedIdKeepsAPrefixWithNoUtf8EncodingAsGivenUxid.generateassertDoesNotThrowCorpusHashTest.sourceJsonRecordsTheSameHashAndTheTagItCameFromSOURCE.jsonsha changed by one digit, then the tag changed tov2.10.1(two runs)Gate
mise run gategreen on the head before the commit (192 tests, JaCoCo check, Javadoc and sources jars with the Javadoc lint atalland warnings failing the build); the commit staged the byte-identical tree. No public type or member is added or changed (Javadoc text only), so the in-turn review tier applies.