Release B: demos per client (history-preserving create-session.sh, democtl promote/reseed) #8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Full spec:
docs/separation-plan.mdon branchsite-separation, section "5. Demos per client" ("Release B: client demos"). Starts once Release A's site-repository contract is stable (see the companion issue for Release A step 4) — the plan explicitly scopes this as starting only once that's done, not in parallel.A demo is created from a site repository plus a git ref, not a copy of
dev-content/. Variants of one client's site are branches/tags in that client's own repository (e.g.site-acmewithmain,warm-palette,minimal-layout, a frozenpitch-oct20tag) — they share history, sogit diff main warm-paletteshows exactly what differs, and adopting a variant is an ordinary merge.Demo creation (
create-session.sh --site <repo> --ref <branch|tag>, defaulting tosite-sample/main):--ref, record the resolved commit.coaching-demos/demo-<token>and push the source's real history as itsmain— replacingbootstrap_content_repo's currentgit init+ single synthetic commit. This is the key behavior change: a session repo shares history with its source, sodemoctl promotelater is an ordinary merge, not a history graft..demo-seedin the session directory (source repository, ref, resolved commit).repo/siteand build. Admin Publish (PUBLISH_MODE=backup) pushes only todemo-<token>, never back to the source.Recreating with an existing
--tokenkeeps today's behavior: restore fromdemo-<token>, ignoring--site/--ref.Scripts needing changes (per the plan, all currently still reference
dev-content/--content-root, which no longer exists onbuild-site.sh— demo sessions are hard-broken onsite-separationuntil this lands):create-session.sh— the rewrite above.refresh-session.sh— rsync excludedev-content→site; never touchesrepo/site; drop--content-root dev-contentfrom itsbuild-site.shcall.refresh-base.sh,expire-session.sh,demo-session-gc.sh— comment-only references, no functional change needed.demo.env.j2/ ansible defaults — add the default--site/--refsource config and its read credential.CLI (
cmd/democtl):democtl create [--site <name>] [--ref <ref>], passed through tocreate-session.sh.democtl list/statusshow each session's site, ref, commit from.demo-seed.democtl promote <token> --to <site-repo>:<branch>— push the session'smainto a branch of a site repository (creating it if needed for asite-sample-seeded prospect). Never force-pushes: fetches the target's current tip, refuses if the target branch exists and isn't an ancestor of the session's tip (reports both SHAs and the manual commands instead), otherwise a plain non-force push.democtl reseed <token>— resets the session repo to the commit recorded in.demo-seed(not the current source branch tip) and rebuilds. Destructive, requires confirmation../manage demo createneeds to forward--site/--ref— track that change there explicitly when this lands.Prospect workflow this enables: start from
site-sampleor a newsite-<prospect>, add variants as branches, compare side by side with one session per variant, keep edits viademoctl promote, and merge intomainwhen they sign — shared history makes that merge often a fast-forward.Also fixes, as part of the same script changes:
sitectl/compatciare missing from the CI-built/checksummed binary pipeline (deploy_artifact.goallowlist,cd.ymlbuild/upload loop, ansibledeploy.yml/demo_sessions.yml,Makefile build-release,deploy.sh's deployswap staging) —build-site.shfails closed without./bin/sitectl, so demo (and production) builds fail on this branch until that's in place too.