Documentation
¶
Overview ¶
Command sim-xrelease-helper is the prior-release subprocess driver for the DST cross-release harness (internal/sim). It is built FROM A PRIOR GIT TAG'S SOURCE TREE — the harness copies this file verbatim into a temporary git worktree checked out at the target tag and runs `go build` there, so the resulting binary embeds that release's store/txn/wal/cypher code. The current (HEAD) process then drives it over a small stdin/stdout protocol to obtain a store image written by the prior release and the prior release's observable per-op results.
Why a copied-in file rather than a tag-resident command ¶
A git tag is immutable and prior tags ship no headless CLI to drive. Adding an UNTRACKED file to a worktree of the tag does not modify the tag; it simply compiles against that tag's packages (every relevant tag shares the current module path github.com/FlavioCFOliveira/GoGraph and the same store/cypher API surface, verified by the harness build step). The file therefore uses ONLY the API that is stable across v0.2.0..HEAD: wal.Open, txn.NewStoreWithOptions, txn.New{String,Float64Weight}Codec, cypher.NewEngineWithStore, and the cypher.Result reader. It must not reference anything newer, or the build at an older tag fails (which the harness reports as "tag unbuildable", a clean skip).
Protocol ¶
Invocation: sim-xrelease-helper write <dir>
stdin one JSON object per line, each a {"kind","cypher","params"} op.
params values are string | float64 (JSON number) | bool.
stdout one JSON object per line, each {"i","committed","rows"} where rows
is a canonical order-independent signature of the op's result rows
(empty for ops that produced none). A trailing line
{"done":true,"nodes":N,"edges":E} reports the final engine counts.
exit 0 on success (store written to <dir> and fsynced via store close);
non-zero with a diagnostic on stderr on any harness-level failure.
The helper writes a real WAL under <dir>/"wal" via the prior release's txn.Store, so the current code can reopen <dir> with recovery.Open — the genuine cross-version data-compatibility boundary.