Skip to content

fix(healthsync): one quiet skip line for unconfigured providers on pull - #2108

Open
pai-scaffolde wants to merge 1 commit into
danielmiessler:mainfrom
pai-scaffolde:fix/h-healthsync-quiet-unconfigured
Open

fix(healthsync): one quiet skip line for unconfigured providers on pull#2108
pai-scaffolde wants to merge 1 commit into
danielmiessler:mainfrom
pai-scaffolde:fix/h-healthsync-quiet-unconfigured

Conversation

@pai-scaffolde

Copy link
Copy Markdown

Reproduced on a fresh LifeOS 7.40.4 install (macOS, Claude Code in the Claude desktop app); the fix was applied to that install and run there before filing. Related: #1946 covered the SHORTCUT_SETUP.md pointer printed by status; this change does not touch status or that pointer.

Observed

MEMORY/OBSERVABILITY/health-sync.log, every hour (com.lifeos.healthsync, BackgroundServices.md:56):

[HealthSync] oura: unconfigured; records=0; ms=2; error=OURA_CLIENT_ID / OURA_CLIENT_SECRET not set in ~/.claude/.env
[HealthSync] eightsleep: unconfigured; records=0; ms=2; error=EIGHTSLEEP_EMAIL / EIGHTSLEEP_PASSWORD not set in ~/.claude/.env
[HealthSync] function: unconfigured; records=0; ms=2; error=FUNCTION_HEALTH_EMAIL / FUNCTION_HEALTH_PASSWORD not set in ~/.claude/.env

Three error-shaped lines an hour for a state that is not an error: no provider was ever configured.

Root cause

runPull() in LIFEOS/TOOLS/HealthSync.ts prints the same error= line for every source regardless of status. The provider modules return status: "unconfigured" with the missing-credential text in lastError, and the summary loop renders that as an error.

Fix (in the tool)

Group unconfigured and awaiting-first-export (the same pair runStatus() treats as "not set up") into one skipped (not configured): oura, eightsleep, apple, function line. ok and failed sources keep the detailed line; the per-source reason still lands in current.json and the healthsync.jsonl row (unchanged). A configured provider that fails still logs its error.

How tested

HOME=<tmp> bun LIFEOS/TOOLS/HealthSync.ts pull (store.ts derives .env, state, data and observability paths from HOME, so the run is hermetic):

unpatched: 4 lines — oura/eightsleep/function "unconfigured; ... error=<CREDS> not set", apple "awaiting-first-export; ... error=none"
patched:   1 line  — [HealthSync] skipped (not configured): oura, eightsleep, apple, function

On the live install the hourly job now logs the single skip line.

🤖 Generated with Claude Code

`HealthSync.ts pull` (hourly via com.lifeos.healthsync) printed one
`<source>: unconfigured; ... error=<CREDENTIALS> not set in ~/.claude/.env`
line per provider on every run, so a stock install with no Oura, Eight
Sleep or Function Health credentials logged three error-shaped lines an
hour for a state that is not an error. Group unconfigured and
awaiting-first-export sources into a single
`skipped (not configured): ...` line; ok/failed sources keep the detailed
line, and current.json plus the healthsync JSONL row still carry the
per-source reason.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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