closure_drift

v1.11.2
io.github.luizfnsilva/closure_drift Checked 17 hours ago Published 12 days ago

Before an agent tags a release: does that version label already name different code in the git tags?

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

would_tag Check before tagging

Use BEFORE creating a release tag: would the version that HEAD declares reuse a label that already names other code in the tags? Exit 1 means do not tag; bump the version first. Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.

ParameterTypeDescription
repo *stringpath to a local git repository with its tags fetched

check_versions Measure all version labels

Use to audit the whole tag history: does each version label name exactly one code state? For a single release about to be tagged, use would_tag. With one release only, the answer is not decided (exit 2). Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.

ParameterTypeDescription
repo *stringpath to a local git repository with its tags fetched
published_filestringa local file with the versions actually released, one per line; tags not on it are not counted as publications
strictbooleananswer clean only if every tag scanned was compared (default false)

explain_label Explain a label in drift

Use after check_versions reports drift: lists, for one label, the paths that differ between the first tag that used it and each other tag that did. For two references you choose, use compare. Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.

ParameterTypeDescription
label *stringa version label reported in drift, as written in the report (e.g. 1.0.0)
repo *stringpath to a local git repository with its tags fetched

compare Compare two references

Use to compare any two tags or commits you name: their version labels, closures and the paths that differ. Publication points play no part. Exit 1 when both declare one label and the code differs. Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.

ParameterTypeDescription
a *stringthe first tag or commit (the reference side)
b *stringthe second tag or commit; paths are listed as changed, only in a, only in b
repo *stringpath to a local git repository with its tags fetched