Repository navigation
feat: offline read-only SQLite copy of events (#257) - #259
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77d2611757
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case eventsSyncCommand, eventsOfflineCommand: | ||
| return executeOfflineEvents(ctx, definition, argv, dependencies, pretty) |
There was a problem hiding this comment.
Honor or reject dry-run before writing the offline database
With valid credentials, events sync --when past --dry-run still creates or updates the SQLite database: Execute consumes --dry-run globally, but this dispatch drops execution, and executeOfflineEvents unconditionally opens the writable store and calls Upsert. A caller attempting a safe preview therefore changes persisted event data without warning. Pass the dry-run state through and avoid writing during previews, or explicitly reject the unsupported flag instead of silently performing the sync.
AGENTS.md reference: AGENTS.md:L74-L74
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🤖 Kaleb's Grok Bot: Fixed in 6388f28. events sync --dry-run now returns a redacted preview and does not create or update the SQLite database, matching the AGENTS.md dry-run preview rule.
|
🤖 Kaleb's Grok Bot: Kaleb approved merging this PR. Removing the held label and squash-merging. |
🤖 Kaleb's Grok Bot:
Summary
Cache the user's Partiful event summaries and RSVP statuses in SQLite, then query them offline.
Spec operations used:
getMyPastEventsForHomePageandgetMyUpcomingEventsForHomePage, selected individually by--when. Both returnHomePageEvent.guest.statususingGuestStatus, including GOING. Neither list exposes confirmed attendance. Past GOING remains an RSVP, not a claim that the user attended. No per-event follow-up calls, spec changes, or Partiful writes.Commands and flags:
events sync --when past|upcoming [--db PATH] [--limit 1..1000]: defaults to 1000; returns synced/available counts and hasMore. It stores all returned RSVP states so later changes can replace GOING. Repeating sync upserts without duplicates. Cached rows absent from a later list are retained.events offline [--db PATH] [--limit 1..1000] [--status STATUS|all] [--since RFC3339] [--until RFC3339]: defaults to 50 and going; inclusive start bounds, deterministic ordering, unknown starts excluded by date filters. No credentials required.partiful/events.sqlite. Separate DB per account. SQLite files and sidecars are gitignored.Tables:
events:event_id TEXT PRIMARY KEY, nullable TEXTtitle,start,end,timezone,state,user_role,my_rsvp;synced_at TEXT NOT NULL. UTC canonical start/end strings; index on(my_rsvp, start).metadata:key TEXT PRIMARY KEY,value TEXT NOT NULL; account fingerprint prevents combining accounts. Raw user IDs and raw API payloads are never stored.Dependency:
modernc.org/sqlite v1.34.5, plus its transitive dependencies. This pure-Go database/sql driver preserves CGO-free native builds and the existing Go 1.22 module requirement. No Node or npm release step.Deliberate golden/schema changes: register both commands, flags, inputs, success results, failures and local/read-only safety; bump product revision to
2026-11-20.1; update schema golden, executable catalog expectations and native smoke catalog. Error golden adds OFFLINE_OPTIONS_INVALID and OFFLINE_STORE_UNAVAILABLE. Inline envelope fixtures receive the revision update. README and AGENTS command catalog updated. The PII allowlist narrowly covers two public Go pseudo-versions whose timestamps trigger the phone/card scanner.Evidence
go mod verify,go test ./...,go test -race ./...,go vet ./...,go build ./..., and./scripts/verify-native-release.sh. All six CGO-free native archives built, checksums verified, and safe smoke checks passed. No live Partiful calls or credentials used.Merge Danger
Door: two-way
Blast Radius: local
Only the local SQLite database is persisted by these commands. Authentication refresh uses the existing non-persisting path. Local cached snapshots can become stale; no confirmed attendance inference is made. Held for Kaleb's review; do not auto-merge.
Refs #257