Skip to content

feat(storage): preserve observation fidelity and analytical handoffs - #125

Merged
stefan-jansen merged 8 commits into
mainfrom
feat/observation-fidelity
Oct 20, 2026
Merged

stefan-jansen merged 8 commits into
mainfrom
feat/observation-fidelity

Conversation

@stefan-jansen

@stefan-jansen stefan-jansen commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

User workflow

Keep source observations intact from imported CSV/Parquet through local storage and a pandas analytical price panel. This is the market/temporal input batch of the accepted successor migration, not an analytical cleaner or runtime history engine.

Closes #117.

Changes

  • Flat/Hive reads retain source timestamp precision, label declarations and timezone-correct half-open bounds. Declared source timezones govern naive observations. Hive prunes in its physical partition clock and orders numeric partition values rather than directory strings.
  • Typed empty Hive generations retain schema. Invalid temporal declarations fail before replacing an existing generation. Declared timestamp columns work without renaming physical source data.
  • utils.conversion.to_price_panel/from_price_panel retain clock, typed asset IDs, nullable integer scale and explicit missing cells, including native NaN versus null. A presence mask distinguishes an absent pair from a supplied null. Conflicting mappings, duplicates and stale masks fail without caller mutation. No filling, returns calculation or inferred availability.
  • Extend the existing migration guide and add a runnable offline CSV-to-disk-to-panel recipe. Other observation fields and availability/revision facts stay in the original tables.

Executed evidence

  • Base a9a9084 reproduced real DataManager disk failures: adjacent nanoseconds rounded to microseconds, label bounds and a timezone-shifted Hive partition omitted. Passing repairs retain existing UTC representation where a label timezone is declared.
  • Qualified source bfc7f3a passed4264 tests in each full native and separate ResourceWarning lane,292 deselected,86.58% coverage. Final headce48de95b432c9588f249a1d7ba80422277689c7 incorporates security main with an independently verified identical Git tree. Cases include a whole missing price session,signed/unsigned integer scale,custom mappings,CME overnight,NYSE early close,DST and crypto weekends.
  • Seven premise/claim controls each pass on correct producing code and fail on a deliberately broken producer. Aggregate gate: seven covered, no waivers, findings, unreachable items or deferrals.
  • Fresh final-head wheel and source-distribution installs,isolated Python3.12 with source-path injection disabled: Data0.2.2.dev23+gce48de95b,Specs0.2.0,Diagnostic0.1.9 and Engineer0.1.7.dev29+gc69e7bada from immutable commitc69e7badaac012ad98b1c4b8aa9a67a952b08f5c. All165 packaged source files match Gitce48. Eight produced observations and the missing quote survive. Independent A outcomes.01,-3/101,5/98,null and B.04,null,null,null agree through public consuming APIs.
  • Lint,format,type,strictdocs,wheel/sdist,actionlint and all hooks passed. Exactce48 hosted qualification completed26SUCCESS and the sole configured Python3.15 prerelease skip;its required exception validator passed. Both nine-platform supported and nine-platform ecosystem matrices passed. No gate bypass or blind rerun.

Compatibility and scope

The qualified workflow uses immutable Engineer source;published0.1.6 requires Specs<0.2 and cannot resolve with current Data. The guide records the source candidate and resolver boundary instead of claiming released-package compatibility. No consumer is a mandatory Data dependency.

No new release, tag, package publication or documentation deployment. Existing0.2.1 remains immutable. The independently reviewed-green aiohttp security update landed through PR116 as728b84c and is incorporated from current main without mixing its attribution into this implementation.

Security prerequisite PR123 landed9b366707cfad6b3844e92f0638f15e09aa13f611 after all applicable gates passed. Normal guarded main reconciliation producedce48;source/tests/docs remain byte-identical to qualifiedbfc and all new-head checks passed.

AI assistance was used for implementation, regression tests and documentation. The substantive diff, producer failure controls and consumer outputs were reviewed in this owner workflow. Merge remains conditional on all final-revision gates.

Stefan Jansen added 7 commits October 20, 2026 16:53
…offs

Retain timestamp precision, declared label clocks and source keys. Keep sparse price panels reversible without filling observations or rounding integer prices. Exercise actual disk, calendar and recovery workflows plus an offline migration recipe.

Refs #117
Record the installed wheel/sdist consumer versions and the incompatible published Engineer boundary. Add a regression that retains a wholly null input session instead of compressing its clock.

Closes #117
…tinctions

Reproduce naive New York instants shifted to UTC incorrectly and preserve them through bounded disk reads. Keep source NaN distinct from null across price panels and retain pandas label timezones. Validate bad timezone metadata before replacing source generations.

Refs #117
Keep axis identity and native schema metadata serializable without Arrow as a runtime requirement. Exercise an actual pandas Parquet round trip retaining absent observations, nulls and source dtypes. Document the native panel APIs and remove unqualified storage timing claims.

Refs #117
Copilot AI balanced review requested due to automatic review settings October 20, 2026 21:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stefan-jansen
stefan-jansen merged commit d30b180 into main Oct 20, 2026
27 checks passed
@stefan-jansen
stefan-jansen deleted the feat/observation-fidelity branch October 20, 2026 23:14
@stefan-jansen
stefan-jansen restored the feat/observation-fidelity branch October 20, 2026 23:15
@stefan-jansen
stefan-jansen deleted the feat/observation-fidelity branch October 20, 2026 23:25
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.

Preserve observation fidelity through storage and pandas handoffs

2 participants