This repository was archived by the owner on Sep 13, 2026. It is now read-only.
Repository navigation
[CTX-0014] feat(workflow): workflow-import fresh-clone restore helper - #20
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Closes #19.
Fresh clones have no
.git/carryctx/state.sqlite; CarryCtx state is never cloned, and engineeringworkflow history lives in
bitty-mcp-workflowas redacted ctxpack v2 snapshots. This adds thesupported restore path (port of bitty CTX-0316, merged PR #535 / 8fae335):
scripts/fetch-ctxpack.sh— staging-clones the mirror (defaulthttps://github.com/bitty-terminal/bitty-mcp-workflow.git;WORKFLOW_MIRROR_URL/--urlandWORKFLOW_MIRROR_DIR/--mirroroverridable), readsLATEST(--snapshotpins one), copies thesnapshot to a temp staging path, validates it, initializes CarryCtx state only when the local DB
has no project row, imports with
--mode replace --yes, then prints provenance (snapshot id +source commit) and
carryctx stats.just workflow-importandjust workflow-import-dry.scripts/fetch-ctxpack-selftest.sh— isolated lab (temp HOME/XDG/TMPDIR + throwaway targets).scripts/publish-ctxpack.shnowcarries the restore recipe.
Safety
--force.--dry-runfetches + validates only; it never creates or writes the DB.carryctx initrewrites.carryctx/config.tomldefaults; the script restores the committedfile, so the checkout stays clean.
publish-ctxpack.shonly has the mirror README recipe textupdated.
Verification
scripts/fetch-ctxpack-selftest.sh: 6/6 PASS in an isolated temp HOME/XDG/TMPDIR.just check,bash -n,shellcheck -S warning,shfmt -d: green.gh repo cloneofbitty-mcp(throwaway):--dry-run:dry-run PASS: snapshot 20260910T193216Z-3950e5b fetched + validated; nothing imported.snapshot=20260910T193216Z-3950e5b ... redacted=true,source_commit=3950e5bf3221971aa582dd263191b9315c26e449; afterwardsgit status --porcelainis empty (committed configpreserved).
Priority: P1 | Area: devtools | Labels: feat,area:devtools,P1 | Milestone: v0.1.0 | RFC: none | Task: CTX-0014