Skip to content

fix(examples): preserve dataframe envelopes and empty schema - #165

Open
TimeToBuildBob wants to merge 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/dataframe-envelope-empty-schema
Open

TimeToBuildBob wants to merge 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/dataframe-envelope-empty-schema

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Summary

  • Normalize payload columns separately, then attach the authoritative UTC timestamp index and timedelta duration.
  • Rename reserved payload columns with an unused repeated data. prefix across the full result, including collision-of-collision names.
  • Give empty results a typed timestamp/duration schema and exportable header without changing the optional prompt.
  • Document the naming contract and add six offline actual-main display/CSV regressions in the existing examples CI discovery path.

Reproduction

Fetched master c88cf12: empty queries raise KeyError(timestamp), and payload timestamp/duration overwrite envelope values. New tests first reproduced four failures with two ordinary controls passing.

Verification

  • Six new example tests pass, including export yes/no, mixed offsets, fractional duration, input nonmutation and repeated-prefix collisions.
  • Existing repository offline test target: 122 passed; Linux auth tests: 3 passed.
  • make typecheck: clean (31 files); owned Ruff lint/format and git diff --check pass.
  • Filing-time external probe: ordinary, empty and collision cases all pass on this branch.
  • make test-fast is not defined in this repository; ran its offline make test target instead. Whole-tree Ruff reports an existing UP031 in unchanged aw_client/queries.py.

No production history, live server, remote export or canonical-query behavior was exercised. Existing pandas literal-dotted/nested payload-path alias behavior is explicitly unchanged.

Git-Session-Id: 6132cfcc-d334-4685-b9de-d711c87f332d
@TimeToBuildBob

TimeToBuildBob commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 AI code review

Safe to merge — no P0/P1 findings

Confidence 5/5

✅ No findings. The diff looks correct to me on this pass.

Reviewed ebea16e17c51 · openrouter/deepseek/deepseek-v4-flash-0731 · panel (in-band) engine · 20s · about this reviewer

Maintainer commands

@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Preserves event timestamps and durations when payload fields use the same names.

  • Dataframe exports keep event times separate from payload fields.

Acknowledged limitation: TimeToBuildBob explicitly states that pandas’ existing behavior for literal dotted keys and matching nested paths is unchanged.

Reviews (1) · Last reviewed commit: "fix(examples): preserve dataframe envelo..." · Reviewed by Greptile

Git-Session-Id: 67650616-bd07-5232-aaf4-a2690af49abc
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Fixed the CI setup failure in c32c9e4: pinned the Linux Build runner to ubuntu-24.04, retaining Python 3.9 and the Windows/macOS jobs. The failed run used Ubuntu 26.04 and stopped in setup-python before dependency installation or tests.

Local verification: 128 offline tests pass (122 repository tests plus the six dataframe regressions); mypy passes for all 31 source files, workflow YAML/matrix assertions and git diff --check pass. No application code changed. The new head is on GitHub and its checks are queued/running; cross-platform CI is not yet verified.

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

CI-green and mergeable (Greptile 5/5) — waiting only on a maintainer click.

This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted.

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