Skip to content

memhtml curate merge

1. Synopsis

Land a curator branch on its target: fast-forward --into to the ref when the ref descends from it, else replay the ref’s operations (its puts, archives, and links since the merge base) as one fresh commit on --into’s tip; the head gate (the same probes ranked at both tips) runs first either way, the checkout comes along when --into is HEAD, the landed version’s snapshot is written, and after a replay the curator ref is moved to the landed commit.

Terminal window
memhtml curate merge <ref> [options]

2. Arguments

Argument Required Description
ref yes The curator branch, as curate/2026-09-23 or refs/heads/curate/2026-09-23; refs/heads/ is prepended when absent. Refused (ERR_INVALID_MEMORY) when it does not exist. When --into has moved past the branch’s base, the landing is a replay: the branch’s changes since the merge base are read back as session operations and committed onto --into under the curate scope, memhtml(curate): <subject> (replayed onto <sha>), and the payload’s replayed names the base, the op counts, the attempts, and the branch’s original tip (null on a fast-forward). Refused (ERR_INVALID_MEMORY, nothing moved) when the branch carries a change that is not an operation (an article edited in place, a file deleted with no archive twin, a link removed, a meta changed), named by path, or when the ops collide with what --into gained meanwhile (duplicate, claim-edit, a link whose target is gone).

3. Flags

Flag Type Default Values Description
--into string main no fixed set The branch to fast-forward, refs/heads/ prepended when absent. When HEAD is this branch and the checkout is clean at every path the landing changes, the shared index and working tree move with it (worktreeSynced: true); an uncommitted edit at one of those paths is refused (ERR_DIRTY_TREE) and nothing moves.
--skip-gate flag false no fixed set Land without running the head gate. A deliberate, logged override, never a default. The gate loads the version at --into and the version at the ref, probes a seeded sample of the records active in both by their titles, and refuses (ERR_DISCRIMINATION_FAILED, nothing moves) when the landed version’s MRR falls more than the tolerance below the base’s or its inversions grow; the payload’s gate carries mode head, probes, mrr, mrrBefore, floor, and inversions.

Every command also accepts the global flags.

4. Response

On success the command writes one JSON envelope to stdout, and its type is curate.merged.

On failure it writes the failure envelope, whose code comes from error codes.

The JSON envelope gives the fields both shapes carry. Response types lists every value type takes across the binary.

5. Further reading

No guide block names this command. The guide is the workflow prose the CLI ships beside the command table: which command to reach for, and in what order.

6. Provenance

A loader generates this page from apps/cli/src/commands.ts while the site builds, so no file in the repository holds it: the COMMANDS array there is the one source of argument parsing, of memhtml manifest, and of AGENTS.md. Change the registry and this page changes with it.