Skip to content

Report BullMQ progress for all jobs - #1597

Merged
Asherlc merged 9 commits into
mainfrom
Asherlc/garmin-dump-progress
Jul 14, 2026
Merged

Asherlc merged 9 commits into
mainfrom
Asherlc/garmin-dump-progress

Conversation

@Asherlc

@Asherlc Asherlc commented Jul 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add BullMQ progress updates to every active job processor that was missing them.
  • Surface Garmin dump parent progress and FIT child job progress throughout import processing.
  • Cover scheduled sync, post-sync, activity analytics, import, Garmin dump, and FIT import progress with tests.

Tests

  • pnpm lint
  • pnpm tsc --noEmit
  • packages/server: pnpm tsc --noEmit
  • packages/web: pnpm tsc --noEmit
  • CLICKHOUSE_URL=http://default:health@127.0.0.1:8123 CLICKHOUSE_PASSWORD=health CI=1 pnpm test

Summary by cubic

Adds resilient, standardized BullMQ progress reporting across imports, scheduled sync, post‑sync, and analytics. garmin-dump now reports start/read/found counts and per‑FIT child updates; malformed child results are handled safely and do not block the parent.

  • New Features

    • Scheduled sync: start/load/found counts; live “Scheduled X, skipped Y” updates while dispatching (combines cooldown + in‑flight); final summary.
    • Imports: Apple Health (stream‑scaled); strong-csv, cronometer-csv, kaya-export, zos-app with start/read/import/complete; garmin-dump progress forwarded to BullMQ.
    • FIT file import: start/read/decode/import/write/complete with activity‑ vs weight‑specific messages.
    • garmin-dump: start/reading/found counts; per‑FIT completion updates as each child finishes; final complete.
    • Post‑sync and activity analytics: clear step updates; user refit reports “completed with errors” when any step fails; global maintenance start/complete.
  • Bug Fixes

    • Progress update failures never interrupt jobs; warnings logged and sent to Sentry with tags: import-progress-update, scheduledSyncStep, postSyncStep, fitImportStep, activityAnalyticsStep, garminDumpStep.
    • garmin-dump safely handles malformed FIT child results (reported to Sentry) and continues; child failures and progress callback errors are captured without aborting.
    • Scheduled sync continues despite progress failures and reports combined skipped counts.
    • Preserves import failure logging for zos-app (completion logged with error details before throwing).
    • Shared reportJobProgress helper standardizes progress logging and Sentry tagging across jobs.

Written for commit 236892b. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added more granular progress reporting across activity analytics, FIT imports, scheduled sync dispatch, general imports, and post-sync maintenance/refit flows.
    • Progress updates now cover key milestones (start/reading/processing/importing/invalidation/completion) and include “skipped” messaging where work is not run.
    • Garmin dump imports now report progress from file discovery through per-FIT processing.
  • Bug Fixes

    • Progress callback failures no longer stop jobs; they now log warnings and report the errors while continuing processing.

Copilot AI review requested due to automatic review settings July 13, 2026 21:50
@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @Asherlc, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Progress reporting was added to analytics refresh, FIT import, provider import, post-sync, scheduled sync, and Garmin dump workflows. Job interfaces and provider options now accept progress callbacks, with tests covering staged percentages, messages, and failure handling.

Changes

Progress reporting

Layer / File(s) Summary
Analytics refresh progress
src/jobs/process-activity-delete-analytics-job.ts, src/jobs/process-activity-delete-analytics-job.test.ts
Analytics refresh jobs report progress while waiting, rebuilding read models, invalidating caches, and completing.
Garmin dump progress
src/providers/garmin-dump.ts, src/providers/garmin-dump.test.ts
Garmin dump imports report parsing, discovery, child FIT completion, and final progress, while tolerating callback failures.
FIT file import progress
src/jobs/process-fit-file-import-job.ts, src/jobs/process-fit-file-import-job.test.ts
FIT imports emit staged decoding, branch, writing, and completion updates; callback failures are logged and captured without failing the import.
Provider import progress
src/jobs/process-import-job.ts, src/jobs/process-import-job.test.ts
Provider-specific imports report staged progress and forward Garmin dump callbacks to the job.
Post-sync progress
src/jobs/process-post-sync-job.ts, src/jobs/process-post-sync-job.test.ts
Maintenance and per-user refit jobs report progress through their processing phases and capture update failures.
Scheduled sync dispatch progress
src/jobs/process-scheduled-sync-job.ts, src/jobs/process-scheduled-sync-job.test.ts
Scheduled sync reports setup, provider dispatch decisions, processed connections, skipped counts, and final totals.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant processImportJob
  participant importGarminDumpFile
  participant enqueueFitFileImportJobs
  participant BullMQJob
  processImportJob->>importGarminDumpFile: provide onProgress callback
  importGarminDumpFile->>enqueueFitFileImportJobs: enqueue FIT imports
  enqueueFitFileImportJobs->>importGarminDumpFile: report child completion
  importGarminDumpFile->>processImportJob: forward progress payload
  processImportJob->>BullMQJob: updateProgress percentage and message
Loading

Possibly related PRs

  • Asherlc/dofek#1161: Touches post-sync progress reporting and Sentry handling around progress updates.
  • Asherlc/dofek#1310: Modifies the activity analytics refresh flow updated here with progress reporting.
  • Asherlc/dofek#1594: Modifies the FIT import pipeline that this change wires for progress reporting.

Suggested labels: area/providers, type/feature, breaking-change

Suggested reviewers: cubic-dev-ai

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title matches the change, but it omits the required area prefix even though the PR spans backend job processors. Prefix it with the relevant area, e.g. "[server] Report BullMQ progress for all jobs", and keep it imperative.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 12 files

Confidence score: 4/5

  • In src/jobs/process-import-job.ts, the Garmin progress helper fire-and-forgets BullMQ progress writes, so importGarminDumpFile can report parent progress out of order or late relative to later stages; merging as-is mainly risks misleading job status/UX rather than import correctness — make the progress callback await (or otherwise serialize) BullMQ writes before merging to keep stage progress monotonic.

You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/jobs/process-import-job.ts">

<violation number="1" location="src/jobs/process-import-job.ts:37">
P2: Garmin parent progress can lag or arrive after a later stage because this helper fire-and-forgets every BullMQ progress write; `importGarminDumpFile` explicitly awaits its `onProgress` callback, but this callback returns `void`. Returning the update promise and awaiting the stage reports would preserve progress ordering before the processor advances or completes.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/jobs/process-post-sync-job.ts Outdated
Comment thread src/jobs/process-post-sync-job.ts Outdated
Comment thread src/jobs/process-activity-delete-analytics-job.test.ts
Comment thread src/jobs/process-activity-delete-analytics-job.test.ts
Comment thread src/jobs/process-scheduled-sync-job.ts Outdated
Comment thread src/providers/garmin-dump.ts Outdated
Comment thread src/jobs/process-import-job.ts Outdated
Comment thread src/jobs/process-fit-file-import-job.ts
Comment thread src/jobs/process-import-job.ts Outdated
Comment thread src/jobs/process-fit-file-import-job.test.ts
@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Requires human review: Auto-approval blocked by 11 unresolved issues from previous reviews.

Re-trigger cubic

@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Requires human review: Auto-approval blocked by 11 unresolved issues from previous reviews.

Re-trigger cubic

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 4 files (changes from recent commits).

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Requires human review: Auto-approval blocked by 11 unresolved issues from previous reviews.

Re-trigger cubic

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
src/jobs/process-import-job.ts (2)

1-1: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Progress-update catches skip captureException in both new helpers. Both updateImportJobProgress and updateFitFileImportProgress were introduced by this PR to report BullMQ progress, but both catches only call logger.warn, never Sentry.captureException. As per path instructions, **/*.{ts,tsx}: "Never silently swallow errors — every unexpected catch must call captureException()."

  • src/jobs/process-import-job.ts#L37-41: add Sentry.captureException(error, { tags: { phase: "import-progress-update" } }) inside the catch (Sentry is already imported and used elsewhere in this file at lines 233-234/241-242).
  • src/jobs/process-fit-file-import-job.ts#L83-90: add the equivalent captureException call in updateFitFileImportProgress's catch (verify Sentry is imported in this file; add the import if not).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/jobs/process-import-job.ts` at line 1, Update the catch blocks in
updateImportJobProgress and updateFitFileImportProgress to call
Sentry.captureException with the caught error and the specified phase tag, while
preserving their existing logger.warn behavior. Ensure
process-fit-file-import-job.ts imports Sentry if needed, and do not alter
unrelated error handling.

Source: Path instructions


172-196: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Move the ZOS App completion update after the failure check

reportImportProgress(job, 90, "ZOS App import complete.") runs before the recordsSynced === 0 && errors.length > 0 throw, so a failing import can surface as “complete” just before rejecting. The 0x00 test case still passes here because importZosAppBin is mocked to resolve success by default, so it does not hit the decode-failure path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/jobs/process-import-job.ts` around lines 172 - 196, Move the
`reportImportProgress(job, 90, "ZOS App import complete.")` call in the
`zos-app` branch to after the `result.recordsSynced === 0 &&
result.errors.length > 0` failure check, ensuring failed imports throw before
reporting completion.
src/providers/garmin-dump.ts (1)

439-470: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Call onJobFinished outside the job-failure catch
If options.onProgress throws, this catch turns a successful FIT job into a synthetic failure, increments completedCount twice, and hides the original result. AGENTS.md also says every unexpected catch must call captureException(). Split the progress callback from the waitUntilFinished()/schema-parse failure path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/providers/garmin-dump.ts` around lines 439 - 470, Separate the
onJobFinished progress callback from the try/catch around waitUntilFinished and
fitFileImportJobResultSchema.parse so a progress error cannot convert a
successful job into a synthetic failure or increment completedCount twice.
Preserve failure-result creation only for job wait/parse errors, and call
captureException() for unexpected caught errors as required by AGENTS.md.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/jobs/process-activity-delete-analytics-job.ts`:
- Around line 30-73: Extract the duplicated rebuild, cache invalidation,
logging, and completion-progress sequence from the job handler into a shared
helper, parameterized by the branch-specific log text and an optional pre-wait
callback. Update the activity recompute, restore, and delete branches to perform
only their distinct waiting/progress steps before invoking the helper,
preserving their existing messages and behavior.
- Around line 13-14: Replace the broad updateProgress payload type in the
relevant job interface with an explicit object contract containing percentage
and message, using the appropriate primitive types inferred from every call site
in the file. Keep updateProgress returning Promise<void> and update all related
references only if needed to satisfy the narrowed contract.
- Around line 29-73: The updateActivityAnalyticsProgress helper should make
job.updateProgress failures non-fatal: wrap the awaited progress update in a
try/catch, report caught errors through captureException(), and return without
propagating them so analytics rebuild and cache invalidation remain successful
independently of progress reporting.

In `@src/jobs/process-fit-file-import-job.ts`:
- Around line 83-90: Update updateFitFileImportProgress so its catch handler
reports the caught error to Sentry via captureException in addition to the
existing logger.warn call. Preserve the current progress-update behavior and
warning context.

In `@src/jobs/process-import-job.ts`:
- Around line 37-41: Update updateImportJobProgress so its catch handler reports
the caught error through Sentry.captureException in addition to the existing
warning log, matching the error-reporting pattern used by other unexpected
catches in this file.
- Around line 37-45: Update updateImportJobProgress to return the promise from
job.updateProgress(info), while preserving its warning handling, and change
reportImportProgress to return that promise so callers such as
GarminDumpImportOptions.onProgress can await progress delivery and maintain
ordering.

In `@src/jobs/process-post-sync-job.ts`:
- Around line 11-19: Update updatePostSyncProgress to use a typed payload
containing only percentage and message, and catch failures from
job.updateProgress so progress-reporting errors are tolerated rather than
propagated into processPostSyncJob. Preserve the existing progress payload
values and job-processing flow.

In `@src/jobs/process-scheduled-sync-job.test.ts`:
- Around line 74-80: Update createScheduledSyncJob and the listed test call
sites to use direct processScheduledSyncJob invocations instead of Reflect.apply
with an undefined receiver and argument array. Ensure processScheduledSyncJob
accepts the local ScheduledSyncJob interface so each call passes the job and
dependencies directly while preserving existing test behavior.

In `@src/jobs/process-scheduled-sync-job.ts`:
- Around line 16-22: Apply the consolidated progress-callback error-handling
behavior to updateScheduledSyncProgress, keeping it consistent with the
corresponding implementation in process-post-sync-job.ts. Update the
job.updateProgress call as required while preserving the function’s existing
inputs and Promise<void> contract.
- Around line 11-14: Update the processScheduledSyncJob parameter type from
Job<ScheduledSyncJobData> to the local ScheduledSyncJob interface, then remove
the unused Job import. Preserve the existing function behavior while allowing
tests to invoke it directly without Reflect.apply.

In `@src/providers/garmin-dump.ts`:
- Around line 159-166: Update reportGarminDumpProgress to protect the optional
options.onProgress callback from rejected promises, matching the error-handling
behavior of updateFitFileImportProgress and updateImportJobProgress. Handle the
rejection within this helper so errors do not propagate into
importGarminDumpFile or its enqueueFitFileImportJobs callbacks.

---

Outside diff comments:
In `@src/jobs/process-import-job.ts`:
- Line 1: Update the catch blocks in updateImportJobProgress and
updateFitFileImportProgress to call Sentry.captureException with the caught
error and the specified phase tag, while preserving their existing logger.warn
behavior. Ensure process-fit-file-import-job.ts imports Sentry if needed, and do
not alter unrelated error handling.
- Around line 172-196: Move the `reportImportProgress(job, 90, "ZOS App import
complete.")` call in the `zos-app` branch to after the `result.recordsSynced ===
0 && result.errors.length > 0` failure check, ensuring failed imports throw
before reporting completion.

In `@src/providers/garmin-dump.ts`:
- Around line 439-470: Separate the onJobFinished progress callback from the
try/catch around waitUntilFinished and fitFileImportJobResultSchema.parse so a
progress error cannot convert a successful job into a synthetic failure or
increment completedCount twice. Preserve failure-result creation only for job
wait/parse errors, and call captureException() for unexpected caught errors as
required by AGENTS.md.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9d47ea82-861c-4c62-9aeb-d188c1073965

📥 Commits

Reviewing files that changed from the base of the PR and between 6a737c1 and 4b47e21.

📒 Files selected for processing (12)
  • src/jobs/process-activity-delete-analytics-job.test.ts
  • src/jobs/process-activity-delete-analytics-job.ts
  • src/jobs/process-fit-file-import-job.test.ts
  • src/jobs/process-fit-file-import-job.ts
  • src/jobs/process-import-job.test.ts
  • src/jobs/process-import-job.ts
  • src/jobs/process-post-sync-job.test.ts
  • src/jobs/process-post-sync-job.ts
  • src/jobs/process-scheduled-sync-job.test.ts
  • src/jobs/process-scheduled-sync-job.ts
  • src/providers/garmin-dump.test.ts
  • src/providers/garmin-dump.ts

Comment thread src/jobs/process-activity-delete-analytics-job.ts Outdated
Comment thread src/jobs/process-activity-delete-analytics-job.ts Outdated
Comment thread src/jobs/process-activity-delete-analytics-job.ts Outdated
Comment thread src/jobs/process-fit-file-import-job.ts
Comment thread src/jobs/process-import-job.ts Outdated
Comment thread src/jobs/process-post-sync-job.ts Outdated
Comment thread src/jobs/process-scheduled-sync-job.test.ts
Comment thread src/jobs/process-scheduled-sync-job.ts
Comment thread src/jobs/process-scheduled-sync-job.ts
Comment thread src/providers/garmin-dump.ts
@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Asherlc

Asherlc commented Jul 13, 2026

Copy link
Copy Markdown
Owner Author

Addressed the actionable PR-level review summaries from Cubic (submitted 2026-07-13T21:55:11Z) and CodeRabbit (submitted 2026-07-13T22:33:31Z).\n\nFixed.\n- Import progress writes now return/await Promise, so Garmin dump parent progress preserves ordering.\n- Progress-write failures in import, FIT import, post-sync, scheduled sync, activity analytics, and Garmin dump are best-effort and reported to Sentry.\n- ZOS App completion progress now runs after the zero-record failure check.\n- Garmin child FIT completion progress is separated from child job wait/parse failures so progress failures do not replace successful child results.\n- Scheduled-sync tests now call the processor directly, and progress milestone tests cover the missing assertions.\n- Commit: 1d8b8c2

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 12 files (changes from recent commits).

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread src/jobs/process-import-job.ts
Comment thread src/providers/garmin-dump.ts Outdated
@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

Re-trigger cubic

@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 4 files (changes from recent commits).

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Auto-approved: Adds BullMQ progress reporting to job processors with defensive error handling.

Re-trigger cubic

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/jobs/process-post-sync-job.ts`:
- Around line 14-23: Extract the duplicated progress failure-reporting logic
from updatePostSyncProgress into a shared reportJobProgress helper in a common
jobs module, parameterized by the Sentry tag key while preserving the existing
warning and exception-capture behavior. Update src/jobs/process-post-sync-job.ts
lines 14-23 to use the helper with postSyncStep, and replace
updateScheduledSyncProgress in src/jobs/process-scheduled-sync-job.ts lines
16-25 with the same helper using scheduledSyncStep.

In `@src/providers/garmin-dump.ts`:
- Around line 461-472: Update the error construction in the FIT child import
failure path to avoid using parsedResult.error.message directly, which exposes
the raw JSON-formatted Zod issues array. Use a concise, user-readable validation
failure message for SyncResult.errors while preserving the detailed
parsedResult.error for Sentry.captureException.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: da28887c-88ea-42b1-840e-93f603d36c0e

📥 Commits

Reviewing files that changed from the base of the PR and between 4b47e21 and 5ac9d0a.

📒 Files selected for processing (12)
  • src/jobs/process-activity-delete-analytics-job.test.ts
  • src/jobs/process-activity-delete-analytics-job.ts
  • src/jobs/process-fit-file-import-job.test.ts
  • src/jobs/process-fit-file-import-job.ts
  • src/jobs/process-import-job.test.ts
  • src/jobs/process-import-job.ts
  • src/jobs/process-post-sync-job.test.ts
  • src/jobs/process-post-sync-job.ts
  • src/jobs/process-scheduled-sync-job.test.ts
  • src/jobs/process-scheduled-sync-job.ts
  • src/providers/garmin-dump.test.ts
  • src/providers/garmin-dump.ts

Comment thread src/jobs/process-post-sync-job.ts
Comment thread src/providers/garmin-dump.ts
@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Asherlc

Asherlc commented Jul 13, 2026

Copy link
Copy Markdown
Owner Author

Addressed the CodeRabbit PR-level summary submitted 2026-07-13T23:39:55Z.

Fixed.

  • Added shared reportJobProgress helper for best-effort BullMQ progress writes with logger.warn and Sentry capture.
  • Replaced raw Zod issue output in Garmin FIT child import SyncResult errors with a concise readable message while keeping detailed Zod errors in Sentry.
  • Commit: 1928452fb

@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours. Upgrade to a paid plan for unlimited reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asherlc has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Asherlc
Asherlc merged commit c1f3080 into main Jul 14, 2026
103 checks passed
@Asherlc
Asherlc deleted the Asherlc/garmin-dump-progress branch July 14, 2026 00:06
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.

2 participants