Canonical writer sync

Bare repo plus post-receive hook

Decisions 0003 and 0005 define the sync posture: one accepted writer path, one generated site, and a deployment step that does not invent a second source of truth.

Flow

  1. Operator pushes to the bare canonical repository.
  2. The post-receive hook checks out the accepted branch into a worktree.
  3. The hook runs validators: frontmatter lint, link check, index generation, and site build.
  4. The static output is promoted only if validation passes.
Decision 0003Establish canonical-writer sync instead of competing writable copies.
Decision 0005Use post-receive generation to keep the published reference derived from accepted source.
Failure modeIf validation fails, reject promotion and leave the previous static site intact.

Hook sketch

#!/usr/bin/env sh
set -eu
GIT_WORK_TREE=/srv/davai/worktree git checkout -f main
cd /srv/davai/worktree
python3 tools/lint_frontmatter.py
python3 tools/check_links.py
python3 tools/build_index.py
python3 build_site.py
rsync -a --delete systembydave/ /srv/www/systembydave/

Sync guardrails

Keep publishing boring

No manual edits on host.Published files are disposable output from the canonical source.
Promotion is atomic.Build to a candidate directory, then swap only after validators pass.
Logs are retained.Keep build and validation logs near the deployment for audit and recovery.
Rollback is explicit.Re-promote a known commit rather than editing generated files in place.