Skip to content

Replay retained logs on remote enrollment - #1034

Open
platypii wants to merge 1 commit into
masterfrom
fix-local-to-remote-history-sync
Open

Replay retained logs on remote enrollment#1034
platypii wants to merge 1 commit into
masterfrom
fix-local-to-remote-history-sync

Conversation

@platypii

Copy link
Copy Markdown
Contributor

Summary

  • scope central export progress by canonical server origin plus organization
  • replay all retained, sync-eligible history on first enrollment to a destination
  • resume prior progress when reconnecting to the same destination
  • adopt legacy unscoped progress once for the currently authenticated organization
  • preserve local-only, client opt-out, and dataset privacy withholding

This completes the client side of the local-first upgrade path: a user can capture locally for days or weeks, then run hyp remote login, hyp join, or choose remote sync in setup and have retained eligible history sent on the first released sync. Progress remains isolated if the user later enrolls with another server or organization.

Server prerequisite

Requires hyparam/hypaware-server#387, which adds the stable organization identifier to bootstrap and refresh responses. That PR is merged, deployed, and validated against production. Production refresh returned org: "hyperparam", with stable origin and organization across refresh. Validation used an empty temporary HYP_HOME, so it uploaded no logs and did not touch the real local cache or configuration.

Compatibility and privacy

Existing unscoped progress is adopted once for the current destination so already-acknowledged rows do not replay after upgrade. This relies on the confirmed field state that no existing users have changed organizations. New destinations receive separate state and replay retained eligible history.

The shared usage-policy seam is unchanged. Local-only rows, opted-out client rows, and privacy-ineligible datasets remain withheld.

Validation

  • focused remote identity, login, rejoin, rollout, and forwarding tests: passed
  • LLP reference and cross-branch number checks: passed; new decision is LLP 0315
  • relevant enrollment, forwarding, privacy, outbox, and attach smokes: passed before the clean rebase
  • production server bootstrap/refresh contract: validated
  • npm test on current master plus this commit: 5,302 passed, 1 skipped, 1 unrelated failure in test/core/cache-inplace-compaction.test.js
  • npm run typecheck on current master plus this commit: blocked by an unrelated existing error in src/core/cache/maintenance.js:1345

This branch does not modify either failing cache file. Before origin/master advanced to v1.27.0, the full suite passed with 5,220 tests and typecheck passed.

@platypii platypii added neutral:adopt Foreign PR adopted into neutral's reconcile scope and removed neutral:adopt Foreign PR adopted into neutral's reconcile scope labels Aug 27, 2026
@platypii
platypii force-pushed the fix-local-to-remote-history-sync branch from 8d3230e to 6ff8e1f Compare August 31, 2026 06:09
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