public-sync

Documentation

The private repository remains the source of truth. A configured prefix is projected into independent public history.

Setup

curl --proto '=https' --tlsv1.2 -LsSf https://public-sync.yaaf.de/install.sh | sh
cp public-sync.example.toml public-sync.toml
git remote add public-github [email protected]:org/project.git
git remote add public-gitlab [email protected]:org/project.git

Keep public-sync.toml untracked when it contains organization-specific repository coordinates.

Publish

public-sync check
public-sync push all

The command requires a clean prefix, scans tracked files, creates a snapshot commit with configured bot identity, records that public ancestry internally, and refuses to overwrite unimported remote work.

Contributions

public-sync import github refs/pull/42/head --expected-sha <sha>
# resolve a conflict in the printed worktree when needed
public-sync import-resume
public-sync finalize github 42 --expected-head <sha> \
  --validated-internal-commit <internal-sha>

The finalizer re-fetches the immutable expected head and verifies that the platform merge tree exactly equals the internally tested public tree before using the platform API.

AI summaries

Set message.mode = "ai", an OpenAI Responses-compatible endpoint, and a model. Only the public diff is sent. Output is constrained to one line and rejected if it resembles sensitive metadata.

Security model

History is reconstructed from public trees. Private author names, timestamps, messages, issue references, and unrelated files are absent. Custom disclosure patterns are mandatory release gates; review remains necessary.