Skip to content

openlogos impact

Tell a CI pipeline whether a push only touched OpenLogos lifecycle bookkeeping — for example the commit produced by openlogos archive, verify results, or the guard file — so it can skip building and deploying artifacts. Everything else is reported as “not lifecycle-only” and left for the project to judge.

The command is read-only (it writes nothing, inside or outside the project) and is not a human confirmation point.

Terminal window
openlogos impact --base <rev> --head <rev> [--format json]
git diff --no-relative --name-status -z <base> <head> | openlogos impact --stdin [--prefix <dir/>] [--format json]
OptionDescription
--base <rev> --head <rev>Git range mode. Both are required together. Each revision is resolved safely to a commit ID before diffing; values that are empty or start with - are rejected.
--stdinRead git diff --no-relative --name-status -z bytes from stdin instead of calling git. Mutually exclusive with --base / --head.
--prefix <dir/>--stdin mode only: the OpenLogos project’s directory inside a monorepo (git top-level relative). In range mode the prefix is detected automatically.
--format jsonPrint a JSON envelope (schema openlogos-change-impact.v1).

Paths are matched relative to the OpenLogos project root, on path-segment boundaries:

ClassPathsMeaning
lifecyclelogos/.openlogos-guard, logos/changes/** (including archive/), logos/resources/verify/**, logos/.runtime/**Pure bookkeeping; guaranteed not to end up in a deployable artifact
projectAnything else under logos/ (specs, logos.config.json, …)The project decides; OpenLogos does not vouch for it
externalEverything outside logos/ or outside the project prefixBusiness code; OpenLogos does not judge it

lifecycle_only is true only when the change set is non-empty, every record parses, and every file (for renames and copies, both sides) is lifecycle. An empty diff, an unknown status letter, or a malformed stream gives lifecycle_only: false with the reason listed — it fails closed toward “build it”.

lifecycle_only is the only field CI should decide on. files[], non_lifecycle_paths, operations, changes and reasons are for display.

ExitMeaning
0Classification finished — whether lifecycle_only is true or false. The exit code does not encode the verdict.
1Operational error: IMPACT_INPUT_INVALID (bad option combination or value) or IMPACT_GIT_DIFF_FAILED (git unavailable, not a repository, unknown revision)
Terminal window
result=$(openlogos impact --base "$BASE_SHA" --head "$HEAD_SHA" --format json)
if [ "$(echo "$result" | jq -r '.data.lifecycle_only')" = "true" ]; then
echo "Lifecycle-only change — skipping build and deploy"
exit 0
fi

Pin the CLI version in CI so the classification rules do not change underneath you; breaking changes to the contract ship as a new schema version.

  • archive — Produces typical lifecycle-only commits
  • verify — Writes results under logos/resources/verify/