Skip to content

Integer range mode (v1r): integer codes from [low, high], walk-free - #24

Merged
ryankwondev merged 2 commits into
mainfrom
feat/v1r-range-mode
Sep 2, 2026
Merged

ryankwondev merged 2 commits into
mainfrom
feat/v1r-range-mode

Conversation

@ryankwondev

Copy link
Copy Markdown
Member

Adds SPEC §12 — an additive mode issuing codes as integers from an application-chosen [low, high] (e.g. low=100000, high=999999: 6-digit codes with no leading zero, safe in INT columns).

Design: always exactly one FF1 call (no cycle-walking, no retries). The mode selects the largest FF1 domain radix^m ≤ high−low+1 with radix ≤ 256 (numerals stay one byte — no FF1 core changes in any language): 96³ = 884,736 for the 900k range (98.3%), exact when the span is an admissible power (10^6 = 100³, 2^63 = 128⁹). Unissued top slice is rejected by decode. New tweak namespace dealcode/v1r/, byte-disjoint from v1/v1c at offset 11.

Scope: SPEC §12 + §9; all seven implementations with unit + conformance tests; shared vectors testvectors/v1r.json (12 configs incl. capacity ties, 2^53 seam, full 2^63 span); docs (configuration/database/README/homepage/getting-started, EN/KO); using-dealcode skill; CHANGELOG.

v1/v1c outputs are byte-identical to before (vectors regenerate clean).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BLtsJ2xgVmhbKkNoqP47dC

ryankwondev and others added 2 commits September 2, 2026 08:16
Codes as integers drawn from [low, high] (e.g. 100000-999999: 6-digit,
no leading zero, int-column safe). Walk-free by construction: one FF1
call over the largest radix^m <= N with radix <= 256 (96^3 = 884736 for
the 900k range, 98.3%); the uncovered top slice is rejected by decode.
New tweak namespace dealcode/v1r/ (offset-11 byte disjoint from v1/v1c).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLtsJ2xgVmhbKkNoqP47dC
… skill

JS, Go, Java, Rust, C, C++ ports of SPEC §12, each mirroring its cycling-
mode conventions and passing testvectors/v1r.json (derived radix/capacity
asserted per config). Docs: configuration-guide section, README/homepage/
getting-started surfacing, DB integer-column note, skill rule + patterns
(EN/KO); CHANGELOG entry. All suites green locally incl. ASan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLtsJ2xgVmhbKkNoqP47dC
@ryankwondev
ryankwondev enabled auto-merge (squash) September 2, 2026 08:34
@ryankwondev
ryankwondev merged commit b584902 into main Sep 2, 2026
10 checks passed
@ryankwondev
ryankwondev deleted the feat/v1r-range-mode branch September 2, 2026 08:35
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