crapkit 0.4.8__tar.gz → 0.4.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {crapkit-0.4.8/src/crapkit.egg-info → crapkit-0.4.9}/PKG-INFO +47 -18
- {crapkit-0.4.8 → crapkit-0.4.9}/README.md +46 -17
- {crapkit-0.4.8 → crapkit-0.4.9}/pyproject.toml +1 -1
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/__init__.py +1 -1
- {crapkit-0.4.8 → crapkit-0.4.9/src/crapkit.egg-info}/PKG-INFO +47 -18
- {crapkit-0.4.8 → crapkit-0.4.9}/LICENSE +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/setup.cfg +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/__main__.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/_pygdefer.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/analyze.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cache.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/churn.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/churn_cache.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/churn_log.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/__init__.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/_shared.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/admin.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/analyses.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/claude_hook.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/parser.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/queue.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/ratchet_cmds.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/reports.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/scoring.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/verifying.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/config.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coupling.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coupling_cache.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coverage_istanbul.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coverage_py.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/covstream.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/diffparse.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/digest.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/discover.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/doctor.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/dup.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/errors.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/gitio.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/hook.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/junitparse.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/keys.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lanes.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardcognitive.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardpowershell.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardrust.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardshell.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/mcp_server.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/merge.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/mutate.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/mutate_pool.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/override.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/packet.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/procs.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/ratchet.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/ratchet_report.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/report.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/sarif.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/sarifio.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/scaffold.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/score.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/snapshot.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/store.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/uncovered.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/universe.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/verify.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/watch.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/worklist.py +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/SOURCES.txt +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/dependency_links.txt +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/entry_points.txt +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/requires.txt +0 -0
- {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crapkit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.9
|
|
4
4
|
Summary: Scores every function on complexity times uncovered risk, ranks the worst, and blocks commits that add more.
|
|
5
5
|
Author: Jean-Francois Gagne
|
|
6
6
|
License: MIT
|
|
@@ -147,7 +147,7 @@ changing crapkit.
|
|
|
147
147
|
|
|
148
148
|
```
|
|
149
149
|
$ crapkit --version
|
|
150
|
-
crapkit 0.4.
|
|
150
|
+
crapkit 0.4.9
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
`python -m crapkit` works identically to the console script and is what to use from a
|
|
@@ -375,7 +375,7 @@ crapkit ships a `.pre-commit-hooks.yaml` declaring `id: crapkit-gate`. In your
|
|
|
375
375
|
repos:
|
|
376
376
|
- repo: https://github.com/JeanFrancoisGagne/crapkit
|
|
377
377
|
# crapkit's release step rewrites this line to the tag it just cut
|
|
378
|
-
rev: v0.4.
|
|
378
|
+
rev: v0.4.9
|
|
379
379
|
hooks:
|
|
380
380
|
- id: crapkit-gate
|
|
381
381
|
```
|
|
@@ -551,16 +551,18 @@ The rows are the ranked worklist for the files the pull request changed, worst f
|
|
|
551
551
|
and `remedy` is the run's own verdict for that function: `decompose`, `add-tests` or `ok`.
|
|
552
552
|
A pull request that touches no ranked function gets the heading and no table.
|
|
553
553
|
|
|
554
|
-
The two file counts describe
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
554
|
+
The two file counts describe the same diff, counted twice. `39 changed files` is
|
|
555
|
+
`git diff --name-only base.sha...HEAD`, the branch's own commits, and it is what the
|
|
556
|
+
table is filtered to. The count on the verdict line is what `verify` measured from the
|
|
557
|
+
same fork point. With `delta: "false"` the second one is 0, because there is nothing
|
|
558
|
+
behind the checkout to measure from.
|
|
558
559
|
|
|
559
560
|
### The inputs
|
|
560
561
|
|
|
561
562
|
| Input | Default | What it does |
|
|
562
563
|
|---|---|---|
|
|
563
564
|
| `gate` | `"false"` | `"true"` exits with `crapkit verify`'s own code, so a finding fails the check. Anything else exits 0 and the comment is the whole output |
|
|
565
|
+
| `delta` | `"true"` | scores the pull request's base commit first, so the verdict covers the commits the pull request adds. Costs a second lane run; `"false"` scores the checkout alone |
|
|
564
566
|
| `top` | `"5"` | worklist rows rendered in the table |
|
|
565
567
|
| `python-version` | `"3.12"` | the interpreter `actions/setup-python` installs crapkit into |
|
|
566
568
|
|
|
@@ -570,17 +572,44 @@ day two.
|
|
|
570
572
|
|
|
571
573
|
### What the verdict line covers
|
|
572
574
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
575
|
+
On a pull request, the commits the pull request adds. The action scores the fork point
|
|
576
|
+
first, then the checkout, then runs `crapkit verify --base <fork>`, which measures the
|
|
577
|
+
diff from there and takes the fork point's run as its baseline. So the gate judges the
|
|
578
|
+
functions in the diff a reviewer is reading, and a repository that was already over its
|
|
579
|
+
ceiling before the branch started does not fail every pull request that touches it.
|
|
580
|
+
|
|
581
|
+
The fork point is `git merge-base` of `base.sha` and HEAD, not `base.sha` itself.
|
|
582
|
+
`base.sha` is the base branch's tip when the event fired, so a base branch that moved
|
|
583
|
+
after the branch forked carries commits HEAD never saw, and a run there would be neither
|
|
584
|
+
the baseline verify wants nor a diff anyone is reviewing.
|
|
585
|
+
|
|
586
|
+
The base run happens in a detached worktree under `RUNNER_TEMP`, and its store is copied
|
|
587
|
+
over the checkout's so both runs sit in one place. The cost is **two lane runs on a pull
|
|
588
|
+
request**: your suite runs once at the fork point and once on the checkout. Set `delta:
|
|
589
|
+
"false"` to skip the base run, and the verdict falls back to the checkout against its own
|
|
590
|
+
run, which reports the tree's own health and judges no changed function.
|
|
591
|
+
|
|
592
|
+
Three things leave the base run unmade, and none of them fails the job: a shallow clone
|
|
593
|
+
that does not hold the fork point, a fork point older than your `crapkit.toml`, and a
|
|
594
|
+
lane that will not run against that tree. The step logs `crapkit base scoring exited N`
|
|
595
|
+
and the verdict falls back the same way `delta: "false"` does. A `push` event never makes
|
|
596
|
+
one, because there is no base commit and no pull request to comment on.
|
|
597
|
+
|
|
598
|
+
One requirement the base run adds: the lane has to measure the tree it runs in. A lane
|
|
599
|
+
that reaches an installed copy of your package instead of the checkout will measure the
|
|
600
|
+
pull request's code while standing on the base commit, and the two runs then describe the
|
|
601
|
+
same tree. `crapkit verify` refuses a run whose artifact names files outside the tree
|
|
602
|
+
(exit 5), which catches the loud version of this; a lane pinned to a path outside the
|
|
603
|
+
worktree is the quiet one. Point the lane at the tree, or set `delta: "false"`.
|
|
604
|
+
|
|
605
|
+
`--reuse-artifacts` is what keeps each of those runs to one pass of your suite. `coverage`
|
|
606
|
+
ran the lanes moments earlier on that tree, and verify parses those artifacts rather than
|
|
607
|
+
running the whole suite a second time for the same numbers.
|
|
608
|
+
|
|
609
|
+
The other gate that judges a delta is the portable baseline in [Route 4](#route-4-ci):
|
|
610
|
+
commit `crapkit-baseline.tsv` on the default branch and run `crapkit verify --baseline-tsv
|
|
611
|
+
crapkit-baseline.tsv` in a step of your own. It needs no second lane run, and it needs
|
|
612
|
+
someone to keep that file current.
|
|
584
613
|
|
|
585
614
|
The comment is posted with `gh api` and the job's own `GITHUB_TOKEN`, which needs
|
|
586
615
|
`pull-requests: write`. Two things it cannot do: a pull request from a fork gets a
|
|
@@ -108,7 +108,7 @@ changing crapkit.
|
|
|
108
108
|
|
|
109
109
|
```
|
|
110
110
|
$ crapkit --version
|
|
111
|
-
crapkit 0.4.
|
|
111
|
+
crapkit 0.4.9
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
`python -m crapkit` works identically to the console script and is what to use from a
|
|
@@ -336,7 +336,7 @@ crapkit ships a `.pre-commit-hooks.yaml` declaring `id: crapkit-gate`. In your
|
|
|
336
336
|
repos:
|
|
337
337
|
- repo: https://github.com/JeanFrancoisGagne/crapkit
|
|
338
338
|
# crapkit's release step rewrites this line to the tag it just cut
|
|
339
|
-
rev: v0.4.
|
|
339
|
+
rev: v0.4.9
|
|
340
340
|
hooks:
|
|
341
341
|
- id: crapkit-gate
|
|
342
342
|
```
|
|
@@ -512,16 +512,18 @@ The rows are the ranked worklist for the files the pull request changed, worst f
|
|
|
512
512
|
and `remedy` is the run's own verdict for that function: `decompose`, `add-tests` or `ok`.
|
|
513
513
|
A pull request that touches no ranked function gets the heading and no table.
|
|
514
514
|
|
|
515
|
-
The two file counts describe
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
515
|
+
The two file counts describe the same diff, counted twice. `39 changed files` is
|
|
516
|
+
`git diff --name-only base.sha...HEAD`, the branch's own commits, and it is what the
|
|
517
|
+
table is filtered to. The count on the verdict line is what `verify` measured from the
|
|
518
|
+
same fork point. With `delta: "false"` the second one is 0, because there is nothing
|
|
519
|
+
behind the checkout to measure from.
|
|
519
520
|
|
|
520
521
|
### The inputs
|
|
521
522
|
|
|
522
523
|
| Input | Default | What it does |
|
|
523
524
|
|---|---|---|
|
|
524
525
|
| `gate` | `"false"` | `"true"` exits with `crapkit verify`'s own code, so a finding fails the check. Anything else exits 0 and the comment is the whole output |
|
|
526
|
+
| `delta` | `"true"` | scores the pull request's base commit first, so the verdict covers the commits the pull request adds. Costs a second lane run; `"false"` scores the checkout alone |
|
|
525
527
|
| `top` | `"5"` | worklist rows rendered in the table |
|
|
526
528
|
| `python-version` | `"3.12"` | the interpreter `actions/setup-python` installs crapkit into |
|
|
527
529
|
|
|
@@ -531,17 +533,44 @@ day two.
|
|
|
531
533
|
|
|
532
534
|
### What the verdict line covers
|
|
533
535
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
536
|
+
On a pull request, the commits the pull request adds. The action scores the fork point
|
|
537
|
+
first, then the checkout, then runs `crapkit verify --base <fork>`, which measures the
|
|
538
|
+
diff from there and takes the fork point's run as its baseline. So the gate judges the
|
|
539
|
+
functions in the diff a reviewer is reading, and a repository that was already over its
|
|
540
|
+
ceiling before the branch started does not fail every pull request that touches it.
|
|
541
|
+
|
|
542
|
+
The fork point is `git merge-base` of `base.sha` and HEAD, not `base.sha` itself.
|
|
543
|
+
`base.sha` is the base branch's tip when the event fired, so a base branch that moved
|
|
544
|
+
after the branch forked carries commits HEAD never saw, and a run there would be neither
|
|
545
|
+
the baseline verify wants nor a diff anyone is reviewing.
|
|
546
|
+
|
|
547
|
+
The base run happens in a detached worktree under `RUNNER_TEMP`, and its store is copied
|
|
548
|
+
over the checkout's so both runs sit in one place. The cost is **two lane runs on a pull
|
|
549
|
+
request**: your suite runs once at the fork point and once on the checkout. Set `delta:
|
|
550
|
+
"false"` to skip the base run, and the verdict falls back to the checkout against its own
|
|
551
|
+
run, which reports the tree's own health and judges no changed function.
|
|
552
|
+
|
|
553
|
+
Three things leave the base run unmade, and none of them fails the job: a shallow clone
|
|
554
|
+
that does not hold the fork point, a fork point older than your `crapkit.toml`, and a
|
|
555
|
+
lane that will not run against that tree. The step logs `crapkit base scoring exited N`
|
|
556
|
+
and the verdict falls back the same way `delta: "false"` does. A `push` event never makes
|
|
557
|
+
one, because there is no base commit and no pull request to comment on.
|
|
558
|
+
|
|
559
|
+
One requirement the base run adds: the lane has to measure the tree it runs in. A lane
|
|
560
|
+
that reaches an installed copy of your package instead of the checkout will measure the
|
|
561
|
+
pull request's code while standing on the base commit, and the two runs then describe the
|
|
562
|
+
same tree. `crapkit verify` refuses a run whose artifact names files outside the tree
|
|
563
|
+
(exit 5), which catches the loud version of this; a lane pinned to a path outside the
|
|
564
|
+
worktree is the quiet one. Point the lane at the tree, or set `delta: "false"`.
|
|
565
|
+
|
|
566
|
+
`--reuse-artifacts` is what keeps each of those runs to one pass of your suite. `coverage`
|
|
567
|
+
ran the lanes moments earlier on that tree, and verify parses those artifacts rather than
|
|
568
|
+
running the whole suite a second time for the same numbers.
|
|
569
|
+
|
|
570
|
+
The other gate that judges a delta is the portable baseline in [Route 4](#route-4-ci):
|
|
571
|
+
commit `crapkit-baseline.tsv` on the default branch and run `crapkit verify --baseline-tsv
|
|
572
|
+
crapkit-baseline.tsv` in a step of your own. It needs no second lane run, and it needs
|
|
573
|
+
someone to keep that file current.
|
|
545
574
|
|
|
546
575
|
The comment is posted with `gh api` and the job's own `GITHUB_TOKEN`, which needs
|
|
547
576
|
`pull-requests: write`. Two things it cannot do: a pull request from a fork gets a
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "crapkit"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.9"
|
|
8
8
|
description = "Scores every function on complexity times uncovered risk, ranks the worst, and blocks commits that add more."
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""crapkit: deterministic CRAP-score framework."""
|
|
2
|
-
__version__ = "0.4.
|
|
2
|
+
__version__ = "0.4.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crapkit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.9
|
|
4
4
|
Summary: Scores every function on complexity times uncovered risk, ranks the worst, and blocks commits that add more.
|
|
5
5
|
Author: Jean-Francois Gagne
|
|
6
6
|
License: MIT
|
|
@@ -147,7 +147,7 @@ changing crapkit.
|
|
|
147
147
|
|
|
148
148
|
```
|
|
149
149
|
$ crapkit --version
|
|
150
|
-
crapkit 0.4.
|
|
150
|
+
crapkit 0.4.9
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
`python -m crapkit` works identically to the console script and is what to use from a
|
|
@@ -375,7 +375,7 @@ crapkit ships a `.pre-commit-hooks.yaml` declaring `id: crapkit-gate`. In your
|
|
|
375
375
|
repos:
|
|
376
376
|
- repo: https://github.com/JeanFrancoisGagne/crapkit
|
|
377
377
|
# crapkit's release step rewrites this line to the tag it just cut
|
|
378
|
-
rev: v0.4.
|
|
378
|
+
rev: v0.4.9
|
|
379
379
|
hooks:
|
|
380
380
|
- id: crapkit-gate
|
|
381
381
|
```
|
|
@@ -551,16 +551,18 @@ The rows are the ranked worklist for the files the pull request changed, worst f
|
|
|
551
551
|
and `remedy` is the run's own verdict for that function: `decompose`, `add-tests` or `ok`.
|
|
552
552
|
A pull request that touches no ranked function gets the heading and no table.
|
|
553
553
|
|
|
554
|
-
The two file counts describe
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
554
|
+
The two file counts describe the same diff, counted twice. `39 changed files` is
|
|
555
|
+
`git diff --name-only base.sha...HEAD`, the branch's own commits, and it is what the
|
|
556
|
+
table is filtered to. The count on the verdict line is what `verify` measured from the
|
|
557
|
+
same fork point. With `delta: "false"` the second one is 0, because there is nothing
|
|
558
|
+
behind the checkout to measure from.
|
|
558
559
|
|
|
559
560
|
### The inputs
|
|
560
561
|
|
|
561
562
|
| Input | Default | What it does |
|
|
562
563
|
|---|---|---|
|
|
563
564
|
| `gate` | `"false"` | `"true"` exits with `crapkit verify`'s own code, so a finding fails the check. Anything else exits 0 and the comment is the whole output |
|
|
565
|
+
| `delta` | `"true"` | scores the pull request's base commit first, so the verdict covers the commits the pull request adds. Costs a second lane run; `"false"` scores the checkout alone |
|
|
564
566
|
| `top` | `"5"` | worklist rows rendered in the table |
|
|
565
567
|
| `python-version` | `"3.12"` | the interpreter `actions/setup-python` installs crapkit into |
|
|
566
568
|
|
|
@@ -570,17 +572,44 @@ day two.
|
|
|
570
572
|
|
|
571
573
|
### What the verdict line covers
|
|
572
574
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
575
|
+
On a pull request, the commits the pull request adds. The action scores the fork point
|
|
576
|
+
first, then the checkout, then runs `crapkit verify --base <fork>`, which measures the
|
|
577
|
+
diff from there and takes the fork point's run as its baseline. So the gate judges the
|
|
578
|
+
functions in the diff a reviewer is reading, and a repository that was already over its
|
|
579
|
+
ceiling before the branch started does not fail every pull request that touches it.
|
|
580
|
+
|
|
581
|
+
The fork point is `git merge-base` of `base.sha` and HEAD, not `base.sha` itself.
|
|
582
|
+
`base.sha` is the base branch's tip when the event fired, so a base branch that moved
|
|
583
|
+
after the branch forked carries commits HEAD never saw, and a run there would be neither
|
|
584
|
+
the baseline verify wants nor a diff anyone is reviewing.
|
|
585
|
+
|
|
586
|
+
The base run happens in a detached worktree under `RUNNER_TEMP`, and its store is copied
|
|
587
|
+
over the checkout's so both runs sit in one place. The cost is **two lane runs on a pull
|
|
588
|
+
request**: your suite runs once at the fork point and once on the checkout. Set `delta:
|
|
589
|
+
"false"` to skip the base run, and the verdict falls back to the checkout against its own
|
|
590
|
+
run, which reports the tree's own health and judges no changed function.
|
|
591
|
+
|
|
592
|
+
Three things leave the base run unmade, and none of them fails the job: a shallow clone
|
|
593
|
+
that does not hold the fork point, a fork point older than your `crapkit.toml`, and a
|
|
594
|
+
lane that will not run against that tree. The step logs `crapkit base scoring exited N`
|
|
595
|
+
and the verdict falls back the same way `delta: "false"` does. A `push` event never makes
|
|
596
|
+
one, because there is no base commit and no pull request to comment on.
|
|
597
|
+
|
|
598
|
+
One requirement the base run adds: the lane has to measure the tree it runs in. A lane
|
|
599
|
+
that reaches an installed copy of your package instead of the checkout will measure the
|
|
600
|
+
pull request's code while standing on the base commit, and the two runs then describe the
|
|
601
|
+
same tree. `crapkit verify` refuses a run whose artifact names files outside the tree
|
|
602
|
+
(exit 5), which catches the loud version of this; a lane pinned to a path outside the
|
|
603
|
+
worktree is the quiet one. Point the lane at the tree, or set `delta: "false"`.
|
|
604
|
+
|
|
605
|
+
`--reuse-artifacts` is what keeps each of those runs to one pass of your suite. `coverage`
|
|
606
|
+
ran the lanes moments earlier on that tree, and verify parses those artifacts rather than
|
|
607
|
+
running the whole suite a second time for the same numbers.
|
|
608
|
+
|
|
609
|
+
The other gate that judges a delta is the portable baseline in [Route 4](#route-4-ci):
|
|
610
|
+
commit `crapkit-baseline.tsv` on the default branch and run `crapkit verify --baseline-tsv
|
|
611
|
+
crapkit-baseline.tsv` in a step of your own. It needs no second lane run, and it needs
|
|
612
|
+
someone to keep that file current.
|
|
584
613
|
|
|
585
614
|
The comment is posted with `gh api` and the job's own `GITHUB_TOKEN`, which needs
|
|
586
615
|
`pull-requests: write`. Two things it cannot do: a pull request from a fork gets a
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|