@humanbased/crosscheck 1.3.1-beta.5 → 1.5.0
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.
- package/README.md +16 -1
- package/assets/demo-block-to-approve.gif +0 -0
- package/assets/demo-block-to-approve.mp4 +0 -0
- package/dist/__tests__/base-ref-recovery.test.d.ts +2 -0
- package/dist/__tests__/base-ref-recovery.test.d.ts.map +1 -0
- package/dist/__tests__/base-ref-recovery.test.js +102 -0
- package/dist/__tests__/base-ref-recovery.test.js.map +1 -0
- package/dist/__tests__/codex-env.test.js +4 -0
- package/dist/__tests__/codex-env.test.js.map +1 -1
- package/dist/__tests__/credential-free-origin.test.js +134 -2
- package/dist/__tests__/credential-free-origin.test.js.map +1 -1
- package/dist/__tests__/demo-arc.test.d.ts +2 -0
- package/dist/__tests__/demo-arc.test.d.ts.map +1 -0
- package/dist/__tests__/demo-arc.test.js +73 -0
- package/dist/__tests__/demo-arc.test.js.map +1 -0
- package/dist/__tests__/doc-only-verdict.test.d.ts +2 -0
- package/dist/__tests__/doc-only-verdict.test.d.ts.map +1 -0
- package/dist/__tests__/doc-only-verdict.test.js +79 -0
- package/dist/__tests__/doc-only-verdict.test.js.map +1 -0
- package/dist/__tests__/error-classification.test.js +14 -0
- package/dist/__tests__/error-classification.test.js.map +1 -1
- package/dist/__tests__/fix-requires-recheck.test.d.ts +2 -0
- package/dist/__tests__/fix-requires-recheck.test.d.ts.map +1 -0
- package/dist/__tests__/fix-requires-recheck.test.js +56 -0
- package/dist/__tests__/fix-requires-recheck.test.js.map +1 -0
- package/dist/__tests__/human-feedback.test.d.ts +2 -0
- package/dist/__tests__/human-feedback.test.d.ts.map +1 -0
- package/dist/__tests__/human-feedback.test.js +132 -0
- package/dist/__tests__/human-feedback.test.js.map +1 -0
- package/dist/__tests__/inconclusive-review.test.d.ts +2 -0
- package/dist/__tests__/inconclusive-review.test.d.ts.map +1 -0
- package/dist/__tests__/inconclusive-review.test.js +110 -0
- package/dist/__tests__/inconclusive-review.test.js.map +1 -0
- package/dist/__tests__/merge-gate.test.d.ts +2 -0
- package/dist/__tests__/merge-gate.test.d.ts.map +1 -0
- package/dist/__tests__/merge-gate.test.js +220 -0
- package/dist/__tests__/merge-gate.test.js.map +1 -0
- package/dist/__tests__/no-verdict.test.d.ts +2 -0
- package/dist/__tests__/no-verdict.test.d.ts.map +1 -0
- package/dist/__tests__/no-verdict.test.js +415 -0
- package/dist/__tests__/no-verdict.test.js.map +1 -0
- package/dist/__tests__/pr-spec.test.js +37 -0
- package/dist/__tests__/pr-spec.test.js.map +1 -1
- package/dist/__tests__/run.test.js +50 -1
- package/dist/__tests__/run.test.js.map +1 -1
- package/dist/__tests__/runner.test.js +82 -1
- package/dist/__tests__/runner.test.js.map +1 -1
- package/dist/__tests__/standing-verdict-history.test.d.ts +2 -0
- package/dist/__tests__/standing-verdict-history.test.d.ts.map +1 -0
- package/dist/__tests__/standing-verdict-history.test.js +109 -0
- package/dist/__tests__/standing-verdict-history.test.js.map +1 -0
- package/dist/__tests__/step-plan.test.d.ts +2 -0
- package/dist/__tests__/step-plan.test.d.ts.map +1 -0
- package/dist/__tests__/step-plan.test.js +129 -0
- package/dist/__tests__/step-plan.test.js.map +1 -0
- package/dist/cli.js +12 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/merge.d.ts +11 -0
- package/dist/commands/merge.d.ts.map +1 -0
- package/dist/commands/merge.js +188 -0
- package/dist/commands/merge.js.map +1 -0
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/commands/review.js +29 -7
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/run.d.ts +53 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +197 -32
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +14 -3
- package/dist/commands/watch.js.map +1 -1
- package/dist/config/loader.d.ts +4 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +8 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/config/review-strategy.json +5 -5
- package/dist/github/client.d.ts +18 -1
- package/dist/github/client.d.ts.map +1 -1
- package/dist/github/client.js +19 -3
- package/dist/github/client.js.map +1 -1
- package/dist/github/merge.d.ts +28 -0
- package/dist/github/merge.d.ts.map +1 -1
- package/dist/github/merge.js +41 -0
- package/dist/github/merge.js.map +1 -1
- package/dist/github/webhook.d.ts +1 -0
- package/dist/github/webhook.d.ts.map +1 -1
- package/dist/github/webhook.js.map +1 -1
- package/dist/lib/board.d.ts +1 -0
- package/dist/lib/board.d.ts.map +1 -1
- package/dist/lib/board.js +1 -1
- package/dist/lib/board.js.map +1 -1
- package/dist/lib/clone.d.ts +65 -1
- package/dist/lib/clone.d.ts.map +1 -1
- package/dist/lib/clone.js +252 -16
- package/dist/lib/clone.js.map +1 -1
- package/dist/lib/human-feedback.d.ts +9 -0
- package/dist/lib/human-feedback.d.ts.map +1 -0
- package/dist/lib/human-feedback.js +83 -0
- package/dist/lib/human-feedback.js.map +1 -0
- package/dist/lib/logger.d.ts +1 -1
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +6 -0
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/merge-gate.d.ts +70 -0
- package/dist/lib/merge-gate.d.ts.map +1 -0
- package/dist/lib/merge-gate.js +138 -0
- package/dist/lib/merge-gate.js.map +1 -0
- package/dist/lib/no-verdict.d.ts +104 -0
- package/dist/lib/no-verdict.d.ts.map +1 -0
- package/dist/lib/no-verdict.js +262 -0
- package/dist/lib/no-verdict.js.map +1 -0
- package/dist/lib/pr-spec.d.ts +7 -0
- package/dist/lib/pr-spec.d.ts.map +1 -1
- package/dist/lib/pr-spec.js +12 -1
- package/dist/lib/pr-spec.js.map +1 -1
- package/dist/lib/pr-workflow-state.d.ts +37 -0
- package/dist/lib/pr-workflow-state.d.ts.map +1 -1
- package/dist/lib/pr-workflow-state.js +58 -1
- package/dist/lib/pr-workflow-state.js.map +1 -1
- package/dist/lib/review-strategy.d.ts +14 -0
- package/dist/lib/review-strategy.d.ts.map +1 -1
- package/dist/lib/review-strategy.js +32 -1
- package/dist/lib/review-strategy.js.map +1 -1
- package/dist/lib/runner.d.ts +51 -2
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +211 -105
- package/dist/lib/runner.js.map +1 -1
- package/dist/lib/verdict.d.ts +30 -1
- package/dist/lib/verdict.d.ts.map +1 -1
- package/dist/lib/verdict.js +94 -9
- package/dist/lib/verdict.js.map +1 -1
- package/dist/reviewers/codex-env.d.ts.map +1 -1
- package/dist/reviewers/codex-env.js +2 -0
- package/dist/reviewers/codex-env.js.map +1 -1
- package/dist/reviewers/codex.d.ts.map +1 -1
- package/dist/reviewers/codex.js +3 -1
- package/dist/reviewers/codex.js.map +1 -1
- package/dist/reviewers/fix.d.ts +2 -2
- package/dist/reviewers/fix.d.ts.map +1 -1
- package/dist/reviewers/fix.js +10 -4
- package/dist/reviewers/fix.js.map +1 -1
- package/docs/growth/launch/README.md +59 -0
- package/docs/growth/launch/essay-stop-letting-one-agent-review-its-own-code.md +118 -0
- package/docs/growth/launch/posts.md +175 -0
- package/docs/trust.md +16 -1
- package/package.json +11 -3
package/docs/trust.md
CHANGED
|
@@ -79,10 +79,25 @@ The workflow is a sequence of steps, and each step's mutations are listed below.
|
|
|
79
79
|
| **recheck** | Same as review — a second comment, and release of the pending status. **No code.** |
|
|
80
80
|
| **fix** | Code. Commits to the PR's own branch and pushes there, plus a "fix applied" comment. If that push cannot land (protected branch, deleted branch, fork), it pushes the same commit to `fix/cr-<pr>-review-issues`, opens a follow-up PR targeting the original branch, and labels it `cr-autofix`. In `delivery.mode: comment` it pushes nothing and posts the diff as a suggestion instead. |
|
|
81
81
|
| **conflict-resolve** | Code. Merges the base branch into the PR branch, resolves conflicts, and pushes the merge commit to the PR branch, plus a comment. Skipped for fork PRs. |
|
|
82
|
+
| **`crosscheck merge`** (never automatic) | Merges the pull request. Not a workflow step — no verdict, webhook, or scheduled run reaches it; it happens only when a person types the command. See below. |
|
|
82
83
|
|
|
83
84
|
Boundaries that hold across every step:
|
|
84
85
|
|
|
85
|
-
- **Never merges.** No
|
|
86
|
+
- **Never merges on its own.** No verdict, webhook, or scheduled run reaches a merge — there is no code path from a review to one. The single exception is explicit: `crosscheck merge <pr-url>`, which merges only when a person runs it, and only when the gate below is satisfied. `watch`, `run`, `kickass` and `scan` cannot merge anything.
|
|
87
|
+
|
|
88
|
+
This boundary used to be absolute, and the change is worth stating plainly rather than leaving for you to notice: earlier versions had no merge code at all. If you relied on "crosscheck cannot merge, whatever it is told to do", the guarantee is now "crosscheck cannot merge unless a human invokes one specific command", which is a weaker promise. Nothing else in this document changed.
|
|
89
|
+
|
|
90
|
+
| Invocation | Merges when |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `crosscheck merge <pr>` | an `APPROVE` verdict covers the exact commit being merged, and GitHub reports the PR mergeable |
|
|
93
|
+
| `--loose` | the standing verdict covers HEAD and is not `BLOCK` (so `NEEDS WORK` merges) |
|
|
94
|
+
| `--tight` | the default, plus every check green and no unresolved blocking finding |
|
|
95
|
+
| `--force` | no verdict gate at all. Logged as `merge_completed` with the verdict it overrode |
|
|
96
|
+
| `--dry-run` | never — evaluates the gate and reports |
|
|
97
|
+
|
|
98
|
+
Three things hold at every level, `--force` included. A conflicted PR is refused, because `--force` overrides crosscheck's opinion and not git's. The merge is submitted with the head SHA the gate evaluated, so GitHub rejects it if the branch moved in between — an approval can never be applied to a commit that arrived after it. And branch protection is GitHub's to enforce: crosscheck asks, and a protected branch can still say no.
|
|
99
|
+
|
|
100
|
+
To keep the old absolute guarantee, do not grant the token `contents: write`, or simply do not run the command — nothing else invokes it.
|
|
86
101
|
- **Never touches your base branch.** Pushes go to the PR's head branch or to a new `fix/cr-*` branch. `main` and `staging` are only ever read.
|
|
87
102
|
- **Never force-pushes over your work.** A rejected non-fast-forward push is retried by rebasing onto the remote branch; if that fails it gives up and falls back to the follow-up PR.
|
|
88
103
|
- **Never edits outside the clone.** All work happens in a `mkdtemp` directory that is deleted when the step finishes, pass or fail.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humanbased/crosscheck",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "AI code review pipeline that turns agent-written PRs into merge-ready patches",
|
|
5
5
|
"bin": {
|
|
6
6
|
"crosscheck": "dist/cli.js",
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
"test": "vitest run",
|
|
30
30
|
"lint": "eslint src --ext .ts",
|
|
31
31
|
"prepublishOnly": "npm run typecheck && npm run build",
|
|
32
|
-
"verify:strategy": "node scripts/verify-review-strategy.mjs"
|
|
32
|
+
"verify:strategy": "node scripts/verify-review-strategy.mjs",
|
|
33
|
+
"demo:capture": "tsx demo/capture.ts",
|
|
34
|
+
"demo:play": "tsx demo/replay.ts",
|
|
35
|
+
"demo:record": "vhs demo/block-to-approve.tape && vhs demo/block-to-approve-short.tape",
|
|
36
|
+
"demo:time": "tsx demo/measure.ts"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
39
|
"chalk": "^5.3.0",
|
|
@@ -75,5 +79,9 @@
|
|
|
75
79
|
"url": "https://github.com/humanbased-ai/crosscheck/issues"
|
|
76
80
|
},
|
|
77
81
|
"author": "Humanbased PTE LTD",
|
|
78
|
-
"license": "MIT"
|
|
82
|
+
"license": "MIT",
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"access": "public",
|
|
85
|
+
"registry": "https://registry.npmjs.org/"
|
|
86
|
+
}
|
|
79
87
|
}
|