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.
Files changed (72) hide show
  1. {crapkit-0.4.8/src/crapkit.egg-info → crapkit-0.4.9}/PKG-INFO +47 -18
  2. {crapkit-0.4.8 → crapkit-0.4.9}/README.md +46 -17
  3. {crapkit-0.4.8 → crapkit-0.4.9}/pyproject.toml +1 -1
  4. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/__init__.py +1 -1
  5. {crapkit-0.4.8 → crapkit-0.4.9/src/crapkit.egg-info}/PKG-INFO +47 -18
  6. {crapkit-0.4.8 → crapkit-0.4.9}/LICENSE +0 -0
  7. {crapkit-0.4.8 → crapkit-0.4.9}/setup.cfg +0 -0
  8. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/__main__.py +0 -0
  9. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/_pygdefer.py +0 -0
  10. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/analyze.py +0 -0
  11. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cache.py +0 -0
  12. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/churn.py +0 -0
  13. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/churn_cache.py +0 -0
  14. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/churn_log.py +0 -0
  15. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/__init__.py +0 -0
  16. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/_shared.py +0 -0
  17. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/admin.py +0 -0
  18. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/analyses.py +0 -0
  19. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/claude_hook.py +0 -0
  20. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/parser.py +0 -0
  21. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/queue.py +0 -0
  22. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/ratchet_cmds.py +0 -0
  23. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/reports.py +0 -0
  24. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/scoring.py +0 -0
  25. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/cli/verifying.py +0 -0
  26. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/config.py +0 -0
  27. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coupling.py +0 -0
  28. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coupling_cache.py +0 -0
  29. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coverage_istanbul.py +0 -0
  30. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/coverage_py.py +0 -0
  31. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/covstream.py +0 -0
  32. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/diffparse.py +0 -0
  33. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/digest.py +0 -0
  34. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/discover.py +0 -0
  35. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/doctor.py +0 -0
  36. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/dup.py +0 -0
  37. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/errors.py +0 -0
  38. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/gitio.py +0 -0
  39. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/hook.py +0 -0
  40. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/junitparse.py +0 -0
  41. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/keys.py +0 -0
  42. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lanes.py +0 -0
  43. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardcognitive.py +0 -0
  44. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardpowershell.py +0 -0
  45. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardrust.py +0 -0
  46. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/lizardshell.py +0 -0
  47. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/mcp_server.py +0 -0
  48. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/merge.py +0 -0
  49. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/mutate.py +0 -0
  50. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/mutate_pool.py +0 -0
  51. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/override.py +0 -0
  52. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/packet.py +0 -0
  53. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/procs.py +0 -0
  54. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/ratchet.py +0 -0
  55. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/ratchet_report.py +0 -0
  56. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/report.py +0 -0
  57. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/sarif.py +0 -0
  58. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/sarifio.py +0 -0
  59. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/scaffold.py +0 -0
  60. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/score.py +0 -0
  61. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/snapshot.py +0 -0
  62. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/store.py +0 -0
  63. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/uncovered.py +0 -0
  64. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/universe.py +0 -0
  65. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/verify.py +0 -0
  66. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/watch.py +0 -0
  67. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit/worklist.py +0 -0
  68. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/SOURCES.txt +0 -0
  69. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/dependency_links.txt +0 -0
  70. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/entry_points.txt +0 -0
  71. {crapkit-0.4.8 → crapkit-0.4.9}/src/crapkit.egg-info/requires.txt +0 -0
  72. {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.8
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.8
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.8
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 two different diffs, and both are wanted. `39 changed files`
555
- is the pull request's own list, `git diff --name-only` against the base commit, and it is
556
- what the table is filtered to. `7 changed files` on the verdict line is what `verify`
557
- measured against its baseline run, which is the section below.
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
- The action runs `crapkit coverage --json` and then `crapkit verify --json
574
- --reuse-artifacts`, so the baseline is the run written a step earlier, at this same
575
- commit. On a clean checkout that diff is empty: the verdict line reports the tree's own
576
- health and the exit code verify returned, not the pull request's delta. The gate that
577
- judges the delta is the portable baseline in [Route 4](#route-4-ci): commit
578
- `crapkit-baseline.tsv` on the default branch and run `crapkit verify --baseline-tsv
579
- crapkit-baseline.tsv` in a step of your own beside this one.
580
-
581
- `--reuse-artifacts` is what keeps the job to one test run. `coverage` ran the lanes
582
- moments earlier on this same tree, and verify parses those artifacts rather than running
583
- your whole suite a second time for the same numbers.
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.8
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.8
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 two different diffs, and both are wanted. `39 changed files`
516
- is the pull request's own list, `git diff --name-only` against the base commit, and it is
517
- what the table is filtered to. `7 changed files` on the verdict line is what `verify`
518
- measured against its baseline run, which is the section below.
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
- The action runs `crapkit coverage --json` and then `crapkit verify --json
535
- --reuse-artifacts`, so the baseline is the run written a step earlier, at this same
536
- commit. On a clean checkout that diff is empty: the verdict line reports the tree's own
537
- health and the exit code verify returned, not the pull request's delta. The gate that
538
- judges the delta is the portable baseline in [Route 4](#route-4-ci): commit
539
- `crapkit-baseline.tsv` on the default branch and run `crapkit verify --baseline-tsv
540
- crapkit-baseline.tsv` in a step of your own beside this one.
541
-
542
- `--reuse-artifacts` is what keeps the job to one test run. `coverage` ran the lanes
543
- moments earlier on this same tree, and verify parses those artifacts rather than running
544
- your whole suite a second time for the same numbers.
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.8"
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.8"
2
+ __version__ = "0.4.9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crapkit
3
- Version: 0.4.8
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.8
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.8
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 two different diffs, and both are wanted. `39 changed files`
555
- is the pull request's own list, `git diff --name-only` against the base commit, and it is
556
- what the table is filtered to. `7 changed files` on the verdict line is what `verify`
557
- measured against its baseline run, which is the section below.
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
- The action runs `crapkit coverage --json` and then `crapkit verify --json
574
- --reuse-artifacts`, so the baseline is the run written a step earlier, at this same
575
- commit. On a clean checkout that diff is empty: the verdict line reports the tree's own
576
- health and the exit code verify returned, not the pull request's delta. The gate that
577
- judges the delta is the portable baseline in [Route 4](#route-4-ci): commit
578
- `crapkit-baseline.tsv` on the default branch and run `crapkit verify --baseline-tsv
579
- crapkit-baseline.tsv` in a step of your own beside this one.
580
-
581
- `--reuse-artifacts` is what keeps the job to one test run. `coverage` ran the lanes
582
- moments earlier on this same tree, and verify parses those artifacts rather than running
583
- your whole suite a second time for the same numbers.
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