Skip to content

Backup: carry the coach's setup, API keys and custom API included - #50

Merged
gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd
Oct 30, 2026
Merged

gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd

Conversation

@gabrielbr

Copy link
Copy Markdown
Owner

The coach's conversations, memories, summaries, goals and food preferences were already in the archive. Its setup was not. That setup lives in the encrypted pulseloop_secure store:

  • the provider;
  • every provider's API key and model;
  • the custom (local / own server) API's address, key, model, tool calling, structured output, max tokens and timeout.

So a phone change lost all of it. Calibration (BP / glucose offsets), physiology, units and coach check-in hours live in the same store and were lost the same way.

Change

  • ArchivedSettings carries an allowlist of keys from that store (SECURE_KEYS), not the whole file. The phone's own entries (onboarding, developer mode, ring app id) stay.
  • Restore writes back only those keys.
  • API keys are included, as the owner asked. The archive is plain JSON, so anyone with the file can read them. The Backup screen now says so, in a warning line under Data Backup, with the pt-BR string added.
  • AGENTS.md records the rule.
  • The design canvas's Backup board shows the new warning.

CI green on cd5103c. Not tried on a device.


Generated by Claude Code

The coach's provider, every provider's key and model, and the custom
(local / own server) API's address, key, model and options live in the
encrypted pulseloop_secure store, which the archive didn't carry, so a
phone change lost the whole coach setup. Calibration, physiology, units
and check-in hours live there too and were lost the same way.

ArchivedSettings now carries an allowlist of keys from that store
(SECURE_KEYS) and restores only those keys, leaving the phone's own
state in the file alone. The archive is plain JSON, so the Backup screen
now warns that backup files expose the API keys. AGENTS.md and the
design canvas's Backup board are updated to match.

Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
@gabrielbr
gabrielbr merged commit fb1d47d into main Oct 30, 2026
2 checks passed
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