Skip to content

Harden sync reliability for v0.2 beta - #1

Merged
nirvanasangsara-AI merged 1 commit into
mainfrom
codex/harden-v0-2
Aug 10, 2026
Merged

Harden sync reliability for v0.2 beta#1
nirvanasangsara-AI merged 1 commit into
mainfrom
codex/harden-v0-2

Conversation

@nirvanasangsara-AI

Copy link
Copy Markdown
Owner

Outcome

Prepares the public v0.2 beta with explicit failure reporting, privacy-minimized state storage, safer summary-only FIT conversion, stronger automated testing, dependency/security automation, and bilingual documentation updates.

Key changes

  • returns exit code 1 when any activity in a batch fails, while retaining successful results and retrying failures later
  • migrates the SQLite state schema to remove raw Garmin response payloads without losing duplicate-prevention history
  • prevents orphan sensor arrays from being attached to a synthesized summary-only timeline
  • pins background-service calls to /bin/launchctl
  • expands synthetic tests to 25 cases and enforces 80% minimum coverage (currently 81%)
  • adds Bandit, pip-audit, Dependabot, third-party license notices, changelog, and beta test guidance

Validation

  • uv run coverage run -m pytest -q — 25 passed
  • uv run coverage report — 81%
  • uv run ruff check . — passed
  • uv run bandit -q -r src/nrc_volt_sync — passed
  • uv run pip-audit — no known vulnerabilities
  • uv build — source archive and wheel built
  • isolated wheel install and nrc-volt-sync --help — passed

All fixtures use synthetic identifiers and data. No credentials, real activity IDs, FIT files, GPS traces, or provider payloads are included.

@nirvanasangsara-AI
nirvanasangsara-AI marked this pull request as ready for review August 10, 2026 07:59
@nirvanasangsara-AI
nirvanasangsara-AI merged commit be67fab into main Aug 10, 2026
2 checks passed
@nirvanasangsara-AI
nirvanasangsara-AI deleted the codex/harden-v0-2 branch August 10, 2026 07:59

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64761450f2

ℹ️ 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".

Comment thread src/nrc_volt_sync/fit.py
cadences = _data(streams, "cadence")
watts = _data(streams, "watts")
moving = _data(streams, "moving")
if summary_only:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve sensor streams when only distance samples are missing

When Strava returns a valid time stream with aligned GPS, heart-rate, cadence, or other samples but omits only the distance stream, summary_only becomes true and this block erases every genuine sensor array. The resulting FIT permanently loses available route and health data even though the real time stream can still provide the record timeline; handle the missing distance stream separately instead of discarding all aligned source streams.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

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