#1132

feat: carry bounded data intervals through Dagster and DLT

Openiamgpwants to merge intofrom

Goal and scope

Carry explicit time windows from scheduling into ingestion, so adjacent loads and historical replay have bounded extraction semantics. Third PR in the stack; review its diff against the dataset-constraints branch.

Change map and risk

  • Add validated UTC half-open DataInterval values to runtime routing without changing the runtime-context protocol.
  • Translate Dagster calendar windows and backfill/replay mode, including daylight-saving transitions.
  • Add opt-in DLT interval_column and scheduled interval_lookback. Require merge writes and use stateless bounded DLT incrementals, preserving the live cursor.
  • Add a runnable lakehouse example, usage/guarantee guide, and the source research behind the three changes.
  • Leave Kafka checkpointing and legacy unbounded DLT state semantics unchanged.

Original verification

  • Original head focused interval/runtime/Dagster suites: 59 passed.
  • Final make check: 7,417 passed, four skipped, 194 integration-deselected; lint, formatting, Python/TypeScript types and repository consistency checks pass. make test-core-regression: 447 passed.
  • Canonical real MinIO/Nessie storage integration: 101 passed across seven suites. Installed-wheel verification covers 40 packages, without editable installs or repository-source imports.
  • Real public discovery → Dagster → DLT → Nessie/MinIO execution: boundary record 202 retained; late record 404 recovered through lookback; historical replay leaves destination IDs [101, 202, 404], without duplicates. Upper-boundary record 303 is excluded.
  • Real DLT extraction/local Iceberg transaction tests inspect a persisted live cursor across scheduling, replay, rejected writes, committed-but-reply-lost failure, retry, and empty extraction. Calendar tests include 23-hour and 25-hour days.
  • Reproduce against a disposable configured lakehouse: PHLO_OBSERVATORY_SETTINGS_BACKEND=memory uv run --locked python examples/data_intervals.py. See docs/guides/data-intervals.md for setup and semantics.
  • An initial full baseline run hit a process-shutdown timing failure in unchanged code; the original and integrated shutdown suites both passed in isolation, and the complete final rerun passed.
  • Links and generated references pass. Final production documentation build was blocked by the orb's confirmed 6 GiB memory limit, not claimed green.
  • New feature: regression coverage includes timezone boundaries, source bounds, replay, late arrivals, empty extraction and cursor preservation through failures.

Review correction

Absent sources and empty bounded extracts now share no-data finalisation, including the run observation. The real DLT/Iceberg regression reopens SQLite evidence: before the fix the run remained running; after it the run is no_data with an input resource recording zero records read for the correct attempt. All 178 selected DLT tests pass. This branch also includes the quality corrections from the preceding PRs.

The original-head GitHub run did not pass: its JavaScript lane stalled downloading Ubuntu browser dependencies and was cancelled before test execution, causing the aggregate gates to fail. The updated head requires a fresh CI result.

Post-correction head: make check passes with 7,419 tests, four skipped and 194 deselected, including lint, complexity, formatting, types and repository consistency checks. make test-core-regression passes all 447 tests. The DLT suite passes 178 selected tests, with two deselected.

Recovery and maintainer decisions

Opt-in; no migration, deployment, or extra checkpoint store. Remove interval declarations before downgrading. Stable non-null keys are required for retry-safe merges. Source authors must push bounds into API/SQL queries themselves; arbitrary custom source state is outside the guarantee. No external-cursor/table atomicity, contiguous watermark, or multi-file atomic commit is promised. Inspect ambiguous writes before retrying. Maintainer review is pending; no independent reviewer or release qualification is claimed.


    

Activity

7
coldtea-pr-lens[bot]4d ago
  • Redraw · drawn at 0b21c53, the branch has moved on

Architecture

Inside the changed components — 1 view

Component view — dlt Ingestion

Internal modules and contracts executing bounded extraction

Data flow


Review

1 finding addressed · reviewed 0b21c53

TIP

Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion
  • Set github.description: false in .github/pr-lens.yml to stop PR Lens adding buttons to your PR descriptions

Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it. 

coldtea-pr-lens[bot]reviewed4d ago
coldtea-pr-lens[bot]reviewed4d ago