Skip to content

fix: preserve shared temporal nanosecond precision - #34

Merged
PureSaber merged 12 commits into
mainfrom
codex/shared-temporal-precision-20261004
Oct 8, 2026
Merged

PureSaber merged 12 commits into
mainfrom
codex/shared-temporal-precision-20261004

Conversation

@PureSaber

@PureSaber PureSaber commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Preserve exact nanosecond timestamps across shared parsing, Arrow storage, sorting, claims, adapters, capture, L2, research, and financial ingestion.
  • Parse fractional seconds, minutes, and hours with integer nanosecond arithmetic across the accepted timestamp grammar, including variable-width and compact clocks, meridiem forms, comma fractions, and timezone suffixes. Values finer than one nanosecond fail explicitly.
  • Keep open-ended interval overlap correct at Timestamp.max, and keep normalized-v3 sorting on exact int64 nanoseconds.
  • Vectorize normalized-v3 claim hashing through DuckDB TIMESTAMP_NS while preserving the frozen canonical JSON for nullable structs, control characters, and literal escape text.
  • Make CI collect package coverage explicitly with --source=quant_data_kit. The gate now derives every tracked src/quant_data_kit/**/*.py file from Git and rejects missing sources, unknown sources, normalized path collisions, invalid branch counts, or unavailable inventory evidence while preserving the 24 core 90% gates and the 80% all-source gate.

Validation

  • Fixed head: 61b571bdb9bba5d0a8c3aff8b406864539d0a9fc; tree: 39eafbf5668135e9a358435ba2895f13028bccce.
  • Full Python 3.12 suite under the exact CI coverage command: 856 passed, 2 skipped.
  • Complete source inventory: 89/89 tracked Python sources, no missing or unknown entries; branch coverage 4364/5252=83.09%; all 24 core gates pass.
  • New coverage-gate tests: 9 passed on Python 3.12 and 9 passed on Python 3.10.
  • Independent fixed-clone review replayed the complete report plus five adversarial reports on Python 3.12.13 and 3.10.21. The complete report passed; missing non-core, missing core, unknown source, normalized duplicate, and invalid-count reports all failed as required.
  • Full-repository Ruff check and format check pass in the independent fixed clone.
  • The src tree is byte-identical between accepted source commit b0f63b9bfa038608609bd7245c494f6cfcaba6e6 and final head (996c12b2ae4338c90cb390ffdb29f675922bdfc3). Therefore the accepted source evidence remains applicable: Python 3.12 847 passed, 2 skipped; Python 3.10 targeted 351 passed; fixed precision manifest 225 passed on each runtime; independent fixed-object subset 132 passed on each runtime; exact syntax matrix 21/21 on each runtime.

Bounded performance diagnostic

Three alternating 40k runs on the same machine and policy produced median throughput of 30,859.86 events/s at the base and 29,089.12 events/s for the accepted source (-5.74%). Median RSS changed from 0.217815 to 0.227592 GiB (+4.49%). Claim construction remained effectively flat per invocation (0.32242 s base, 0.32380 s candidate); publish and strict reload each perform one exact claim build. Compared snapshot, partition, claim, and L2 artifacts were identical. This is a bounded diagnostic, not formal M7 certification.

Scope boundary

The earlier fixed QExec/HK consumer boundary had 7 failures among 21 cases. That historical observation is not a claim that the downstream problem was solved by this QDK diff. The 2026-10-08 consumer follow-up is tracked in PureSaber/quant-execution#26 and PureSaber/quant-hk-equity#6 (both merged after their hosted checks passed). The HK scenario suite passes 46 tests with 90.16% pure branch coverage, including 5 new exact-time admission and replay regressions.

Fresh Windows/Python 3.12.14 verification on 2026-10-08: 856 passed, 2 skipped; all 24 core branch gates and the 83.09% all-source gate passed, plus repository-wide Ruff/format checks. QExec consumer PR #26 passes 372 tests and adds 11 precision regressions for JSON, stream recovery, replay, future admission, corporate actions and US cash. This new regression set does not claim to rerun the original 21-case harness.

GitHub CI passed on Python 3.10, 3.11, 3.12, and Windows Python 3.12. Both CodeQL checks passed.

@PureSaber
PureSaber marked this pull request as ready for review October 8, 2026 05:47
@PureSaber
PureSaber merged commit e6b3810 into main Oct 8, 2026
6 checks passed
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