@reviewsensei/cli-linux-x64-gnu 0.6.8 → 0.6.9

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.
Binary file
@@ -12,7 +12,6 @@
12
12
  "completed_verification_rounds",
13
13
  "handoffs",
14
14
  "no_progress_events",
15
- "cap_created_approval",
16
15
  "limitations"
17
16
  ],
18
17
  "properties": {
@@ -22,8 +21,9 @@
22
21
  "enum": ["legacy", "advisory", "merge-focused", "strict"]
23
22
  },
24
23
  "steps": {
24
+ "description": "Replayed attempts. The bound is a storage ceiling, not a review-count admission limit; sequences past the former 32-round validation bound serialize normally.",
25
25
  "type": "array",
26
- "maxItems": 32,
26
+ "maxItems": 1000000,
27
27
  "items": {
28
28
  "type": "object",
29
29
  "additionalProperties": false,
@@ -43,7 +43,6 @@
43
43
  "handoff_reason": {
44
44
  "type": ["string", "null"],
45
45
  "enum": [
46
- "round-budget-exhausted",
47
46
  "failed-attempt-budget-exhausted",
48
47
  "no-progress",
49
48
  "incomplete-coverage",
@@ -58,11 +57,10 @@
58
57
  }
59
58
  }
60
59
  },
61
- "completed_initial_reviews": {"type": "integer", "minimum": 0, "maximum": 32},
62
- "completed_verification_rounds": {"type": "integer", "minimum": 0, "maximum": 32},
63
- "handoffs": {"type": "integer", "minimum": 0, "maximum": 32},
64
- "no_progress_events": {"type": "integer", "minimum": 0, "maximum": 32},
65
- "cap_created_approval": {"type": "boolean"},
60
+ "completed_initial_reviews": {"type": "integer", "minimum": 0, "maximum": 1000000},
61
+ "completed_verification_rounds": {"type": "integer", "minimum": 0, "maximum": 1000000},
62
+ "handoffs": {"type": "integer", "minimum": 0, "maximum": 1000000},
63
+ "no_progress_events": {"type": "integer", "minimum": 0, "maximum": 1000000},
66
64
  "limitations": {
67
65
  "type": "array",
68
66
  "maxItems": 8,
@@ -4,14 +4,15 @@
4
4
  "title": "ReviewSensei observed convergence evidence report v1",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["schema_version", "mode", "events", "baseline_events", "command_events", "finding_metrics", "execution_metrics", "shadow_isolated", "evidence_identity", "approval_events", "cap_created_approval", "cutover_status", "unmet_criteria", "limitations"],
7
+ "required": ["schema_version", "mode", "events", "baseline_events", "command_events", "finding_metrics", "execution_metrics", "shadow_isolated", "evidence_identity", "approval_events", "cutover_status", "unmet_criteria", "limitations"],
8
8
  "properties": {
9
9
  "schema_version": {"const": "1.0"},
10
10
  "mode": {"type": "string", "enum": ["advisory", "merge-focused", "strict"]},
11
11
  "events": {
12
+ "description": "Observed attempts. The bound is a storage ceiling, not a review-count admission limit; sequences past the former 32-round validation bound serialize normally.",
12
13
  "type": "array",
13
14
  "minItems": 1,
14
- "maxItems": 32,
15
+ "maxItems": 1000000,
15
16
  "items": {
16
17
  "type": "object",
17
18
  "additionalProperties": false,
@@ -40,7 +41,7 @@
40
41
  }
41
42
  }
42
43
  },
43
- "baseline_events": {"type": "integer", "minimum": 0, "maximum": 32},
44
+ "baseline_events": {"type": "integer", "minimum": 0, "maximum": 1000000},
44
45
  "command_events": {"type": "array", "minItems": 2, "maxItems": 8, "items": {"type": "string", "minLength": 1, "maxLength": 128}},
45
46
  "finding_metrics": {
46
47
  "type": "object",
@@ -64,8 +65,8 @@
64
65
  "additionalProperties": false,
65
66
  "required": ["completed_rounds", "handoffs", "provider_calls", "failed_attempts"],
66
67
  "properties": {
67
- "completed_rounds": {"type": "integer", "minimum": 0, "maximum": 32},
68
- "handoffs": {"type": "integer", "minimum": 0, "maximum": 32},
68
+ "completed_rounds": {"type": "integer", "minimum": 0, "maximum": 1000000},
69
+ "handoffs": {"type": "integer", "minimum": 0, "maximum": 1000000},
69
70
  "provider_calls": {"type": "integer", "minimum": 0, "maximum": 512},
70
71
  "failed_attempts": {"type": "integer", "minimum": 0, "maximum": 32}
71
72
  }
@@ -84,8 +85,7 @@
84
85
  "command": {"type": "string", "minLength": 1, "maxLength": 256}
85
86
  }
86
87
  },
87
- "approval_events": {"type": ["integer", "null"], "minimum": 0, "maximum": 32},
88
- "cap_created_approval": {"type": ["boolean", "null"]},
88
+ "approval_events": {"type": ["integer", "null"], "minimum": 0, "maximum": 1000000},
89
89
  "cutover_status": {"type": "string", "enum": ["passed", "not_ready"]},
90
90
  "unmet_criteria": {"type": "array", "maxItems": 16, "items": {"type": "string", "minLength": 1, "maxLength": 256}},
91
91
  "limitations": {"type": "array", "minItems": 1, "maxItems": 8, "items": {"type": "string", "minLength": 1, "maxLength": 256}}
@@ -8,8 +8,6 @@
8
8
  "schema_version",
9
9
  "mode",
10
10
  "enforcement",
11
- "max_completed_initial_reviews",
12
- "max_completed_verification_rounds",
13
11
  "max_failed_attempts",
14
12
  "automatic_github_review_events",
15
13
  "inline_advisory_threads"
@@ -24,16 +22,6 @@
24
22
  "type": "string",
25
23
  "enum": ["display-only", "publication"]
26
24
  },
27
- "max_completed_initial_reviews": {
28
- "type": "integer",
29
- "minimum": 1,
30
- "maximum": 8
31
- },
32
- "max_completed_verification_rounds": {
33
- "type": "integer",
34
- "minimum": 0,
35
- "maximum": 8
36
- },
37
25
  "max_failed_attempts": {
38
26
  "type": "integer",
39
27
  "minimum": 1,
@@ -10,12 +10,9 @@
10
10
  "admit",
11
11
  "count_as_completed_round",
12
12
  "round_kind",
13
- "remaining_initial_reviews",
14
- "remaining_verification_rounds",
15
13
  "handoff",
16
14
  "handoff_reason",
17
- "may_emit_approve",
18
- "cap_creates_approval"
15
+ "may_emit_approve"
19
16
  ],
20
17
  "properties": {
21
18
  "schema_version": {"const": "1.0"},
@@ -29,21 +26,10 @@
29
26
  "type": "string",
30
27
  "enum": ["initial", "verification", "none"]
31
28
  },
32
- "remaining_initial_reviews": {
33
- "type": "integer",
34
- "minimum": 0,
35
- "maximum": 8
36
- },
37
- "remaining_verification_rounds": {
38
- "type": "integer",
39
- "minimum": 0,
40
- "maximum": 8
41
- },
42
29
  "handoff": {"type": "boolean"},
43
30
  "handoff_reason": {
44
31
  "type": ["string", "null"],
45
32
  "enum": [
46
- "round-budget-exhausted",
47
33
  "failed-attempt-budget-exhausted",
48
34
  "no-progress",
49
35
  "incomplete-coverage",
@@ -52,7 +38,6 @@
52
38
  null
53
39
  ]
54
40
  },
55
- "may_emit_approve": {"type": "boolean"},
56
- "cap_creates_approval": {"type": "boolean", "const": false}
41
+ "may_emit_approve": {"type": "boolean"}
57
42
  }
58
43
  }
@@ -30,9 +30,10 @@
30
30
  "minimum": 1,
31
31
  "maximum": 2147483647
32
32
  },
33
- "completed_initial_reviews": {"type": "integer", "minimum": 0, "maximum": 32},
34
- "completed_verification_rounds": {"type": "integer", "minimum": 0, "maximum": 32},
33
+ "completed_initial_reviews": {"type": "integer", "minimum": 0, "maximum": 1000000},
34
+ "completed_verification_rounds": {"type": "integer", "minimum": 0, "maximum": 1000000},
35
35
  "failed_attempts": {"type": "integer", "minimum": 0, "maximum": 32},
36
+ "failed_attempts_head_sha": {"type": ["string", "null"], "pattern": "^[a-f0-9]{40,64}$"},
36
37
  "generation": {"type": "integer", "minimum": 0, "maximum": 2147483647},
37
38
  "reservation_id": {
38
39
  "anyOf": [
@@ -85,6 +86,7 @@
85
86
  }
86
87
  },
87
88
  "continuation_grants": {
89
+ "description": "Retained pre-uncapped command attestations. Stored as history only; no command consumes them.",
88
90
  "type": "array",
89
91
  "maxItems": 4,
90
92
  "items": {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: review-sensei
3
- Version: 0.6.8
3
+ Version: 0.6.9
4
4
  Summary: Provider-neutral AI code review engine with an Ollama adapter.
5
5
  Author: Mohamad Alsabbagh
6
6
  License-Expression: MIT
@@ -84,32 +84,60 @@ python -m pip install .
84
84
  review-sensei --version
85
85
  ```
86
86
 
87
- The default is a local Ollama server using Qwen3.5 4B. Leave the API key empty
88
- and select the local mode:
87
+ The default backend is a local Ollama server using the packaged local model,
88
+ so a local review runs with no credential and no repository setup at all. A
89
+ repository selects its backend in `.reviewsensei.yml` at the repository root,
90
+ and a repository without that file uses the packaged defaults:
91
+
92
+ ```yaml
93
+ schema: 1
94
+
95
+ inference:
96
+ backend: local-ollama
97
+ ```
98
+
99
+ Select a backend on the command line when one run needs a different one:
89
100
 
90
101
  ```bash
91
- export REVIEWSENSEI_PROVIDER_MODE="local"
92
- export REVIEWSENSEI_LOCAL_MODEL="qwen3.5:4b"
93
- unset OLLAMA_API_KEY
102
+ review-sensei --diff pr.patch --provider local-ollama
103
+ review-sensei --diff pr.patch --provider local-ollama --model qwen3.5:8b
94
104
  ```
95
105
 
96
- Ollama Cloud is explicit opt-in:
106
+ The hosted backends are explicit, and each one requires its own credential:
97
107
 
98
108
  ```bash
99
- export OLLAMA_API_KEY="your-key"
100
- export REVIEWSENSEI_PROVIDER_MODE="cloud"
101
- export REVIEWSENSEI_CLOUD_MODEL="deepseek-v4.1-flash:cloud"
102
- unset OLLAMA_BASE_URL OLLAMA_MODEL
109
+ OLLAMA_API_KEY="your-key" review-sensei --diff pr.patch --provider cloud-ollama
110
+ OPENROUTER_API_KEY="your-key" review-sensei --diff pr.patch --provider openrouter
111
+ OPENAI_API_KEY="your-key" review-sensei --diff pr.patch --provider openai-compatible
112
+ ```
113
+
114
+ Ollama Cloud is explicit opt-in and requires `OLLAMA_API_KEY`:
115
+
116
+ ```yaml
117
+ schema: 1
118
+
119
+ inference:
120
+ backend: cloud-ollama
103
121
  ```
104
122
 
123
+ A backend that needs no credential never receives one implicitly: a key
124
+ exported for another backend does not travel to `local-ollama`.
125
+
126
+ The packaged model for the selected backend applies unless `inference.model`
127
+ names another one. `REVIEWSENSEI_PROVIDER` and `REVIEWSENSEI_MODEL` remain the
128
+ only supported environment overrides; the retired
129
+ `REVIEWSENSEI_PROVIDER_MODE`, `REVIEWSENSEI_LOCAL_MODEL`, and
130
+ `REVIEWSENSEI_CLOUD_MODEL` variables have no effect and are reported with their
131
+ replacements by `review-sensei config`.
132
+
105
133
  ### Run through npx
106
134
 
107
135
  Node.js 22 or newer can invoke the same Python review engine through the
108
136
  provider-neutral `@reviewsensei/cli` launcher:
109
137
 
110
138
  ```bash
111
- npx --yes @reviewsensei/cli@0.6.8 --version
112
- npx --yes @reviewsensei/cli@0.6.8 --help
139
+ npx --yes @reviewsensei/cli@0.6.9 --version
140
+ npx --yes @reviewsensei/cli@0.6.9 --help
113
141
  ```
114
142
 
115
143
  The launcher selects one of the five native packages (macOS arm64/x64,
@@ -125,7 +153,14 @@ release tag. See [`docs/installation.md`](docs/installation.md),
125
153
  for prerequisites, release ordering, provenance, and version-forward rollback
126
154
  guidance.
127
155
 
128
- Generate a bounded diff and run a review:
156
+ Generate a bounded diff and review it. The shortest local run needs nothing
157
+ but the diff and a reachable local model server:
158
+
159
+ ```bash
160
+ review-sensei --diff pr.patch
161
+ ```
162
+
163
+ Repository context, learnings, and an explicit change identity are optional:
129
164
 
130
165
  ```bash
131
166
  review-sensei prepare-diff \
@@ -142,13 +177,40 @@ review-sensei \
142
177
  --title "Reviewable change" \
143
178
  --learning-root /path/to/target-branch-checkout \
144
179
  --context-root /path/to/target-branch-checkout \
180
+ --format json \
145
181
  --output review.json
146
182
  ```
147
183
 
148
- The output is a validated JSON document containing `summary`, `comments`,
149
- `provider`, `model`, and `learning_proposals`. Learning proposals are not
184
+ The default output is readable terminal text. `--format markdown` and
185
+ `--format json` are explicit, and only the selected format is written to
186
+ stdout or `--output` while warnings, diagnostics, and the final status and
187
+ reason lines stay on stderr. The JSON format
188
+ is the validated `review-result` document containing `summary`, `comments`,
189
+ `provider`, `model`, and `learning_proposals`; learning proposals are not
150
190
  stored or used automatically.
151
191
 
192
+ The review exit contract is stable:
193
+
194
+ | Code | Meaning |
195
+ | --- | --- |
196
+ | `0` | The review completed and no required fixes remain |
197
+ | `1` | The review completed with required fixes remaining |
198
+ | `2` | The review could not complete, the input was invalid, or a human decision is required |
199
+
200
+ A non-zero exit prints a `review-sensei: reason=<token>` line naming the cause,
201
+ and the exit codes are unchanged by the selected output format. Hosts and
202
+ launchers that select a lane from the historical 0/1 contract pass
203
+ `--exit-semantics operational`.
204
+
205
+ A local review is a bounded one-shot and needs no GitHub identity, OIDC token,
206
+ broker, or hosted state. `--local-session` is the one explicit
207
+ persistent-local-session operation: it keeps the durable session ledger in the
208
+ platform's per-user state directory (`~/Library/Application Support/review-sensei`
209
+ on macOS, `%LOCALAPPDATA%\review-sensei` on Windows, and
210
+ `$XDG_STATE_HOME/review-sensei` or `~/.local/state/review-sensei` elsewhere) so
211
+ repeated runs of the same change reuse one session, and `--session-ledger`
212
+ still overrides that location.
213
+
152
214
  The published schema files live under `src/review_sensei/schemas/` and are
153
215
  included in the installed package. Public compatibility rules, CLI flags, error
154
216
  categories, and provider protocol expectations are documented in
@@ -205,7 +267,7 @@ environment.
205
267
 
206
268
  During installation or migration, the Worker separately uses GitHub App
207
269
  authentication to obtain a repository-scoped installation token for the setup
208
- branch, pull request, and default variables.
270
+ branch and pull request.
209
271
 
210
272
  Installation, reinstall, permission-acceptance, and repository-added events
211
273
  reconcile absent or older generated clients through at most one setup-v5 PR.
@@ -519,16 +581,33 @@ See [ADR 0036](docs/adr/0036-learning-lifecycle-diagnostics-and-feedback.md).
519
581
 
520
582
  ## Local Ollama
521
583
 
584
+ A local review defaults to the `local-ollama` backend and needs no credential.
585
+ State it explicitly in `.reviewsensei.yml` when the repository should not rely
586
+ on the packaged default:
587
+
588
+ ```yaml
589
+ schema: 1
590
+
591
+ inference:
592
+ backend: local-ollama
593
+ ```
594
+
522
595
  ```bash
523
- export REVIEWSENSEI_PROVIDER_MODE="local"
524
- export REVIEWSENSEI_LOCAL_MODEL="qwen3.5:4b"
525
- unset OLLAMA_API_KEY
526
596
  review-sensei --diff pr.patch
527
597
  ```
528
598
 
599
+ Select the backend and model explicitly when you need to
600
+ (`--provider local-ollama --model qwen3.5:8b`, or `REVIEWSENSEI_PROVIDER` and
601
+ `REVIEWSENSEI_MODEL`). A backend that requires no credential never receives one
602
+ implicitly, so an exported `OLLAMA_API_KEY` is not attached to loopback
603
+ requests unless `--api-key-env` names it.
604
+
529
605
  ## Providers
530
606
 
531
- The shipped registry keys are `ollama`, `openai-compatible`, and `openrouter`.
607
+ The shipped registry adapters are `ollama`, `openai-compatible`,
608
+ `openrouter`, and the `fixture` test seam. Canonical backends — `local-ollama`,
609
+ `cloud-ollama`, `openai-compatible`, `openrouter`, and `fixture` — are what
610
+ `--provider`, `REVIEWSENSEI_PROVIDER`, and inference configuration name.
532
611
  Operator defaults, workflow modes, named profiles, credentials, and hosted
533
612
  OpenRouter allowlists are documented in [`docs/installation.md`](docs/installation.md).
534
613
  The release-aware public matrix lives at
@@ -566,13 +645,18 @@ The GitHub App opens a setup-v5 PR containing a thin caller that follows the
566
645
  operator-managed `v5` public git tag. The reusable workflow prefers the
567
646
  requested exact package from PyPI and falls back to its executing workflow
568
647
  commit only when that package/version is unavailable. Unrelated PyPI
569
- installation failures remain fatal. Setup provisions 15 repository variables,
570
- including 7 boolean controls, and manages 3 generated files. Automatic review,
571
- GitHub writes, learning proposals, learning PRs, mention replies, and artifact
572
- upload default to `false`; automatic approval defaults to `true` but is effective
573
- only when review and write gates are enabled. `REVIEWSENSEI_REVIEW_MODE` is a
574
- policy selector, not a boolean control, and defaults to `merge-focused`.
575
- The App never creates the customer-owned `OLLAMA_API_KEY` secret.
648
+ installation failures remain fatal. Setup creates no repository variables and
649
+ manages 3 generated files: the caller, the uninstall workflow, and the minimal
650
+ root `.reviewsensei.yml` that the operator owns from the first install on. The
651
+ only two optional Actions overrides the product consumes are
652
+ `REVIEWSENSEI_PROVIDER` (`inference.backend`) and `REVIEWSENSEI_MODEL`
653
+ (`inference.model`); the reusable workflow maps them once from the trusted
654
+ policy commit. Every other policy decision is a field of `.reviewsensei.yml`:
655
+ `github.automatic_reviews` defaults to `true`, `github.writes` to `false`,
656
+ `github.reviews` to `auto-approve`, `github.mentions` to `true`,
657
+ `github.learning` to `disabled`, and `github.artifacts` to `none`. The App
658
+ requests no Variables permission and never creates the customer-owned
659
+ `OLLAMA_API_KEY` secret.
576
660
 
577
661
  When explicitly enabled, same-repository pull requests can run automatic review
578
662
  with either provider mode: cloud on a GitHub-hosted runner or local Ollama on
@@ -586,8 +670,9 @@ item only when the transport reports an oversized response. The 512 KiB
586
670
  transport ceiling remains unchanged. Fork pull requests fail closed before
587
671
  provider or broker access.
588
672
 
589
- When automatic review and GitHub writes are enabled, automatic approval is on by
590
- default; set `REVIEWSENSEI_AUTO_APPROVE=false` for an explicit opt-out.
673
+ When automatic review and GitHub writes are enabled, automatic approval applies
674
+ by default; `github.reviews: blocking` or `github.reviews: advisory` in
675
+ `.reviewsensei.yml` selects a non-approving policy instead.
591
676
  ReviewSensei publishes blocking findings as `REQUEST_CHANGES` and non-blocking
592
677
  findings as `COMMENT`, then invokes one shared, idempotent approval finalizer.
593
678
  It emits `APPROVE` for an eligible exact head when no unresolved ReviewSensei
@@ -618,9 +703,9 @@ mode sends that bounded conversation context to Ollama Cloud; local mode keeps
618
703
  it on the configured local service. Published review summaries and inline
619
704
  findings also tell readers to reply with @sensei followed by their question.
620
705
  `review.json` is uploaded only when
621
- `REVIEWSENSEI_UPLOAD_ARTIFACTS=true`; setup-v5 does not create a separate
622
- version artifact. See [installation and migration](docs/installation.md) and
623
- the reviewable
706
+ `github.artifacts: diagnostics` is set in `.reviewsensei.yml`; setup-v5 does not
707
+ create a separate version artifact. See
708
+ [installation and migration](docs/installation.md) and the reviewable
624
709
  [`setup-v5 example`](examples/github-actions/review-sensei-review.yml).
625
710
 
626
711
  ## Concurrency policy
@@ -75,6 +75,8 @@ docs/adr/0052-logical-review-transaction-across-analysis-and-publication.md
75
75
  docs/adr/0053-bounded-durable-convergence-history.md
76
76
  docs/adr/0054-observed-convergence-acceptance-evidence.md
77
77
  docs/adr/0055-merge-focused-default-and-legacy-retirement.md
78
+ docs/adr/0056-host-fact-placement-and-honest-approval-presentation.md
79
+ docs/adr/0056-remove-pr-wide-review-count-caps.md
78
80
  docs/adr/README.md
79
81
  docs/architecture/index.md
80
82
  docs/process/adr-process.md
@@ -135,6 +137,7 @@ src/review_sensei/__main__.py
135
137
  src/review_sensei/baseline.py
136
138
  src/review_sensei/cli.py
137
139
  src/review_sensei/concurrency.py
140
+ src/review_sensei/configuration.py
138
141
  src/review_sensei/context.py
139
142
  src/review_sensei/convergence.py
140
143
  src/review_sensei/conversation.py
@@ -144,11 +147,13 @@ src/review_sensei/diff.py
144
147
  src/review_sensei/disposition.py
145
148
  src/review_sensei/errors.py
146
149
  src/review_sensei/evaluation.py
150
+ src/review_sensei/hosted.py
147
151
  src/review_sensei/learnings.py
148
152
  src/review_sensei/models.py
149
153
  src/review_sensei/openrouter_qualification.py
150
154
  src/review_sensei/outcomes.py
151
155
  src/review_sensei/patches.py
156
+ src/review_sensei/placement.py
152
157
  src/review_sensei/planning.py
153
158
  src/review_sensei/presentation.py
154
159
  src/review_sensei/provider_config.py
@@ -175,7 +180,6 @@ src/review_sensei/hosting/github/approval.py
175
180
  src/review_sensei/hosting/github/auth.py
176
181
  src/review_sensei/hosting/github/broker.py
177
182
  src/review_sensei/hosting/github/broker_client.py
178
- src/review_sensei/hosting/github/budget_admission.py
179
183
  src/review_sensei/hosting/github/conversation.py
180
184
  src/review_sensei/hosting/github/errors.py
181
185
  src/review_sensei/hosting/github/http.py
@@ -238,5 +242,6 @@ tests/fake_github_http.py
238
242
  tests/packaging_guard.py
239
243
  tests/dist_safe/test_distribution_contract.py
240
244
  tests/dist_safe/test_install_smoke.py
245
+ tests/dist_safe/test_local_review_contract.py
241
246
  tests/downstream/test_acceptance.py
242
247
  tests/fixtures/distribution-contract.json
package/bin/review-sensei CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reviewsensei/cli-linux-x64-gnu",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "ReviewSensei native CLI for glibc Linux x64",
5
5
  "license": "MIT",
6
6
  "repository": {