Add shared-root destination state model

This commit is contained in:
2026-06-08 18:45:16 +00:00
parent ef0b6c1056
commit eb86cf9ab6
13 changed files with 1165 additions and 10 deletions

View File

@@ -255,7 +255,7 @@ Source bundle digest mismatches fail validation before destination writes occur.
## Destination Fields
Each destination embeds a backend config at the destination level and may also configure publishing, transforms, path mapping, links, reconciliation, and transfer behavior.
Each destination embeds a backend config at the destination level and may also configure publishing, transforms, path mapping, links, state, reconciliation, and transfer behavior.
```yaml
destinations:
@@ -267,6 +267,8 @@ destinations:
html: false
path_mapping:
mode: preserve_relative
state:
mode: single_owner
reconciliation:
mode: replace
transfer:
@@ -282,6 +284,7 @@ destinations:
- `transform`: required only when publishing generated HTML.
- `path_mapping`: optional destination path mapping policy.
- `links`: optional public URL metadata policy.
- `state`: optional destination state ownership policy.
- `reconciliation`: optional managed-output reconciliation policy.
- `transfer`: optional destination comparison action policy.
@@ -359,6 +362,19 @@ Primary URL policies:
If no output matches the primary policy, per-output URLs may still be recorded and the top-level primary URL is omitted.
## Destination State Policy
```yaml
state:
mode: single_owner
```
- `state.mode`: optional. Accepted values are `single_owner` and `shared_root`; default is `single_owner`.
`single_owner` state records one pipeline/destination owner for each destination bundle path and is the state mode written by `run`.
`shared_root` is accepted by configuration validation and by destination state parsing for shared-root `.distributor.json` files. Current publish execution writes single-owner destination state.
## Reconciliation Policy
```yaml
@@ -448,6 +464,7 @@ Defaults are applied after YAML decoding and before validation:
- `transform.markdown_to_html.mode: sidecar` when a Markdown transform block is present and mode is omitted
- `path_mapping.mode: preserve_relative`
- `links.primary: auto` when a `links` block is present and `primary` is omitted
- `state.mode: single_owner`
- `reconciliation.mode: replace`
- `transfer.on_destination_same: skip`
- `transfer.on_destination_older: replace`