This repository was archived by the owner on Sep 13, 2026. It is now read-only.
Repository navigation
[CTX-0016] chore(workflow): publish CarryCtx snapshots in-repo (retire mirror) - #24
Merged
Merged
Conversation
…e mirror) Replace the separate bitty-mcp-workflow mirror with native in-repo publication: carryctx export --publication commits a redacted snapshot to refs/heads/carryctx-snapshots and the target pushes it only when the ref advances; carryctx import --from-git restores it. Remove the publish/fetch ctxpack scripts and add a push-to-main snapshot-source CI gate. Closes #23
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.
Retire the separate
bitty-mcp-workflowmirror and publish CarryCtx snapshots inside this repository onrefs/heads/carryctx-snapshotsusing nativecarryctx export --publication; restore with nativecarryctx import --from-git.Priority: P1 | Area: devtools | Labels: chore,area:devtools,P1 | Milestone: v0.1.0 | RFC: N/A | Task: CTX-0016
Closes #23
What changed
scripts/workflow-publish.sh(new):carryctx export --pack-format dir -o <tmp> --publication(native redaction +manifest.redacted: true+ one commit torefs/heads/carryctx-snapshots), assert the tip is stamped redacted, thengit pushthe branch only when the local ref advanced; no-op message when current.--dry-runwrites neither the ref nor the remote.scripts/workflow-import.sh(new): fetchrefs/heads/carryctx-snapshots, nativecarryctx import --from-git <ref> --mode replace --yes. Refuses a non-empty local DB (project row with data rows) without--force,--dry-runvalidates without writing, restores the committed.carryctx/config.tomlbyte-identically, prints provenance (snapshot commit, export id,CarryCtx-Source). Thin Bash, no Python.scripts/publish-ctxpack.sh,scripts/publish-ctxpack-redact.py,scripts/publish-ctxpack-selftest.sh,scripts/fetch-ctxpack.sh,scripts/fetch-ctxpack-selftest.sh.justfile:workflow-publish/workflow-publish-dry/workflow-import/workflow-import-drynow call the new scripts.README.md(Workflow snapshot restore) andAGENTS.mdupdated to the in-repo branch..github/workflows/snapshot-source.yml(new): the CI gate.CI gate design
Snapshot source matches mainruns on pushes tomainandcarryctx-snapshotsonly, so pull requests and their required checks are unaffected. It fetchesorigin/mainandorigin/carryctx-snapshots, extracts the tip'sCarryCtx-Sourcetrailer viagit log -1 --format=%B <ref>, and fails when the trailer's revision is not a prefix of main HEAD. Before the first publication the branch does not exist and the check passes with a notice. Merge closeout:gh pr merge --squashthenjust workflow-publish; the snapshot-branch push re-runs the gate green.Evidence
bash -n,shfmt -d,shellcheck -S warningclean on both scripts.actionlint -colorclean;act -n --workflows .github/workflows/snapshot-source.ymlsucceeds.just checkgreen (markdownlint-cli2 0.23.1, Prettier 3.9.6).carryctx0.11.1: a real (unpushed)export --publicationreportsredacted: trueand the bundle tree contains zero/home,/mnt,/Users, or workspace host paths.bittycommitbbad681(CTX-0319); both scripts byte-identical tobittyorigin/main.Notes / residual
carryctx export --publicationemits one snapshot per run (each publication records the previous one), so re-running is not content-deduplicated; the push guard only covers a ref that did not advance.refs/heads/carryctx-snapshots; the merge closeout publishes it and verifies the redacted tree contains no host paths.