Skip to content
Select themeSelect language

`POST /api/workspace/repo_sync/preview` — clone/pull + parse + classify without mutating DB, vault, audit log, or last-sync metadata.

POST
/api/workspace/repo_sync/preview
curl --request POST \
--url https://example.com/api/workspace/repo_sync/preview
Media typeapplication/json

Dry-run pull summary. Same core outcome rows as PullSummary, but without DB/vault writes and with SOPS file selection metadata for the UI wizard.

object
commit_sha
required
string
conflicts
required

ADR 0030 UX2-F – per-entity last-write-wins conflicts: the DB row was newer than the incoming commit, so the pull would SKIP it. Surfaced so the conflict view can diff the kept-local vs the incoming-remote content. Populated for the text entities a content diff makes sense for (scripts + apps); a workflow-graph skip is recorded in outcomes only.

Array<object>

One last-write-wins conflict on a pull preview. local_* is the kept DB state; remote_* is the incoming repo state that was skipped. Timestamps are RFC3339 strings so the web client parses them with a single Date ctor.

object
local_content
required
string
local_updated_at
string | null
path
required
string
remote_committed_at
string | null
remote_content
required
string
event
required

The event-shape that every push and pull emits on success. Carries event_id + timestamp per the wire-format contract — the keyset-assert regression test in interfaces::http::dto locks that contract for the workflow-event stream; this struct does the same for repo-sync events.

object
commit_sha

The git commit sha the sync attempt operated against — None when no commit was made (push with no diff).

string | null
event_id
required
string format: uuid
kind
required

repo_sync_push_completed / repo_sync_pull_completed.

string
timestamp
required

RFC3339 timestamp (UTC). The string form keeps the wire format language-agnostic; the web client parses it back to a Date.

string
files_parsed
required
integer
outcomes
required
Array<object>

One row per entity affected by a pull.

object
action
required
string
reason

Set for skipped / failed rows; absent for the happy path.

string | null
target_id
string | null format: uuid
target_kind
required

Closed catalogue of sync targets a log row can reference.

string
Allowed values: workflow script app resource memory
target_slug
required
string
scan_errors
required
Array<object>
object
message
required
string
path
required
string
sops_files
required
Array<object>
object
path
required
string
selected
required
boolean
slug
required
string
Example
{
"outcomes": [
{
"target_kind": "workflow"
}
]
}