Merge lane-go: titles, verdicts, human stage, line result format, stale-client guard
Integrates nine commits of reviewed work from the lane-go branch after the automated resolver failed on this merge five times (each attempt dying on the malformed-result defect whose fix is contained in this same merge). Integration decisions: - Search: kept main's shipped design (Store.Search + SearchResponse.Results) and dropped lane-go's parallel, older attempt (an unused Message.Matches field, an absent runs.search, and two partial TUI plumbing blocks). lane-go itself did not compile: protocol.SearchMatch was undefined and model.go referenced searchNav, requestSearch and applyRunNav, which exist nowhere. Those partial TUI blocks are removed; the queued TUI omni-search item will implement the surface properly on main's design. - Both sides' additions are kept where they are independent: run titles and provenance, the human decision stage and its CLI/TUI surface, the derived stage verdict, the stale-client guard, the line-oriented result format, and main's search command. - The search key's help label is now "/ omni search"; the two tests asserting the old label are updated rather than the label reverted. - docs/cli.md and the packaged operations reference carry both sides' text. Verified: go build ./... , go vet ./... and the full go test ./... suite pass.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Protocol command/type constants. Mirrors the subset of
|
||||
// android/app/src/main/java/net/awan/pipelines/data/protocol/Message.kt and
|
||||
// internal/protocol/*.go used by this spike, so renames cannot drift silently.
|
||||
export const Protocol = Object.freeze({
|
||||
PING: "ping",
|
||||
PONG: "pong",
|
||||
ERROR: "error",
|
||||
|
||||
LIST: "list_pipelines",
|
||||
PIPELINE_LIST: "pipelines",
|
||||
GET_PIPELINE: "get_pipeline",
|
||||
PIPELINE: "pipeline",
|
||||
|
||||
LIST_RUNS: "list_runs",
|
||||
RUNS: "runs",
|
||||
GET_RUN: "get_run",
|
||||
RUN: "run",
|
||||
|
||||
SUCCESS_END: "#success",
|
||||
FAILURE_END: "#failure",
|
||||
});
|
||||
|
||||
export function isTerminal(target) {
|
||||
return target === Protocol.SUCCESS_END || target === Protocol.FAILURE_END;
|
||||
}
|
||||
|
||||
/** Mirrors protocol.ResolveTarget: preserve the # shorthand as an explicit terminal. */
|
||||
export function resolveTarget(outcome, target) {
|
||||
if (target !== "#") return target;
|
||||
return outcome === "error" ? Protocol.FAILURE_END : Protocol.SUCCESS_END;
|
||||
}
|
||||
Reference in New Issue
Block a user