Skip to content

fix(deterministic): carry intraday times in BreakDummy names and errors - #225

Open
thomaspinder wants to merge 1 commit into
feat/135-deterministic-regressorsfrom
fix/195-breakdummy-intraday
Open

fix(deterministic): carry intraday times in BreakDummy names and errors#225
thomaspinder wants to merge 1 commit into
feat/135-deterministic-regressorsfrom
fix/195-breakdummy-intraday

Conversation

@thomaspinder

Copy link
Copy Markdown
Owner

Summary

Follow-up on the deterministic-regressors branch (#191), stacked on feat/135-deterministic-regressors:

BreakDummy truncated timestamps to dates in both column names and error messages — an intraday pulse errored with a message naming a date that is on the index (the dropped time being the real cause), and two same-day intraday breaks collided in the duplicate-name check. Names now render {kind}_{YYYY-MM-DD} at midnight (unchanged, regression-pinned) and ISO-8601 extended (...THH:MM, seconds/fractions only when non-zero) otherwise. The rendering is injective (distinct timestamps cannot collide) and round-trips (pd.Timestamp(name.removeprefix("pulse_")) recovers the date) — both properties tested. Error messages use the same renderer for the break date and the neighbour timestamps.

Also adds an hourly-frequency fixture to the continuation-property matrix (including a two-intraday-breaks design), and the how-to's column-name contract table gains the intraday row.

Closes #195

Gates

400 deterministic tests green (was 313); branch fast suite 935 passed; ruff/ty clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Egjd7ToFeb9TQqFnfRQZxV

@codecov-commenter

codecov-commenter commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.3%. Comparing base (3e747c7) to head (08679ca).

Additional details and impacted files
@@                        Coverage Diff                        @@
##           feat/135-deterministic-regressors    #225   +/-   ##
=================================================================
  Coverage                               95.3%   95.3%           
=================================================================
  Files                                     46      46           
  Lines                                   3349    3361   +12     
  Branches                                 427     430    +3     
=================================================================
+ Hits                                    3194    3206   +12     
  Misses                                   111     111           
  Partials                                  44      44           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thomaspinder
thomaspinder force-pushed the feat/135-deterministic-regressors branch 2 times, most recently from 54ee46a to 3e747c7 Compare July 29, 2026 21:05
`BreakDummy.column_names` rendered `strftime('%Y-%m-%d')` and the
in-sample check printed `date.date()`, so an intraday break lost its
time in both. Two consequences: `BreakDummy(date="2000-02-01 12:00")`
and `BreakDummy(date="2000-02-01")` collided on `level_2000-02-01`, and
a `"pulse"` that missed the index reported a date that *is* on the
index — the dropped time being the actual cause.

Both now go through `_format_break_timestamp`, which keeps midnight
bare (`2000-02-01`, every timestamp on a daily-or-coarser index) and
renders anything else ISO-8601 extended (`2000-02-01T12:00`, seconds
and a fractional part appended only when non-zero). The rendering is
injective, so same-day intraday breaks stay distinct columns, and it
round-trips through `pd.Timestamp`. Names depend on `self.date` alone,
so they are identical across `build` and `extend`; hourly continuation
cases pin that.

Closes #195

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Egjd7ToFeb9TQqFnfRQZxV
@thomaspinder
thomaspinder force-pushed the fix/195-breakdummy-intraday branch from a773a7c to 08679ca Compare July 29, 2026 22:00
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.

2 participants