Devin AI
f6f9122d24
fix(infra): write_jsonl mkdir+sort_keys, q16_div raise on zero
...
- write_jsonl: add path.parent.mkdir(parents=True, exist_ok=True) to
prevent FileNotFoundError when output dir doesn't exist
- write_jsonl: add sort_keys=True to match original callers' deterministic
output behavior (AGENTS.md: identical SHA256 on consecutive runs)
- q16_div: raise ZeroDivisionError instead of silently returning 0,
matching the original fractal_dimension.py semantics
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
2026-06-16 01:20:56 +00:00
Devin AI
a496d8d3ce
fix(infra): Q16_SCALE int not float, add missing Path/sys imports
...
- Q16_SCALE: float → int in lib/q16.py (int // float returns float,
breaking Q16_16 integer contract in gccl_waveprobe, vcn_famm_transport)
- qr_spatial_hash.py: sys → _sys (only _sys was imported)
- Add missing 'from pathlib import Path' to 7 files that use Path()
without importing it: test_fpga, compare_tier1_vs_tier2,
generate_avm_gold_trace, burgers_triad_core, hot_path_cold_path,
sabotage_prevention, generate_diat_tables
- hot_path_cold_path.py: also add missing 'import sys'
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
2026-06-16 01:16:31 +00:00
Devin AI
f9dcec7369
fix(infra): restore canonical_json_bytes non-ASCII behavior and dataset_ingest list safety
...
- canonical_json_bytes now delegates to canonical_json (ensure_ascii=False)
matching the original per-file implementations in emitter and loopback
- dataset_ingest_rds.py restores isinstance(data, list) safety check from
original load_jsonl, wrapping lib.jsonl.load_json
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
2026-06-16 01:11:35 +00:00
Devin AI
38b48e30d2
fix: preserve semantic differences in refactored shared utilities
...
- q16_lut_generator.py: revert to local unsigned-wrapping Q16 functions
(hardware LUT uses 32-bit wrapping + 0xFFFFFFFF div-by-zero sentinel)
- dataset_ingest_rds.py: import load_json (not load_jsonl) — files are
standard JSON arrays, not JSONL
- tiddlywiki_ene_bridge.py: use canonical_json (ensure_ascii=False) to
preserve non-ASCII hash stability
- ollama_deepseek_review_emitter.py: restore "sha256:" prefix wrapper
- md_to_jsonl_converter.py: restore "sha256:" prefix via compute_sha256
- text_container_to_jsonl.py: restore "sha256:" prefix via compute_sha256
- kotc_sim.py: restore "sha256:" prefix on sha256_text
- gccl_waveprobe.py: restore Q16_MIN/Q16_MAX clamping on q16_add/sub/mul
- vcn_famm_transport.py: restore Q16_MIN/Q16_MAX clamping on q16_add/sub/mul
- lib/jsonl.py: add canonical_json() with ensure_ascii=False
Build: py_compile verified on all 71 modified files
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
2026-06-15 02:26:45 +00:00
Devin AI
e5f04ee6c3
refactor(infra): extract shared utilities from duplicated code patterns
...
Create 4-Infrastructure/lib/ with canonical implementations of:
- hashing.py: sha256_bytes, sha256_text, sha256_file
- q16.py: Q16_16 fixed-point constants and arithmetic
- jsonl.py: load_json, load_jsonl, write_jsonl, stable_json, canonical_json_bytes
- fraction_utils.py: Fraction serialization helpers for hardware probes
Refactor 66 files across 4-Infrastructure/{hardware,shim,infra} and
5-Applications/{scripts,tools-scripts,hutter_prize,text-to-cad} to import
from the shared library instead of maintaining local copies.
4-Infrastructure/auto/lib/q16.py now re-exports from lib.q16.
Net: -743 lines (490 added, 1233 removed)
Build: not applicable (Python-only change, py_compile verified on all 71 files)
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
2026-06-15 02:26:45 +00:00