Skip to content

Add map wrapper#16

Merged
darrell-d merged 6 commits intomainfrom
add-map-wrapper
Apr 27, 2026
Merged

Add map wrapper#16
darrell-d merged 6 commits intomainfrom
add-map-wrapper

Conversation

@darrell-d
Copy link
Copy Markdown
Contributor

@darrell-d darrell-d commented Apr 23, 2026

Catches up the python client to add push

Also wrapped commands for pennsieve map / pull / push / diff

Some readme updates, and some clean up to prevent review dog from touching generated gRPC files

darrell-d and others added 5 commits April 21, 2026 16:52
Sync agent.proto with pennsieve-agent and regenerate agent_pb2.py and
agent_pb2_grpc.py. Picks up Push (for map-based uploads) and Deregister
(account removal), both previously missing from the Python stubs.

Generated with grpcio-tools ~=1.51 / protobuf ~=4.21 to match the
project's pinned versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New Map class mirrors the manifest and timeSeries wrappers: constructed
against the agent stub, exposes the four map RPCs, and adds wait helpers
for the two fire-and-forget flows:

  - wait_for_pull polls .pennsieve/state.json for isLocal=True entries,
    since the agent doesn't emit pull-progress events.
  - wait_for_push subscribes and counts upload_status COMPLETE messages,
    which the existing UploadManifest flow already emits.

Wired onto Pennsieve.connect() as client.map. Tests cover RPC dispatch,
both pull wait happy path / timeout / late-arrival, invalid state.json,
and push completion counting / timeout via a fake streaming stub.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces blanket timeouts on wait_for_pull / wait_for_push with an
idle-timeout that resets on each progress event, so transfers of any
total duration succeed as long as the agent keeps making progress.
Fails fast only when the stream actually goes silent.

Defaults chosen for Pennsieve's dataset scale (~300-400 GB, ~700 MB
max file):
- wait_for_pull: 1800s (30 min) — must cover worst-case single-file
  download since state.json only updates per file completion.
- wait_for_push: 300s (5 min) — the agent emits IN_PROGRESS on every
  S3 chunk read, so any real silence means a stall.

Adds a Mapped Datasets section to the README documenting the wrappers,
the two progress signals, and how to override idle_timeout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread README.md Outdated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@jwagenaar jwagenaar left a comment

Choose a reason for hiding this comment

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

lgtm

@darrell-d darrell-d merged commit 6cc1134 into main Apr 27, 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

Development

Successfully merging this pull request may close these issues.

2 participants