Skip to content

Operations · dev-mode

Dev Mode — run the setup from a checkout ​

Dev mode runs a local onedot-devkit checkout instead of the signed release to test changes in real sessions.

Set up once ​

  1. Clone the repository: git clone git@github.com:onedot-digital-crew/onedot-devkit.git ~/Sites/onedot-devkit
  2. Point the source at it: devkit config source-local ~/Sites/onedot-devkit.
  3. Build the first dev version: devkit maint dev-sync
  4. Start a new Claude, Codex or Pi session. The status line shows <base>-dev@<sha7>; devkit status shows the full version.

devkit status names the source, so a machine that is unexpectedly on a checkout is visible there.

Daily loop ​

bash
bash
devkit maint dev-sync              # origin/main + configured checkout's committed HEAD
devkit maint dev-sync --upstream   # origin/main + safe checkout fast-forward
devkit maint dev-sync --worktree   # working tree, including uncommitted edits

Dev versions take effect in the next session; running sessions keep their startup paths.

The default run fetches origin/main, merges it with the configured source checkout's committed HEAD using Git's object-only merge-tree, and builds a clean export of that deterministic tree. Git 2.38+ is required. A checkout without an origin keeps its HEAD-only loop.

Topic worktrees use the configured source. Default sync leaves commits and dirt untouched; ⚠ names excluded uncommitted payload files.

Conflicting committed inputs emit DEV_SYNC_MERGE_CONFLICT; owners resolve their changes in their own topic worktrees. Failed fetches emit DEV_SYNC_FETCH_FAILED. Both retain the current runtime.

Deleted sources emit DEV_SYNC_SOURCE_MISSING; devkit config show warns with SOURCE_LOCAL_MISSING. No fallback is selected.

Plain devkit sync and devkit fetch use this route without moving the checkout. Concurrent builds serialize; a landing mid-build retries the latest snapshot twice. --worktree includes parallel sessions' unfinished edits.

Setup/sync and SessionStart reconcile devkit-dev-sync.timer (systemd user unit) or io.one-dot.devkit.dev-sync (launchd agent). Every ten minutes, devkit maint dev-sync-service --tick builds origin/main only (dev-sync --upstream), ignoring stranded local commits; a --head build with unpushed commits prints DEV_SYNC_TRANSIENT: push before a rerun needs them. Current payloads skip the build; all builds share one lock. Unattended Linux runs after logout need user lingering.

Upstream sync also safely fast-forwards the configured checkout, including after landing. CHECKOUT_BLOCKED names touched dirt, Git operations or local commits; owners handle those. Other worktrees and unrelated files stay untouched.

Claude, Codex and Pi lifecycle hooks also trigger origin/main sync, throttled to three minutes. SessionStart names failed/stale hosts and failed schedulers; failures persist until periodic success, stale after 20 minutes. devkit maint dev-sync-service --check fetches upstream and prints host, payload SHA, version and cause (exit 1 on alert); coordinators check every host. --install reconciles explicitly.

Successful non-force source pushes touching runtime inputs request immediate sync without waiting for builds. Diagnostics append to ~/.onedot-devkit/state/dev-sync-landing.log; the scheduler covers missed events. OD_SKIP_DEV_SYNC=1 skips this hook too.

Logs/health: ~/.onedot-devkit/state/dev-sync{.log,-health.json}. Personal scheduler files stay untouched. Existing branch-GC/daily-cleanup units migrate to the current binary. Leaving local-source mode stops builds.

Claude Code reads .claude/settings.json, Codex .codex/hooks.json; devkit sync pre-trusts hooks with devkit config codex-hook-trust all; otherwise Codex asks once per new hook command.

Unpushed commits: safest return to origin/main ​

Leave shared, dirty or diverged main checkouts alone. Owners cherry-pick only their own reviewed commits onto fresh origin/main topics, verify and publish with push authorization. Never reset shared main or rebase/push another session's commits: sync includes committed changes. Reconcile after every owner accounts for commits and dirt.

What happens under the hood ​

Dev payloads are immutable <next patch>-dev.<utc epoch>.<tree8> exports. Mac builds use target.noindex.

current/content/dev-source.json records tree and source SHAs. Topic placement verifies version and ancestry; mismatches require committed dev-sync. --worktree cannot attest ancestry.

Pruning keeps three dev versions by default (DEVKIT_DEV_SYNC_KEEP). Active, pending, in-use and less-than-12-hour-old versions are protected; more than three can remain.

Leave dev mode ​

  1. devkit config source-http https://devkit.one-dot.io
  2. devkit rollback <released version> — a dev version sorts above every release, so a plain devkit sync would refuse the step down as a downgrade. devkit version lists the installed versions.
  3. Start a new session.

Symptoms ​

SymptomCauseFix
devkit maint dev-sync says it needs a local sourceThe source is the signed endpoint or Gitdevkit config source-local <checkout>
⚠ line listing filesPayload files are uncommitted; the HEAD export was built without themCommit your own, or devkit maint dev-sync --worktree
Session start says the origin/main tree differsA local commit or landing arrived after the last rebuildSync is already running; start a new session when it is done
DEV_SYNC_MERGE_CONFLICTLocal committed changes conflict with origin/mainCommit owners reconcile only their own changes in fresh topic worktrees; the active runtime is retained
Last dev sync failed, log path shownThe build or the sync stoppedRead the log, fix the cause, run devkit maint dev-sync
The change is not visibleThe session started before the rebuildStart a new session; devkit status shows the active version

Internal docs — onedot-devkit · devkit

devkitdevkit syncdevkit statusdevkit doctordevkit helpInternal docs · ONEDOT digital crew