Skip to content

feat: add bundle-based OCM mirror sync#289

Merged
chriswritescode-dev merged 8 commits into
mainfrom
feat/bundle-mirror-sync
Jun 28, 2026
Merged

feat: add bundle-based OCM mirror sync#289
chriswritescode-dev merged 8 commits into
mainfrom
feat/bundle-mirror-sync

Conversation

@chriswritescode-dev

Copy link
Copy Markdown
Owner

Add Git bundle-based OCM mirror sync with OpenCode model discovery and HEAD-safe bundle import.

Changes:

  • Default OCM push/pull now sync committed refs with git bundles
  • Dirty working tree changes sync with binary patches after bundle import
  • Full tar mirror remains available through --full and as fallback
  • Backend bundle upload/download routes import and export branches/tags
  • HEAD ref safety fix in bundle import for both backend and ocm-cli
  • New GET /settings/opencode-discover-models endpoint with caching
  • Model auto-discovery via Combobox in the model editor dialog
  • Tests for all new components and utilities

Validation:

  • pnpm lint

…#290)

* fix: consolidate discovery-cache, batch bundle refs, remove dead code

* refactor: consolidate discovery cache into generic discoverCached, extract spawnGit helper
… lint into root scripts

- Extract shared project-id-resolver for origin URL matching (replaces local-repo duplicates)
- Add promptYesNo / confirmFullFallback to ocm CLI before slow full mirror
- Backend: consolidate opencode-workspaces routes with project-id-resolver
- Frontend: fix schedules prompt/global page navigation
- CLI: add eslint config, lint/lint:fix scripts, fix no-fallthrough in ocm.ts
- Root: wire CLI into build, test, typecheck, lint, lint:fix chains
- Fix test lint issues (_code, const, require→import)
Comment thread shared/src/project-id-resolver.ts Fixed
…erver-side ancestry check

- Backend: GET /:repoId/mirror/head (head+branch+dirty) and GET /:repoId/mirror/contains/:sha (ancestry check)
- CLI: checkPushDivergence warns before overwriting server commits; checkPullDivergence warns before discarding local commits; both require confirm or --force
- Bundle upload now streams from disk instead of buffering entire file in memory
- Version visible in --help and default (no-arg) output
- Version bump 0.1.5 → 0.2.0
@chriswritescode-dev chriswritescode-dev merged commit 01e50a7 into main Jun 28, 2026
4 checks passed
@chriswritescode-dev chriswritescode-dev deleted the feat/bundle-mirror-sync branch June 28, 2026 15:57
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.

2 participants