JuliusBrussee/caveman · error · Error
sync incomplete
Error message
sync incomplete — ${failures.join("; ")} What it means
The sync command runs multiple lanes (e.g. practice findings upload and local scan upload) in parallel with Promise.allSettled-style handling, collecting per-lane failure descriptions. If any lane failed, the command throws an aggregate error listing all failures joined by semicolons, so nothing is silently dropped.
Solutions
- Parse the aggregated message: each `lane: reason` segment names the failed lane and root cause; fix each underlying cause
- Re-run the sync command after fixing — lanes are retried in full on the next invocation
- If only one lane matters, check its specific sub-error (e.g. re-login for remote lanes, repair snapshot for local scan)
- Check network/VPN and API status if failures mention fetch/HTTP
Defensive patterns
Strategy: try-catch
Validate before calling
const offline = !(await fetch("https://api.example.com/health").then(r => r.ok).catch(() => false));
if (offline) console.warn("network down: sync lanes will fail"); Try / catch
try {
await syncAll();
} catch (e) {
const lanes = (e as Error).message.replace("sync incomplete — ", "").split("; ");
for (const lane of lanes) console.error(`failed lane: ${lane}`); // retry only failed lanes
} Prevention
- Check connectivity/auth before invoking multi-lane syncs
- Read each `lane: reason` segment to target fixes precisely
- Re-run the whole sync command — lanes are safe to retry
- Keep local snapshots valid so the local-scan lane cannot fail
When it happens
Trigger: Any sync lane rejects — e.g. the local scan lane throws (network error, invalid snapshot like error 480, findings sync HTTP failure like error 481) — producing a non-empty `failures` array at the end of syncMcp-ish flow.
Common situations: Being offline or behind a proxy so one lane's HTTP call fails while others succeed; an expired auth token failing only the remote lane; a corrupt local snapshot failing only the local lane.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- result.error?.message ?? `practice findings sync failed
- AbortError
- awscreds: read response
- awscreds: read sts response
- awscreds: request failed
AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20).
Data as JSON: /api/errors/c85b8a36df7051f0.
Report an issue: GitHub.
Appendix: source
Thrown at packages/cli/src/index.ts:10514
if (out.firstSync) console.log(SYNC_DISCLOSURE);
console.log(syncSavingsLine(out));
}
} else {
failures.push(`local spans: ${syncLaneError(savingsLane.reason)}`);
}
if (practicesLane.status === "fulfilled") {
if (practicesLane.value.kind === "synced") {
console.log(`synced ${practicesLane.value.findings} local practice findings · basis: inferred (tokens only; no payload evidence)`);
}
} else {
failures.push(`practice findings: ${syncLaneError(practicesLane.reason)}`);
}
if (localScanLane.status === "fulfilled") {
if (localScanLane.value.kind === "synced") console.log(localScanSyncLine(localScanLane.value));
} else {
failures.push(`local scan: ${syncLaneError(localScanLane.reason)}`);
}
if (failures.length > 0) throw new Error(`sync incomplete — ${failures.join("; ")}`);
}
function syncLaneError(reason: unknown): string {
return reason instanceof Error ? reason.message : String(reason);
}
// syncAfterLogin runs the same sync once right after a successful login so the
// dashboard immediately shows what the local proxy already measured. Strictly
// best-effort: a sync failure never fails the login.
async function syncAfterLogin() {
try {
const cfg = await config();
if (!cfg.token) return;
const [savingsLane, practicesLane, localScanLane] = await Promise.allSettled([
syncLocalSavings(cfg),
syncLocalPracticeFindings(cfg),
syncPendingLocalScan(cfg),
] as const);View on GitHub (pinned to 3ee70a1026)