Submit worker changes for review
submit_workspace_changesetSend a worker's saved files as a changeset for review when its run ended in error, was cancelled/stopped, or needs recompare; Plori compares them with the Workspace's current files.
Instructions
Submit a worker's saved files for review as a changeset: Plori compares them with the Workspace's current files. Plori submits a worker's saved files itself when its run completes normally and they change at least one file, and accepts a clean comparison; use this tool for a worker whose change_status is still unsubmitted after its run ended in error, was cancelled or was stopped, or after phase recompare_required. Submitting a worker that Plori submitted returns that changeset. The worker must have save_state ready (get_workspace_worker); otherwise the call is refused with 409 workspace_worker_not_saved. The Workspace's files do not change. The comparison runs after the call returns: poll get_workspace_changeset until compared is true, then accept_workspace_changeset accepts a changeset in phase review_ready and reject_workspace_changeset rejects one. Submitting the same worker again while the Workspace's current revision is unchanged returns the same changeset; after the current revision changes, for example because another changeset was accepted, it creates a new changeset compared with the new current revision.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | The Workspace UUID. | |
| worker_request_id | Yes | The worker whose saved files to submit (worker_request_id). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phase | Yes | The step the changeset is in: checkpointing, creating_integration and comparing while the comparison runs; review_ready when accept_workspace_changeset can accept it; needs_resolution when it has conflicts; saving_result after accept until result_revision is set; recompare_required when the Workspace changed after the comparison (submit the worker again); then accepted, rejected or failed. | |
| state | Yes | submitted (being compared, or ready for review when phase is review_ready), conflicted (the worker and the Workspace changed the same paths; see accept_workspace_changeset for recovery), accepted, rejected or failed. | |
| changes | No | The changed paths, at most 500. get_workspace_changeset returns them; list_workspace_changesets leaves them out. | |
| compared | Yes | True when the comparison is complete and changes and conflicts are known. | |
| conflicts | No | The paths that conflict, when state is conflicted. | |
| no_change | No | True when the worker changed no files. | |
| created_at | Yes | When the changeset was submitted. | |
| updated_at | Yes | When the changeset last changed. | |
| auto_accept | No | Set only for a changeset whose comparison was clean and changed files: pending (the platform may still accept it), accepted (the platform accepted it) or abandoned (the platform stopped and will not accept it). | |
| change_count | Yes | The number of changed paths. | |
| changeset_id | Yes | The changeset UUID. | |
| workspace_id | Yes | The Workspace UUID. | |
| base_revision | Yes | The revision the worker's copy started from. | |
| result_revision | No | The new current revision of the Workspace once an accepted changeset is saved. | |
| terminal_reason | No | Why a failed changeset failed. | |
| working_copy_id | Yes | The worker's copy that the changes come from. | |
| changes_truncated | No | True when there are more than 500 changed paths. | |
| incoming_revision | Yes | The worker's saved revision. read_workspace_file reads its files. | |
| validation_evidence | No | The evidence given when the changeset was accepted. | |
| comparison_current_revision | No | The Workspace revision the changes were compared with. accept_workspace_changeset takes it as expected_current_revision. |