diff --git a/docs/releases/v0.8.0.md b/docs/releases/v0.8.0.md new file mode 100644 index 0000000..cb7f0f3 --- /dev/null +++ b/docs/releases/v0.8.0.md @@ -0,0 +1,51 @@ +# jpdev v0.8.0 + +This release makes a check run proportional to a change, adds an opt-in duplication check, and +turns the kit's own policy vendor-neutral +([issue #33](https://github.com/Judgment-Pack/judgment-pack-devkit/issues/33), +[pull request #40](https://github.com/Judgment-Pack/judgment-pack-devkit/pull/40); +[issue #35](https://github.com/Judgment-Pack/judgment-pack-devkit/issues/35), +[pull request #41](https://github.com/Judgment-Pack/judgment-pack-devkit/pull/41); +[issue #42](https://github.com/Judgment-Pack/judgment-pack-devkit/issues/42), +[pull request #44](https://github.com/Judgment-Pack/judgment-pack-devkit/pull/44); +[issue #43](https://github.com/Judgment-Pack/judgment-pack-devkit/issues/43), +[pull request #45](https://github.com/Judgment-Pack/judgment-pack-devkit/pull/45); +[pull request #39](https://github.com/Judgment-Pack/judgment-pack-devkit/pull/39)). + +## Checks proportional to a change + +`jpdev check --changed [BASE]` runs only the check-list steps that `jpdev.json` maps the changed +paths to, taking the paths changed since the merge base of BASE (the default branch when +omitted) and HEAD, in the working tree, the index and HEAD together. The whole list runs when a +changed path is unmapped, when `jpdev.json`, the manifest or the runner itself changed, when +nothing changed, or when the repository has no mapping. A missing merge base (a shallow clone, +an unknown base) is a refusal, never "nothing changed". The vendored runner +(`scripts/dev/check.sh --changed`) does the same through a vendored copy of the selection code +that the kit's tests and the release workflow hold to the library. + +On pull requests the CI template now runs `--changed` against the base branch; a push to the +default branch and a manual dispatch run the whole list, and only those record release evidence. +`jpdev version` prints the kit checkout's description; an unknown option names it, so a kit +without a feature says so. + +## Duplication check + +An opt-in `duplication` step reports copied blocks across a repository's declared languages, with +per-repository thresholds (`min_tokens`, `min_lines`, `max_file_bytes`), an explicit ignore block +for copies that are meant to stay, and a size bound with a named refusal when memory runs out. +Each token run keeps its most recent places and one place that spans `min_lines` lines on its +own, so a real pair is reported whatever sits between its two copies. Binary files and files +over the size bound are named and skipped. The kit runs the check on itself. + +## Policy + +The model that builds or reviews is chosen by use case; a particular vendor's runner is one way +to run a build, not the default. The policy's "who builds and who reviews" section says what a +builder, a reviewer and a coordinator each own, independent of the tool that runs them. + +## Operating limits + +The duplication check covers a copy only where at least one `min_tokens` run spans `min_lines` +lines on its own; a copy denser than that is covered by the recent-places window alone. Memory +across many files under `max_file_bytes` is bounded only by the refusal. `jpdev clean` keeps the +limits of v0.7.0. diff --git a/lib/common.sh b/lib/common.sh index 998e1a1..aa80b1f 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -3,7 +3,7 @@ # Sourced by bin/jpdev and lib/wrap.sh. Needs bash 5. # shellcheck disable=SC2034 # read by bin/jpdev -JPDEV_VERSION=0.7.0 +JPDEV_VERSION=0.8.0 # Every setting jpdev reads. The environment wins over the config file, the config file over the default. JPDEV_SETTINGS=(JPDEV_SCRATCH JPDEV_LOCK JPDEV_NODE_RSS_MB JPDEV_NODE_TIMEOUT_S JPDEV_GO_ULIMIT_KB diff --git a/scripts/dev/changed_checks.py b/scripts/dev/changed_checks.py index 559fc8a..84f7cda 100644 --- a/scripts/dev/changed_checks.py +++ b/scripts/dev/changed_checks.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# from judgment-pack-devkit v0.7.0 (lib/changed_checks.py) +# from judgment-pack-devkit v0.8.0 (lib/changed_checks.py) """changed_checks.py --root ROOT --manifest MANIFEST [--base BASE] [--label TEXT] Selects the check-list steps that the changed paths of a clone can affect, for diff --git a/scripts/dev/check.sh b/scripts/dev/check.sh index 8250cdb..39e3645 100755 --- a/scripts/dev/check.sh +++ b/scripts/dev/check.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# from judgment-pack-devkit v0.7.0 (templates/check.sh) +# from judgment-pack-devkit v0.8.0 (templates/check.sh) # scripts/dev/check.sh [--setup] [--only a,b | --changed [BASE]] [--skip a,b] [--all] [--manifest FILE] # Runs the checks of dev.json in order and prints one summary block; exit status = failures. # --changed runs only the checks jpdev.json maps the paths changed since the merge base of BASE diff --git a/scripts/dev/handover_check.sh b/scripts/dev/handover_check.sh index d204b7a..5d84bcb 100755 --- a/scripts/dev/handover_check.sh +++ b/scripts/dev/handover_check.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# from judgment-pack-devkit v0.7.0 (lib/handover_check.sh) +# from judgment-pack-devkit v0.8.0 (lib/handover_check.sh) set -eu python3 - <<'PY' diff --git a/templates/check.sh b/templates/check.sh index 8250cdb..39e3645 100755 --- a/templates/check.sh +++ b/templates/check.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# from judgment-pack-devkit v0.7.0 (templates/check.sh) +# from judgment-pack-devkit v0.8.0 (templates/check.sh) # scripts/dev/check.sh [--setup] [--only a,b | --changed [BASE]] [--skip a,b] [--all] [--manifest FILE] # Runs the checks of dev.json in order and prints one summary block; exit status = failures. # --changed runs only the checks jpdev.json maps the paths changed since the merge base of BASE