secubox-deb/scripts/lib
CyberMind-FR a0e9ba8beb test(metablog): Smoke test for 3-site Gitea ingest (ref #94)
fix(metablog-ingest-site): Handle .git repos with unborn branch (no commits):
- Use git rev-parse --verify HEAD (exits non-zero on unborn branch) instead of
  rev-parse HEAD (which returns "HEAD" string even with no commits)
- Add fall-through path: .git exists + no commits → git symbolic-ref HEAD
  refs/heads/main + commit + push (same as fresh-init path)

test: Add tests/scripts/test-metablog-ingest.sh smoke test:
- Step 1: dry-run --limit 3 verifies report total=3
- Step 2: live --limit 3 accepts any ok+skip combo >= 3
- Step 3: idempotent re-run asserts all 3 skip-already-current
- Step 4: git ls-remote via MOCHAbin SSH verifies remote HEAD exists
- Step 5: clone+diff via MOCHAbin SSH (diff --exclude=.git) verifies
  clone == source

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 15:10:06 +02:00
..
agent-worktree-lib.sh feat(scripts): implement agent-worktree start sub-command (ref #83) 2026-05-12 09:54:12 +02:00
gitea-ssh-preflight.sh feat(metablog): SSH preflight + Gitea key enrolment helper (ref #94) 2026-05-12 15:10:06 +02:00
metablog-ingest-site.sh test(metablog): Smoke test for 3-site Gitea ingest (ref #94) 2026-05-12 15:10:06 +02:00
test-helpers.sh docs(spec): CMSD-1.0 license headers across the codebase 2026-05-12 09:10:37 +02:00
tier-manifest.sh fix(scripts): Harden tier-manifest helper per code review (ref #80) 2026-05-12 09:24:28 +02:00