feat(sync): opt-in workspace sync (extension-host, WIP-aware) - #315
feat(sync): opt-in workspace sync (extension-host, WIP-aware)#315aarontrowbridge wants to merge 2 commits into
Conversation
f43f88f to
78f537e
Compare
… vault, mounts.toml) (#312) - vault_setup.ts: ensureVaultEcosystem() — idempotent, never throws: ensureArmoniaDataDirs, ensurePersonalVault, ensurePublicVault (shallow clone vault-public, 10s cap, offline placeholder), ensureMountsToml (absent-only, personal rw first, public ro second) - extension.ts: call ensureVaultEcosystem() before first prepareOpencodeProject so mount stack is correct on boot; remove now-redundant ensureDefaultPersonalVault - trees.ts: update Armonia placeholder to reflect auto-provision - tools/bootstrap-armonia.sh: mirror same three vault steps as idempotent block (CLI/extension order agnostic), curl-able - tools/migrate-to-armonia.sh: three-bucket repos routing (packages/, demos/, flat), bucket-converging on re-run - skills/amico-vault/SKILL.md: vault-* naming in kinds table, new First-run lifecycle subsection for vault-public (kind=public, ro)
Single toggle amicode.sync.enabled (off by default, first-run nudge). Extension-host missed-nightly check (>20h) + Amicode: Sync now command. Generic scope: any git repo under workspace folders. WIP-aware: clean WIP auto-rebases onto freshly fast-forwarded main, dirty skips rebase and only updates main ref, conflicts abort cleanly. Subtle UX: Output channel + notifications only on attention-needed. Pure helpers are tested with injected git runner. Closes #314
a090219 to
8c149b4
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Hygiene sweep 2026-08-27: CONFLICTING with main (#314's slice). Rebase or close — workspace-sync landscape changed since 2026-08-09. |
|
Closing stale draft — opt-in workspace sync. The sync and fleet architecture has evolved significantly. Re-open from a fresh branch if needed. |
Closes #314
Summary
Opt-in workspace sync, extension-host, user-focused, open-source.
amicode.sync.enabled(off by default, first-run nudge). Global setting, change anytime.>20hsinceglobalState.lastSyncAt, run within 30-120s (jitter). Plus Amicode: Sync now in Command Palette.workspace.workspaceFolders(folder itself or immediate children). No declared list, no convention lock-in.main/master→ skip (never touch uncommitted main)fetch+branch -f main origin/main(updates main ref, leaves WIP untouched)main→merge --ff-onlyorigin/<branch>if behind, then fast-forward local main and auto-rebase clean WIP onto updated main (only ifaheadOfMain > 0); conflicts--abortcleanly.Amicode — syncOutput channel always logs; notifications only onfailed(attention-needed). Silent success.Pure helpers (
findWorkspaceRepos,syncOneRepo,isSyncDue) are unit-tested with injectedGitRunner(17 tests).Testing
npx vitest run test/sync.test.ts— 17 passednpx tsc --noEmit— cleanFollow-on
~/Library/LaunchAgents/co.harmoniqs.notturno-repo-sync.plist(built earlier tonight) is now superseded — keep for manual use or remove after dogfooding extension-host path.amicode.sync.useSystemCronadvanced opt-in if needed.