Summary / 概要
Add a structure smoke test that git clone -b <branch> --single-branchs each purpose branch (and main) into a temp dir and asserts expected files/directories exist.
各用途ブランチ(と main)を一時ディレクトリに git clone -b <branch> --single-branch し、期待パスの有無だけを確認する構造スモークを追加する。
Release tag: v0.7.0-doc.2(docs / 運用のみ。用途ブランチへの必須同期はしない)
Non-goals / やらないこと(Phase 1)
make setup / composer install / bun test / Sail / Wails build などのランタイム検証
- 全タグの総なめ(Phase 2)
- スモークスクリプトを各用途ブランチへ cherry-pick 同期すること
Deliverables / 成果物
| Path |
Role |
scripts/smoke-clone-branches.sh |
Shallow clone + per-branch expected paths |
.github/workflows/smoke-clone-branches.yml |
CI on main (push / pull_request / workflow_dispatch) |
README.md / README_ja.md |
Short “Verification” section + run example |
CHANGELOG.md / CHANGELOG_ja.md |
[0.7.0-doc.2] entry |
Canonical home: main. Branch: cursor/smoke-clone-branches-53e8 → PR → main → tag v0.7.0-doc.2.
Script spec / スクリプト仕様
Env
| Variable |
Default |
Meaning |
REPO |
https://github.com/b4moss/git-template.git |
Clone source; local path allowed for pre-push runs |
WORKDIR |
mktemp -d |
Work dir (deleted unless KEEP=1) |
KEEP |
0 |
Keep worktree for debugging |
Behavior
- For each branch in the inventory table below:
git clone -b "$branch" --single-branch --depth 1 "$REPO" "$dir"
- Assert each expected path with
test -e
- Run all branches; print
MISSING <branch>:<path> / clone errors; exit 1 if any failed
- No Makefile required on
main (optional later: make smoke)
Expected paths (Phase 1 draft)
| Branch |
Must exist (representative) |
main |
README.md, CHANGELOG.md, docs/sync-policy.md |
bun |
dev/package.json, Makefile, docs/charter/ |
go |
dev/go.mod, dev/main.go |
go-web |
dev/cmd/server/, README_ja.md |
go-cli |
dev/cmd/app/, dev/internal/app/ |
go-wails-nuxt |
dev/wails.json, dev/frontend/package.json, dev/frontend/wailsjs/ |
crx-vue |
dev/manifest.json, dev/vite.config.ts |
npm-package |
package.json, src/, kitchen-sink/ |
laravel / laravel-sail |
scripts/setup-laravel.sh, dev/README.md (do not require artisan) |
slim |
dev/composer.json, dev/public/index.php, dev/config/routes.php |
slim-auth |
slim paths + dev/src/Mail/MailAdapter.php, dev/src/Auth/SessionAuth.php |
vituum-twig |
package.json, vite.config.ts, src/ |
doc-site |
nuxt.config.ts, app/, content/ |
Confirm paths with git ls-tree before locking the table in the script.
Local run
# against GitHub tip
bash scripts/smoke-clone-branches.sh
# against local main worktree (no push required)
REPO=/path/to/git-template bash scripts/smoke-clone-branches.sh
CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
- One job that runs the script (serial clones OK for stability)
- Timeout ~10–15 minutes
- Optional
concurrency cancel-in-progress
Release steps / リリース手順
- Branch
cursor/smoke-clone-branches-53e8 from main
- Add script + workflow + README/CHANGELOG
- Green locally:
REPO=<local> bash scripts/smoke-clone-branches.sh
- PR →
main → merge
- Confirm Actions green
- Tag
v0.7.0-doc.2 from main
Phase 2 (out of this issue OK)
- Tag smoke:
git clone -b v0.4.0 / v0.5.0-go-web / … with a tag→expectations map
- Optional
RUNTIME=1 for slim / go-web make test only
- Freeze expectation table in
docs/smoke-expectations.md if it grows
Risks
| Risk |
Mitigation |
| Path moves break CI |
Keep expectation table at top of script; clear MISSING messages |
| Time / rate limits |
--depth 1, serial clones first |
Laravel empty dev/ |
Only require dev/README.md, never generated artisan |
Acceptance criteria / 受け入れ条件
References
Summary / 概要
Add a structure smoke test that
git clone -b <branch> --single-branchs each purpose branch (andmain) into a temp dir and asserts expected files/directories exist.各用途ブランチ(と
main)を一時ディレクトリにgit clone -b <branch> --single-branchし、期待パスの有無だけを確認する構造スモークを追加する。Release tag:
v0.7.0-doc.2(docs / 運用のみ。用途ブランチへの必須同期はしない)Non-goals / やらないこと(Phase 1)
make setup/composer install/bun test/ Sail / Wails build などのランタイム検証Deliverables / 成果物
scripts/smoke-clone-branches.sh.github/workflows/smoke-clone-branches.ymlmain(push/pull_request/workflow_dispatch)README.md/README_ja.mdCHANGELOG.md/CHANGELOG_ja.md[0.7.0-doc.2]entryCanonical home:
main. Branch:cursor/smoke-clone-branches-53e8→ PR →main→ tagv0.7.0-doc.2.Script spec / スクリプト仕様
Env
REPOhttps://github.com/b4moss/git-template.gitWORKDIRmktemp -dKEEP=1)KEEP0Behavior
git clone -b "$branch" --single-branch --depth 1 "$REPO" "$dir"test -eMISSING <branch>:<path>/ clone errors; exit1if any failedmain(optional later:make smoke)Expected paths (Phase 1 draft)
mainREADME.md,CHANGELOG.md,docs/sync-policy.mdbundev/package.json,Makefile,docs/charter/godev/go.mod,dev/main.gogo-webdev/cmd/server/,README_ja.mdgo-clidev/cmd/app/,dev/internal/app/go-wails-nuxtdev/wails.json,dev/frontend/package.json,dev/frontend/wailsjs/crx-vuedev/manifest.json,dev/vite.config.tsnpm-packagepackage.json,src/,kitchen-sink/laravel/laravel-sailscripts/setup-laravel.sh,dev/README.md(do not requireartisan)slimdev/composer.json,dev/public/index.php,dev/config/routes.phpslim-authdev/src/Mail/MailAdapter.php,dev/src/Auth/SessionAuth.phpvituum-twigpackage.json,vite.config.ts,src/doc-sitenuxt.config.ts,app/,content/Confirm paths with
git ls-treebefore locking the table in the script.Local run
CI
concurrencycancel-in-progressRelease steps / リリース手順
cursor/smoke-clone-branches-53e8frommainREPO=<local> bash scripts/smoke-clone-branches.shmain→ mergev0.7.0-doc.2frommainPhase 2 (out of this issue OK)
git clone -b v0.4.0/v0.5.0-go-web/ … with a tag→expectations mapRUNTIME=1forslim/go-webmake testonlydocs/smoke-expectations.mdif it growsRisks
MISSINGmessages--depth 1, serial clones firstdev/dev/README.md, never generatedartisanAcceptance criteria / 受け入れ条件
scripts/smoke-clone-branches.shchecks all purpose branches +mainand exits 0mainis green[0.7.0-doc.2]v0.7.0-doc.2pushed frommainafter mergeReferences
docs/sync-policy.md(meta docs live onmain)v0.7.0-doc.1(Document cross-branch sync policy (spec cherry-pick → re-implement) #9)