Add local source publication

This commit is contained in:
2026-05-31 02:21:36 +00:00
parent aeee91940d
commit e296361042
17 changed files with 1019 additions and 84 deletions

39
docs/operations.md Normal file
View File

@@ -0,0 +1,39 @@
# Distributor Operations
## Normal workflow
Preview a local publication:
```sh
go run ./cmd/distributor run --config examples/local-publish.yml --dry-run
```
Run the local publication:
```sh
go run ./cmd/distributor run --config examples/local-publish.yml
```
## Filesystem layout
Source bundles are discovered beneath the configured local source root. Destination bundle paths preserve the source bundle path relative to that source root.
The maintained example writes under `workspace/`, which is ignored by Git.
## Destination state
Each published destination bundle contains `.distributor.json`. This state file records the source manifest and copied source outputs. It is the authoritative marker that a destination path is managed by `distributor`.
`manifest.json` from the source bundle is not copied as destination state.
## Retry behavior
If a destination already has matching `.distributor.json`, publication skips it as already published.
If destination state is older than the source manifest, publication replaces only managed outputs recorded in `.distributor.json` plus the state file.
If a write fails during local publication, `distributor` removes outputs written during that failed attempt where possible so a retry does not see an unmanaged destination.
## Caveats
Only local-to-local source-file publication is implemented. SSH, S3, HTML generation, notification, and force overwrite behavior are not implemented.