Google Calendar pull sync
State: open/building · Kind: module · Audience: system
Summary
Section titled “Summary”- Pulls Google Calendar events per configured pair and plans vault changes without writing event notes.
- Keeps a per-pair syncToken cursor in a checksummed state file guarded by a lock shared with the node arm.
Statement
Section titled “Statement”The crate is the Rust port of the calendar-sync app. It reads the pair config from the vault, calls the Google Calendar events API with retry and backoff, maps events to local notes, and returns a typed plan report. Outside dry-run, the only write is the syncToken cursor and lastRunAt in the state dir. The reconciler that would create, edit and delete event notes is unbuilt. The state envelope and its lock are byte-compatible with the node arm, so either arm can read what the other wrote. A hard git-ignore check on the secrets dir stops an OAuth token from being committed. The Rust arm cannot authorize or refresh a token, so the node arm is still required for that.
What it provides
Section titled “What it provides”- Plan report of create/update/delete items from a Google Calendar pull (run_pull)
- Per-pair syncToken cursor in a checksummed state envelope (load_state, save_state)
- Cross-arm sync.lock (acquire_lock)
- Calendar API trait with an HTTP implementation and retry/backoff (CalendarApi)
- Sync port implementation for the platform (CalendarSync)
- Status snapshot and read-only auth probes
Underlying implementation
Section titled “Underlying implementation”- solutions/determined/crates/determined-sync/src/pull.rs
- solutions/determined/crates/determined-sync/src/gcal.rs
- solutions/determined/crates/determined-sync/src/state.rs
- solutions/determined/crates/determined-sync/src/lock.rs
- solutions/determined/crates/determined-sync/src/port.rs
Locations
Section titled “Locations”solutions/determined/crates/determined-sync/solutions/determined/crates/determined-sync/src/pull.rs#run_pullsolutions/determined/crates/determined-sync/src/gcal.rs#CalendarApisolutions/determined/crates/determined-sync/src/port.rs#CalendarSyncsolutions/determined/crates/determined-sync/src/lock.rs#acquire_locksolutions/determined/crates/determined-sync/src/state.rs#save_state