Open a changeset

POST /Platform/entities/changesets

Open a changeset. A changeset is a change request: this freezes the promote plan for review.

Runs the merge plan (dry-run), freezes membership + per-member head pairs + diffs + conflict resolutions, and records the changeset in status open. This is what an autonomous agent calls INSTEAD of merging: a human reviews (changeset-review), then the merge executes exactly the approved plan (changeset-merge). Runtime-only branch entities (including drillable lab simulate artifacts) are excluded and summarized in the frozen plan.

The whole review workflow, end to end:

  1. Work on a feature branch (entities edit/patch --branch feature/name) and validate there (lab simulate / lab replay).

  2. Open: changeset-open --from-branch feature/name with a description, origin_ref (conversation/task provenance), and test_evidence referencing the lab runs.

  3. Review: the reviewer's inbox is changeset-list --status open; the full view (frozen diffs + timeline + evidence) is changeset-get. Verdicts via changeset-review: approve unlocks the merge; request_changes + comment is what the agent reads to continue.

  4. Iterate: fix the branch, attach fresh test runs, and changeset-refresh — same changeset id, same conversation; approval is cleared.

  5. Merge: changeset-merge executes the frozen, approved plan (staleness-guarded). It deletes the feature branch when empty, or retains it when non-promotable runtime artifacts remain. Undo later with changeset-revert.

  6. The ledger: changeset-list --to-branch main answers what changed, when, why, tested how, approved by whom.

Refuses if the plan has conflicts or failures — resolve them (pass resolutions) and open again. Resolutions are part of what gets approved: changing them later requires a refresh (approval reset).

Body parameters

Returns

ChangesetResponse

Example request

curl -X POST "https://api.hilus.ai/Platform/entities/changesets" \
  -H "Authorization: Bearer $HILUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'