Skip to content

Commit d5cc488

Browse files
feat(zig): add oracle parity tests for wire format, PK blob, merge values, and CL
Round 55: Created 4 new test suites verifying Zig-to-Rust/C parity TASK-132: Wire format edge cases (7/7 pass) - Empty string, zero, negative, MIN/MAX INT64, MAX_FLOAT, unicode/emoji TASK-133: PK blob format (9/9 pass) - Text/blob PKs, compound PKs (int+int, int+text, int+text+blob), unicode TASK-134: Merge value comparison (7/7 pass) - String/int/float/blob comparisons, NULL handling, cross-type ordering TASK-135: Delete/resurrection CL parity (17/17 pass) - Full lifecycle CL tracking, merge decisions, crsql_changes cl values Total: 40 new parity tests, 0 divergences found
1 parent 1cbe153 commit d5cc488

14 files changed

+2512
-207
lines changed

.tasks/DELEGATE_WORK_HANDOFF.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,141 @@ Artifacts:
6868

6969
---
7070

71+
## Round 2025-12-20 (55) — Wire format, PK blob, merge value, and CL parity tests (4 tasks)
72+
73+
**Tasks executed**
74+
- `.tasks/done/TASK-132-wire-format-edge-case-parity.md`
75+
- `.tasks/done/TASK-133-pk-blob-format-edge-case-parity.md`
76+
- `.tasks/done/TASK-134-merge-value-comparison-parity.md`
77+
- `.tasks/done/TASK-135-delete-resurrection-parity.md`
78+
79+
**Commits**
80+
- (pending commit)
81+
82+
**Environment**
83+
- OS: darwin (macOS ARM64)
84+
- Tooling: nix, zig (via nix), bash
85+
86+
**Commands run (exact)**
87+
```bash
88+
bash zig/harness/test-wire-format-edge-cases.sh
89+
bash zig/harness/test-pk-blob-parity.sh
90+
bash zig/harness/test-merge-value-parity.sh
91+
bash zig/harness/test-cl-parity.sh
92+
```
93+
94+
**Outputs (paste)**
95+
96+
<details>
97+
<summary>TASK-132: Wire format edge cases (7/7 pass)</summary>
98+
99+
```text
100+
Wire Format Edge Case Parity Test Summary
101+
102+
PASS: 7
103+
FAIL: 0
104+
SKIP: 0
105+
106+
All wire format edge case parity tests PASSED
107+
108+
Verified parity for:
109+
- WF-007: Empty string
110+
- WF-009: Zero
111+
- WF-010: Negative one
112+
- WF-011: MAX_INT64
113+
- WF-012: MIN_INT64
114+
- WF-013: MAX_FLOAT
115+
- WF-014: Unicode/emoji
116+
```
117+
</details>
118+
119+
<details>
120+
<summary>TASK-133: PK blob format (9/9 pass)</summary>
121+
122+
```text
123+
PK Blob Format Parity Test Summary
124+
125+
PASS: 9
126+
FAIL: 0
127+
SKIP: 0
128+
129+
All PK blob format parity tests PASSED
130+
131+
Verified:
132+
- WF-021: Single text PK
133+
- WF-022: Single blob PK
134+
- WF-023: Compound PK (int, int)
135+
- WF-024: Compound PK (int, text)
136+
- WF-025: Compound PK (int, text, blob)
137+
- WF-026: Unicode text PK
138+
- WF-027: Empty string PK
139+
- WF-028: Empty blob PK
140+
```
141+
</details>
142+
143+
<details>
144+
<summary>TASK-134: Merge value comparison (7/7 pass)</summary>
145+
146+
```text
147+
Merge Value Comparison Parity Test Summary
148+
149+
PASS: 7
150+
FAIL: 0
151+
SKIP: 0
152+
153+
All merge value comparison parity tests PASSED
154+
155+
Value comparison parity verified:
156+
- MR-020: String lexicographic comparison
157+
- MR-021: Integer comparison
158+
- MR-022: NULL vs value handling
159+
- MR-023: Value vs NULL handling
160+
- MR-024: Float comparison
161+
- MR-025: Blob bytewise comparison
162+
- MR-026: Cross-type comparison
163+
```
164+
</details>
165+
166+
<details>
167+
<summary>TASK-135: CL parity (17/17 pass)</summary>
168+
169+
```text
170+
Causal Length (CL) Parity Test Summary
171+
172+
Results: 17 passed, 0 failed, 0 skipped
173+
174+
All CL parity tests PASSED
175+
176+
Verified:
177+
- CL values identical through insert/delete lifecycle
178+
- MR-042: Higher CL delete wins over lower CL live
179+
- MR-043: Higher CL resurrection wins over lower CL delete
180+
- MR-041: Full lifecycle resurrection works identically
181+
- Lower CL changes are correctly rejected
182+
- crsql_changes reports identical cl values
183+
```
184+
</details>
185+
186+
**Files created:**
187+
- `zig/harness/test-wire-format-edge-cases.sh` (new, ~400 lines)
188+
- `zig/harness/test-pk-blob-parity.sh` (new, ~600 lines)
189+
- `zig/harness/test-merge-value-parity.sh` (new, ~750 lines)
190+
- `zig/harness/test-cl-parity.sh` (new, ~680 lines)
191+
192+
**Reproduction steps (clean checkout)**
193+
1. `git clone <repo> && cd cr-sqlite`
194+
2. `bash zig/harness/test-wire-format-edge-cases.sh` — verify 7/7 pass
195+
3. `bash zig/harness/test-pk-blob-parity.sh` — verify 9/9 pass
196+
4. `bash zig/harness/test-merge-value-parity.sh` — verify 7/7 pass
197+
5. `bash zig/harness/test-cl-parity.sh` — verify 17/17 pass
198+
199+
**Known gaps / unverified claims**
200+
- No coverage captured
201+
- CI integration not verified this round (local runs only)
202+
- Tests created NEW files, so no conflicts with existing test suite
203+
204+
---
205+
71206
## Round 2025-12-20 (54) — Fuzz parity + edge case tests + empty blob fix (3 tasks)
72207

73208
**Tasks executed**

.tasks/active/TASK-132-wire-format-edge-case-parity.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

.tasks/active/TASK-133-pk-blob-format-edge-case-parity.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

.tasks/active/TASK-135-delete-resurrection-parity.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)