Skip to content

feat(sync): opt-in workspace sync (extension-host, WIP-aware) - #315

Draft
aarontrowbridge wants to merge 3 commits into
mainfrom
314-sync-opt-in-workspace-sync
Draft

feat(sync): opt-in workspace sync (extension-host, WIP-aware)#315
aarontrowbridge wants to merge 3 commits into
mainfrom
314-sync-opt-in-workspace-sync

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Closes #314

Summary

Opt-in workspace sync, extension-host, user-focused, open-source.

  • Single toggle amicode.sync.enabled (off by default, first-run nudge). Global setting, change anytime.
  • Missed-nightly check on activation: if >20h since globalState.lastSyncAt, run within 30-120s (jitter). Plus Amicode: Sync now in Command Palette.
  • Generic scope: any git repo under workspace.workspaceFolders (folder itself or immediate children). No declared list, no convention lock-in.
  • WIP-aware:
    • dirty on main/master → skip (never touch uncommitted main)
    • dirty on feature branch → fetch + branch -f main origin/main (updates main ref, leaves WIP untouched)
    • clean on mainmerge --ff-only
    • clean feature branch → rebase onto origin/<branch> if behind, then fast-forward local main and auto-rebase clean WIP onto updated main (only if aheadOfMain > 0); conflicts --abort cleanly.
  • Subtle UX: Amicode — sync Output channel always logs; notifications only on failed (attention-needed). Silent success.
  • Julia env: stubbed as check+nudge (not auto-mutating) for v1 — wiring follows.

Pure helpers (findWorkspaceRepos, syncOneRepo, isSyncDue) are unit-tested with injected GitRunner (17 tests).

Testing

  • npx vitest run test/sync.test.ts — 17 passed
  • npx tsc --noEmit — clean

Follow-on

  • Local ~/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.
  • Future: wire Julia env check+nudge, add amicode.sync.useSystemCron advanced opt-in if needed.

… 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
@aarontrowbridge
aarontrowbridge force-pushed the 314-sync-opt-in-workspace-sync branch from f43f88f to 78f537e Compare August 9, 2026 14:42
Aero not available on GitHub's font stack, so the SVG wordmark
(added 8ab4b80) falls back to system sans and looks off. Keep the
SVGs committed (they're correct for the app/extension), but the
README hero reverts to the previous mark + markdown # Amicode heading
which renders in GitHub's native sans. Mark stays MarkDetailed
(amico-face-*, w 112, both light/dark) matching the new-chat screen.
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.

Opt-in workspace sync (extension-host, keeps WIP current with main)

1 participant