comitia 0.1.0__tar.gz → 0.1.2__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.
- {comitia-0.1.0 → comitia-0.1.2}/.gitignore +3 -0
- {comitia-0.1.0 → comitia-0.1.2}/PKG-INFO +81 -31
- {comitia-0.1.0 → comitia-0.1.2}/README.md +79 -29
- {comitia-0.1.0 → comitia-0.1.2}/pyproject.toml +3 -5
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/__init__.py +1 -1
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/diffs.py +1 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/converse.py +4 -4
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/journal.py +7 -3
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/panel.py +1 -1
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/host.py +11 -54
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/store.py +19 -2
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/web/service.py +1 -6
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/test_journal.py +21 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_host.py +1 -1
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_scenarios.py +35 -1
- {comitia-0.1.0 → comitia-0.1.2}/uv.lock +5 -5
- {comitia-0.1.0 → comitia-0.1.2}/LICENSE +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/LICENSES/crossby-MIT.txt +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/__main__.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/api.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/catalog.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/cli.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/control.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/__init__.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/api.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/cli.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/config.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/console.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/panel_view.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/prompts/converse_asker.md +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/prompts/converse_summary.md +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/discussion/transcript.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/engine.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/findings.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/plan.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/posting.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/prompts.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/recipe.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/report.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/settings.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/skill/SKILL.md +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/starters/decision-debate.yml +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/starters/deep-review.yml +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/starters/message-test.yml +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/starters/pr-review-light.yml +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/starters/pr-review.yml +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/starters/prd-review.yml +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/web/__init__.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/web/server.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/web/static/app.js +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/web/static/index.html +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/src/comitia/web/static/styles.css +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/conftest.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/__init__.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/test_converse.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/test_converse_cmd.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/test_panel.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/test_panel_cmd.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/test_panel_settings.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/discussion/test_panel_view.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/fixtures/crossby-0.63-journal.jsonl +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/fixtures/make_crossby_journal.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_antigravity_cursor_host.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_api.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_codex_host.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_discussion.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_import.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_plan_and_cli.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_posting.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_resume.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_review_fixes.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_settings.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_turns.py +0 -0
- {comitia-0.1.0 → comitia-0.1.2}/tests/test_web.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: comitia
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Know what's fixed, what's still open and what's new before your agent builds.
|
|
5
5
|
Project-URL: Repository, https://github.com/ivanviragine/comitia
|
|
6
6
|
Project-URL: Issues, https://github.com/ivanviragine/comitia/issues
|
|
@@ -9,7 +9,7 @@ License-Expression: MIT
|
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
License-File: LICENSES/crossby-MIT.txt
|
|
11
11
|
Requires-Python: >=3.11
|
|
12
|
-
Requires-Dist: crossby<0.
|
|
12
|
+
Requires-Dist: crossby<0.76.0,>=0.75.0
|
|
13
13
|
Requires-Dist: pydantic>=2.0
|
|
14
14
|
Requires-Dist: pyyaml>=6.0
|
|
15
15
|
Requires-Dist: rich>=13.0
|
|
@@ -23,21 +23,35 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
|
|
24
24
|
# comitia
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="https://raw.githubusercontent.com/ivanviragine/comitia/main/docs/assets/comitia.jpeg" width="400" alt="Comitia logo with three AI agents around a code document">
|
|
28
|
+
</p>
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
each later check gives every earlier finding a verdict. It runs on the
|
|
30
|
-
coding-agent CLIs you already have, through [crossby](https://github.com/ivanviragine/crossby).
|
|
30
|
+
**Comitia lets AI coding tools talk to each other.**
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
Use it to check a diagnosis, get feedback on a document or message, debate a
|
|
33
|
+
decision, or review a pull request. A YAML recipe defines who takes part, their
|
|
34
|
+
instructions or personas, how they interact, and what the report focuses on.
|
|
35
|
+
|
|
36
|
+
- **Independent answers** (`answers`). Participants respond on their own before
|
|
37
|
+
Comitia brings their findings together.
|
|
38
|
+
- **Consultation** (`consultation`). A lead asks one other participant questions
|
|
39
|
+
and follows up on the answers.
|
|
40
|
+
- **Panel** (`panel`). A lead consults several participants. In a shared panel,
|
|
41
|
+
participants can also see one another’s replies.
|
|
42
|
+
|
|
43
|
+
Run a quick consultation from the terminal or use a recipe for a repeatable
|
|
44
|
+
discussion. Recipe reports link their findings to the turns that produced
|
|
45
|
+
them. When you check revised material against an earlier run, the report shows
|
|
46
|
+
which findings still apply.
|
|
47
|
+
|
|
48
|
+
Comitia supports Claude Code, Codex, Antigravity CLI, and Cursor CLI as hosts.
|
|
49
|
+
It runs participants through the coding-agent CLIs you already have. [Crossby](https://github.com/ivanviragine/crossby)
|
|
36
50
|
|
|
37
51
|
## Install
|
|
38
52
|
|
|
39
53
|
```bash
|
|
40
|
-
uv tool install
|
|
54
|
+
uv tool install comitia # `comitia` on your PATH
|
|
41
55
|
comitia setup # in your project: the `discuss` skill (and, under `approval: strict`, the approval rules)
|
|
42
56
|
```
|
|
43
57
|
|
|
@@ -47,13 +61,20 @@ development, use `uv tool install --editable .` from the checkout.
|
|
|
47
61
|
|
|
48
62
|
## Use it from your agent
|
|
49
63
|
|
|
50
|
-
Ask
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
Ask your host agent for the discussion you want.
|
|
65
|
+
|
|
66
|
+
- “Have Claude and Codex check the diagnosis in `incident.md`. What evidence
|
|
67
|
+
would distinguish the likely causes?”
|
|
68
|
+
- “Review `announcement.md` from the perspective of a new customer and a
|
|
69
|
+
skeptical editor.”
|
|
70
|
+
- “Have two advocates argue the rollout options in `decision.md`, then ask a
|
|
71
|
+
lead to weigh the trade-offs.”
|
|
54
72
|
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
The `discuss` skill chooses or writes a recipe and shows the plan. With the
|
|
74
|
+
default `approval: host`, your host’s permission flow decides whether the run
|
|
75
|
+
starts. [Approval](#approval)
|
|
76
|
+
|
|
77
|
+
`comitia setup` installs the `discuss` skill and
|
|
57
78
|
configures Claude Code's read-only commands and sandbox exclusions. Choose
|
|
58
79
|
`approval: strict` for the additional approval rules and hooks described
|
|
59
80
|
below. Start Claude Code from the project you set up and accept its workspace
|
|
@@ -164,6 +185,16 @@ it again, and a diff that changed since is refused as a changed plan.
|
|
|
164
185
|
|
|
165
186
|
## Use it from the terminal
|
|
166
187
|
|
|
188
|
+
Ask one agent to question another about a diagnosis.
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
comitia converse claude codex \
|
|
192
|
+
--goal "Check the proposed cause in incident.md. What evidence would confirm it?"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
For a recipe run, pick a starter or [write your own](#a-recipe). This example
|
|
196
|
+
reviews a document and checks a revised version against the earlier findings.
|
|
197
|
+
|
|
167
198
|
```bash
|
|
168
199
|
comitia recipe new my-review --from prd-review # writes recipes/my-review.yml
|
|
169
200
|
comitia check my-review --material PRD.md # the plan; starts no agent
|
|
@@ -209,22 +240,39 @@ in the output), 1 error or failed run, 2 plan refused, 3 not approved.
|
|
|
209
240
|
|
|
210
241
|
## A recipe
|
|
211
242
|
|
|
243
|
+
This recipe gives a diagnosis two independent readers. The investigator checks
|
|
244
|
+
the evidence while the skeptic looks for competing explanations.
|
|
245
|
+
|
|
212
246
|
```yaml
|
|
213
|
-
# recipes/
|
|
247
|
+
# recipes/diagnosis.yml
|
|
214
248
|
format: answers
|
|
215
249
|
participants:
|
|
216
|
-
-
|
|
217
|
-
|
|
250
|
+
- id: investigator
|
|
251
|
+
tool: claude
|
|
252
|
+
instructions: Trace the proposed cause back to the evidence.
|
|
253
|
+
- id: skeptic
|
|
254
|
+
tool: codex
|
|
255
|
+
persona: personas/incident-skeptic
|
|
218
256
|
limits: {turn_timeout: 15m}
|
|
219
|
-
report_instructions:
|
|
220
|
-
providers: [anthropic,
|
|
221
|
-
# synthesizer: {tool: codex}
|
|
222
|
-
# require_blocked: [reads_outside_workspace] # isolation
|
|
257
|
+
report_instructions: Separate observations from hypotheses and rank the next checks.
|
|
258
|
+
# providers: [anthropic, openai] # every company the material may reach
|
|
259
|
+
# synthesizer: {tool: codex} # who writes the report (default: the first participant)
|
|
260
|
+
# require_blocked: [reads_outside_workspace] # isolation requires Claude Code
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Save the recipe as `recipes/diagnosis.yml` and create
|
|
264
|
+
`personas/incident-skeptic/instructions.md` with a brief such as “Find plausible
|
|
265
|
+
alternative causes and say what evidence would distinguish them.” Check the plan
|
|
266
|
+
and use the run command it prints.
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
comitia check diagnosis --material incident.md \
|
|
270
|
+
--goal "Weigh the likely causes and identify the next check."
|
|
223
271
|
```
|
|
224
272
|
|
|
225
273
|
A participant has a `tool`, and optionally a `model`, an `effort`, and either
|
|
226
|
-
`instructions` (a file
|
|
227
|
-
`instructions.md` and reference files.
|
|
274
|
+
`instructions` (a file or text) or a `persona` folder holding
|
|
275
|
+
`instructions.md` and optional text reference files.
|
|
228
276
|
|
|
229
277
|
A participant can also get `skills`: folders of the project that each hold a
|
|
230
278
|
`SKILL.md`. They are copied, as they were when the plan was built, into a
|
|
@@ -276,9 +324,9 @@ the prompt asks for.
|
|
|
276
324
|
|
|
277
325
|
## A consultation or a panel
|
|
278
326
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
327
|
+
Set `lead` to the participant that should ask the questions. The first
|
|
328
|
+
participant leads by default. A panel lead addresses participants by `@id`,
|
|
329
|
+
and `limits.max_rounds` caps how many messages the lead can send.
|
|
282
330
|
|
|
283
331
|
```yaml
|
|
284
332
|
# recipes/deep-review.yml
|
|
@@ -558,11 +606,13 @@ Antigravity's `--dangerously-skip-permissions`) is refused too.
|
|
|
558
606
|
is still open, it stays open and shows as a disagreement.
|
|
559
607
|
- **Dismissed stays dismissed.** A reviewer can object, citing a turn, but
|
|
560
608
|
cannot reopen it.
|
|
561
|
-
- **
|
|
609
|
+
- **Local run storage.** Runs live in `~/.comitia` (override with
|
|
562
610
|
`COMITIA_HOME`), outside the project, so reviewers reading the workspace do
|
|
563
611
|
not find earlier findings. Each run folder holds `plan.json`, a copy of the
|
|
564
612
|
material, `events.jsonl` (crossby's journal format), `findings.json` and the
|
|
565
|
-
report.
|
|
613
|
+
report. On POSIX, Comitia restricts access to that project's store when it
|
|
614
|
+
creates a run, saves a diff, or records a plan. New discussion journals also
|
|
615
|
+
use owner-only permissions. Each agent CLI manages its own session storage.
|
|
566
616
|
|
|
567
617
|
## Not yet
|
|
568
618
|
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
# comitia
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/ivanviragine/comitia/main/docs/assets/comitia.jpeg" width="400" alt="Comitia logo with three AI agents around a code document">
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
each later check gives every earlier finding a verdict. It runs on the
|
|
7
|
-
coding-agent CLIs you already have, through [crossby](https://github.com/ivanviragine/crossby).
|
|
7
|
+
**Comitia lets AI coding tools talk to each other.**
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Use it to check a diagnosis, get feedback on a document or message, debate a
|
|
10
|
+
decision, or review a pull request. A YAML recipe defines who takes part, their
|
|
11
|
+
instructions or personas, how they interact, and what the report focuses on.
|
|
12
|
+
|
|
13
|
+
- **Independent answers** (`answers`). Participants respond on their own before
|
|
14
|
+
Comitia brings their findings together.
|
|
15
|
+
- **Consultation** (`consultation`). A lead asks one other participant questions
|
|
16
|
+
and follows up on the answers.
|
|
17
|
+
- **Panel** (`panel`). A lead consults several participants. In a shared panel,
|
|
18
|
+
participants can also see one another’s replies.
|
|
19
|
+
|
|
20
|
+
Run a quick consultation from the terminal or use a recipe for a repeatable
|
|
21
|
+
discussion. Recipe reports link their findings to the turns that produced
|
|
22
|
+
them. When you check revised material against an earlier run, the report shows
|
|
23
|
+
which findings still apply.
|
|
24
|
+
|
|
25
|
+
Comitia supports Claude Code, Codex, Antigravity CLI, and Cursor CLI as hosts.
|
|
26
|
+
It runs participants through the coding-agent CLIs you already have. [Crossby](https://github.com/ivanviragine/crossby)
|
|
13
27
|
|
|
14
28
|
## Install
|
|
15
29
|
|
|
16
30
|
```bash
|
|
17
|
-
uv tool install
|
|
31
|
+
uv tool install comitia # `comitia` on your PATH
|
|
18
32
|
comitia setup # in your project: the `discuss` skill (and, under `approval: strict`, the approval rules)
|
|
19
33
|
```
|
|
20
34
|
|
|
@@ -24,13 +38,20 @@ development, use `uv tool install --editable .` from the checkout.
|
|
|
24
38
|
|
|
25
39
|
## Use it from your agent
|
|
26
40
|
|
|
27
|
-
Ask
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
Ask your host agent for the discussion you want.
|
|
42
|
+
|
|
43
|
+
- “Have Claude and Codex check the diagnosis in `incident.md`. What evidence
|
|
44
|
+
would distinguish the likely causes?”
|
|
45
|
+
- “Review `announcement.md` from the perspective of a new customer and a
|
|
46
|
+
skeptical editor.”
|
|
47
|
+
- “Have two advocates argue the rollout options in `decision.md`, then ask a
|
|
48
|
+
lead to weigh the trade-offs.”
|
|
31
49
|
|
|
32
|
-
|
|
33
|
-
|
|
50
|
+
The `discuss` skill chooses or writes a recipe and shows the plan. With the
|
|
51
|
+
default `approval: host`, your host’s permission flow decides whether the run
|
|
52
|
+
starts. [Approval](#approval)
|
|
53
|
+
|
|
54
|
+
`comitia setup` installs the `discuss` skill and
|
|
34
55
|
configures Claude Code's read-only commands and sandbox exclusions. Choose
|
|
35
56
|
`approval: strict` for the additional approval rules and hooks described
|
|
36
57
|
below. Start Claude Code from the project you set up and accept its workspace
|
|
@@ -141,6 +162,16 @@ it again, and a diff that changed since is refused as a changed plan.
|
|
|
141
162
|
|
|
142
163
|
## Use it from the terminal
|
|
143
164
|
|
|
165
|
+
Ask one agent to question another about a diagnosis.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
comitia converse claude codex \
|
|
169
|
+
--goal "Check the proposed cause in incident.md. What evidence would confirm it?"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
For a recipe run, pick a starter or [write your own](#a-recipe). This example
|
|
173
|
+
reviews a document and checks a revised version against the earlier findings.
|
|
174
|
+
|
|
144
175
|
```bash
|
|
145
176
|
comitia recipe new my-review --from prd-review # writes recipes/my-review.yml
|
|
146
177
|
comitia check my-review --material PRD.md # the plan; starts no agent
|
|
@@ -186,22 +217,39 @@ in the output), 1 error or failed run, 2 plan refused, 3 not approved.
|
|
|
186
217
|
|
|
187
218
|
## A recipe
|
|
188
219
|
|
|
220
|
+
This recipe gives a diagnosis two independent readers. The investigator checks
|
|
221
|
+
the evidence while the skeptic looks for competing explanations.
|
|
222
|
+
|
|
189
223
|
```yaml
|
|
190
|
-
# recipes/
|
|
224
|
+
# recipes/diagnosis.yml
|
|
191
225
|
format: answers
|
|
192
226
|
participants:
|
|
193
|
-
-
|
|
194
|
-
|
|
227
|
+
- id: investigator
|
|
228
|
+
tool: claude
|
|
229
|
+
instructions: Trace the proposed cause back to the evidence.
|
|
230
|
+
- id: skeptic
|
|
231
|
+
tool: codex
|
|
232
|
+
persona: personas/incident-skeptic
|
|
195
233
|
limits: {turn_timeout: 15m}
|
|
196
|
-
report_instructions:
|
|
197
|
-
providers: [anthropic,
|
|
198
|
-
# synthesizer: {tool: codex}
|
|
199
|
-
# require_blocked: [reads_outside_workspace] # isolation
|
|
234
|
+
report_instructions: Separate observations from hypotheses and rank the next checks.
|
|
235
|
+
# providers: [anthropic, openai] # every company the material may reach
|
|
236
|
+
# synthesizer: {tool: codex} # who writes the report (default: the first participant)
|
|
237
|
+
# require_blocked: [reads_outside_workspace] # isolation requires Claude Code
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Save the recipe as `recipes/diagnosis.yml` and create
|
|
241
|
+
`personas/incident-skeptic/instructions.md` with a brief such as “Find plausible
|
|
242
|
+
alternative causes and say what evidence would distinguish them.” Check the plan
|
|
243
|
+
and use the run command it prints.
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
comitia check diagnosis --material incident.md \
|
|
247
|
+
--goal "Weigh the likely causes and identify the next check."
|
|
200
248
|
```
|
|
201
249
|
|
|
202
250
|
A participant has a `tool`, and optionally a `model`, an `effort`, and either
|
|
203
|
-
`instructions` (a file
|
|
204
|
-
`instructions.md` and reference files.
|
|
251
|
+
`instructions` (a file or text) or a `persona` folder holding
|
|
252
|
+
`instructions.md` and optional text reference files.
|
|
205
253
|
|
|
206
254
|
A participant can also get `skills`: folders of the project that each hold a
|
|
207
255
|
`SKILL.md`. They are copied, as they were when the plan was built, into a
|
|
@@ -253,9 +301,9 @@ the prompt asks for.
|
|
|
253
301
|
|
|
254
302
|
## A consultation or a panel
|
|
255
303
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
304
|
+
Set `lead` to the participant that should ask the questions. The first
|
|
305
|
+
participant leads by default. A panel lead addresses participants by `@id`,
|
|
306
|
+
and `limits.max_rounds` caps how many messages the lead can send.
|
|
259
307
|
|
|
260
308
|
```yaml
|
|
261
309
|
# recipes/deep-review.yml
|
|
@@ -535,11 +583,13 @@ Antigravity's `--dangerously-skip-permissions`) is refused too.
|
|
|
535
583
|
is still open, it stays open and shows as a disagreement.
|
|
536
584
|
- **Dismissed stays dismissed.** A reviewer can object, citing a turn, but
|
|
537
585
|
cannot reopen it.
|
|
538
|
-
- **
|
|
586
|
+
- **Local run storage.** Runs live in `~/.comitia` (override with
|
|
539
587
|
`COMITIA_HOME`), outside the project, so reviewers reading the workspace do
|
|
540
588
|
not find earlier findings. Each run folder holds `plan.json`, a copy of the
|
|
541
589
|
material, `events.jsonl` (crossby's journal format), `findings.json` and the
|
|
542
|
-
report.
|
|
590
|
+
report. On POSIX, Comitia restricts access to that project's store when it
|
|
591
|
+
creates a run, saves a diff, or records a plan. New discussion journals also
|
|
592
|
+
use owner-only permissions. Each agent CLI manages its own session storage.
|
|
543
593
|
|
|
544
594
|
## Not yet
|
|
545
595
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "comitia"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "Know what's fixed, what's still open and what's new before your agent builds."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -12,10 +12,8 @@ license-files = ["LICENSE", "LICENSES/*.txt"]
|
|
|
12
12
|
requires-python = ">=3.11"
|
|
13
13
|
authors = [{ name = "Ivan Viragine" }]
|
|
14
14
|
dependencies = [
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
# crossby.api, py.typed, route(), agent detection, has_search_tool and project_files.
|
|
18
|
-
"crossby>=0.71.0,<0.72.0",
|
|
15
|
+
# Crossby supplies the tool runtime and metadata. Pin the tested minor series.
|
|
16
|
+
"crossby>=0.75.0,<0.76.0",
|
|
19
17
|
"typer>=0.12,<0.26",
|
|
20
18
|
"pydantic>=2.0",
|
|
21
19
|
"pyyaml>=6.0",
|
|
@@ -42,6 +42,7 @@ def _folder(root: Path) -> Path:
|
|
|
42
42
|
def _save(root: Path, name: str, text: str, what: str, origin: dict[str, Any]) -> Path:
|
|
43
43
|
if not text.strip():
|
|
44
44
|
raise DiffError(f"{what} is empty; there is nothing to review.")
|
|
45
|
+
store.prepare_project_store(root)
|
|
45
46
|
path = _folder(root) / f"{name}.diff"
|
|
46
47
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
47
48
|
path.write_text(text, encoding="utf-8")
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Copied from crossby v0.71.0 (src/crossby/services/converse.py), imports aside.
|
|
2
2
|
"""Goal-driven consultations between two headless AI coding agents.
|
|
3
3
|
|
|
4
|
-
``
|
|
4
|
+
``comitia converse ASKER RESPONDER --goal ...`` lets one agent consult another.
|
|
5
5
|
The asker holds the goal: it decides what to ask, judges each answer, asks
|
|
6
6
|
follow-up questions, and decides when it has enough. The responder never sees
|
|
7
7
|
the goal; it only answers the asker's messages. ``crossby ask`` (see
|
|
8
|
-
:
|
|
8
|
+
:func:`crossby.api.ask`) is the single-question primitive.
|
|
9
9
|
|
|
10
10
|
Each side keeps its own native session: every turn after its first resumes
|
|
11
11
|
that session and carries only the other agent's latest message, whole. Nothing
|
|
@@ -383,7 +383,7 @@ def _status(result: HeadlessSessionResult) -> str:
|
|
|
383
383
|
"""``failed``, plus the recognized reason and the tool's own status.
|
|
384
384
|
|
|
385
385
|
For example ``failed: not signed in (native: api_error)``; see
|
|
386
|
-
:func:`crossby.
|
|
386
|
+
:func:`crossby.api.describe_session_status`.
|
|
387
387
|
"""
|
|
388
388
|
from crossby.api import describe_session_status
|
|
389
389
|
|
|
@@ -481,7 +481,7 @@ def run_conversation(
|
|
|
481
481
|
always returns the turns completed so far.
|
|
482
482
|
|
|
483
483
|
``journal`` receives every event as it happens (see
|
|
484
|
-
:mod:`
|
|
484
|
+
:mod:`comitia.discussion.journal`). ``resume`` continues a consultation that
|
|
485
485
|
stopped without an answer: both sides resume their own sessions, the next
|
|
486
486
|
side gets the message it was owed, and up to ``max_rounds`` more answers
|
|
487
487
|
are allowed.
|
|
@@ -240,7 +240,7 @@ def _create(path: Path) -> tuple[int, bool]:
|
|
|
240
240
|
"""
|
|
241
241
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
242
242
|
try:
|
|
243
|
-
fd = os.open(path, _OPEN_FLAGS | os.O_CREAT | os.O_EXCL,
|
|
243
|
+
fd = os.open(path, _OPEN_FLAGS | os.O_CREAT | os.O_EXCL, 0o600)
|
|
244
244
|
created = True
|
|
245
245
|
except FileExistsError:
|
|
246
246
|
fd = os.open(path, _OPEN_FLAGS)
|
|
@@ -249,8 +249,12 @@ def _create(path: Path) -> tuple[int, bool]:
|
|
|
249
249
|
if not stat.S_ISREG(os.fstat(fd).st_mode):
|
|
250
250
|
raise JournalError(f"{path} is not a regular file.")
|
|
251
251
|
_claim(fd, path)
|
|
252
|
-
if not created
|
|
253
|
-
|
|
252
|
+
if not created:
|
|
253
|
+
existing = os.fstat(fd)
|
|
254
|
+
if existing.st_size:
|
|
255
|
+
raise JournalExistsError(f"{path} already holds a journal.")
|
|
256
|
+
if os.name == "posix" and existing.st_mode & 0o077:
|
|
257
|
+
os.fchmod(fd, stat.S_IMODE(existing.st_mode) & ~0o077)
|
|
254
258
|
except BaseException:
|
|
255
259
|
os.close(fd)
|
|
256
260
|
raise
|
|
@@ -22,7 +22,7 @@ crossby adds only protocol text: the lead's opening notice (the goal, the
|
|
|
22
22
|
roster and the limit; replaceable through ``protocol_notice``, whose grammar
|
|
23
23
|
never changes), the ``@id`` labels, failure notes, the final-turn nudge, and
|
|
24
24
|
one request for the last line when an agent lead's reply lacks a valid one.
|
|
25
|
-
Everything is journaled (see :mod:`
|
|
25
|
+
Everything is journaled (see :mod:`comitia.discussion.journal`).
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
from __future__ import annotations
|
|
@@ -45,7 +45,14 @@ from importlib import resources
|
|
|
45
45
|
from pathlib import Path
|
|
46
46
|
from typing import Any
|
|
47
47
|
|
|
48
|
-
from crossby.api import
|
|
48
|
+
from crossby.api import (
|
|
49
|
+
AgentProcess,
|
|
50
|
+
AIToolID,
|
|
51
|
+
agent_ancestors,
|
|
52
|
+
nearest_agent,
|
|
53
|
+
parent_program,
|
|
54
|
+
tool_display_name,
|
|
55
|
+
)
|
|
49
56
|
from crossby.api import under_agent as under_agent
|
|
50
57
|
|
|
51
58
|
from comitia import store
|
|
@@ -62,16 +69,13 @@ COMMAND = "comitia"
|
|
|
62
69
|
# The hook `setup` installs; Claude Code runs it before every shell command.
|
|
63
70
|
HOOK = "comitia hook"
|
|
64
71
|
# How comitia becomes a plain command on PATH, which Claude Code's rule needs.
|
|
65
|
-
INSTALL = "uv tool install
|
|
72
|
+
INSTALL = "uv tool install comitia"
|
|
66
73
|
# Programs that start comitia for someone; a rule for `comitia run` does not see past them.
|
|
67
74
|
_LAUNCHERS = frozenset({"uv", "uvx", "pipx", "poetry", "pdm", "hatch", "rye", "conda", "mamba"})
|
|
68
75
|
# What Codex puts in the environment of a command it runs: its conversation's ID, and,
|
|
69
76
|
# inside its sandbox, the sandbox's kind.
|
|
70
77
|
_CODEX_THREAD = "CODEX_THREAD_ID"
|
|
71
78
|
_CODEX_SANDBOX = "CODEX_SANDBOX"
|
|
72
|
-
# macOS's proc_pidinfo, PROC_PIDTBSDINFO: a struct proc_bsdinfo of 136 bytes, with the
|
|
73
|
-
# short name at byte 48.
|
|
74
|
-
_BSDINFO, _BSDINFO_SIZE = 3, 136
|
|
75
79
|
# The settings sources Claude Code reads, as its `--setting-sources` flag names them.
|
|
76
80
|
SOURCES = frozenset({"user", "project", "local"})
|
|
77
81
|
_MANAGED = (
|
|
@@ -164,15 +168,6 @@ APPROVED_VIA = {
|
|
|
164
168
|
AIToolID.ANTIGRAVITY_CLI: "Antigravity's approval prompt",
|
|
165
169
|
AIToolID.CURSOR: "Cursor's approval path",
|
|
166
170
|
}
|
|
167
|
-
# What a run approved through each agent's own permission flow says it was.
|
|
168
|
-
_AGENT_NAMES = {
|
|
169
|
-
AIToolID.CLAUDE: "Claude Code",
|
|
170
|
-
AIToolID.CODEX: "Codex",
|
|
171
|
-
AIToolID.CURSOR: "Cursor",
|
|
172
|
-
AIToolID.ANTIGRAVITY_CLI: "Antigravity",
|
|
173
|
-
AIToolID.OPENCODE: "OpenCode",
|
|
174
|
-
AIToolID.COPILOT: "Copilot CLI",
|
|
175
|
-
}
|
|
176
171
|
# The hosts comitia knows how to count on, as its refusals name them.
|
|
177
172
|
_KNOWN_HOSTS = "Claude Code, Codex, Antigravity or Cursor"
|
|
178
173
|
|
|
@@ -403,45 +398,7 @@ def project_asks(
|
|
|
403
398
|
|
|
404
399
|
def _invocation() -> tuple[str, str | None]:
|
|
405
400
|
"""How this process was started: its ``argv[0]``, and the program that started it."""
|
|
406
|
-
return sys.argv[0],
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
def _parent_program() -> str | None:
|
|
410
|
-
"""The short name of the program that started this process; None when unreadable.
|
|
411
|
-
|
|
412
|
-
Read in-process (Linux's ``/proc``, macOS's ``libproc``), so no program on ``PATH``
|
|
413
|
-
answers for it. crossby reads the agents above a process; this is the shell or the
|
|
414
|
-
launcher in between, which is no agent.
|
|
415
|
-
"""
|
|
416
|
-
pid = os.getppid()
|
|
417
|
-
name: str | None
|
|
418
|
-
try:
|
|
419
|
-
name = Path(f"/proc/{pid}/comm").read_text(encoding="utf-8", errors="replace").strip()
|
|
420
|
-
except OSError:
|
|
421
|
-
name = _libproc_name(pid) if sys.platform == "darwin" else None
|
|
422
|
-
return name or None
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
def _libproc_name(pid: int) -> str | None:
|
|
426
|
-
"""A process's short name, from macOS's ``proc_pidinfo``."""
|
|
427
|
-
import ctypes
|
|
428
|
-
|
|
429
|
-
try:
|
|
430
|
-
libproc = ctypes.CDLL("/usr/lib/libproc.dylib", use_errno=True)
|
|
431
|
-
libproc.proc_pidinfo.argtypes = [
|
|
432
|
-
ctypes.c_int,
|
|
433
|
-
ctypes.c_int,
|
|
434
|
-
ctypes.c_uint64,
|
|
435
|
-
ctypes.c_void_p,
|
|
436
|
-
ctypes.c_int,
|
|
437
|
-
]
|
|
438
|
-
libproc.proc_pidinfo.restype = ctypes.c_int
|
|
439
|
-
buffer = ctypes.create_string_buffer(_BSDINFO_SIZE)
|
|
440
|
-
if libproc.proc_pidinfo(pid, _BSDINFO, 0, buffer, _BSDINFO_SIZE) < _BSDINFO_SIZE:
|
|
441
|
-
return None
|
|
442
|
-
except (OSError, AttributeError, ValueError):
|
|
443
|
-
return None
|
|
444
|
-
return buffer.raw[48:64].split(b"\0", 1)[0].decode(errors="replace")
|
|
401
|
+
return sys.argv[0], parent_program()
|
|
445
402
|
|
|
446
403
|
|
|
447
404
|
def started_as_command() -> bool:
|
|
@@ -482,7 +439,7 @@ def agent_name() -> str:
|
|
|
482
439
|
nearest = nearest_agent()
|
|
483
440
|
if nearest is None:
|
|
484
441
|
return "an agent"
|
|
485
|
-
return
|
|
442
|
+
return tool_display_name(nearest.tool)
|
|
486
443
|
|
|
487
444
|
|
|
488
445
|
def approved_via() -> str:
|
|
@@ -14,6 +14,7 @@ import hashlib
|
|
|
14
14
|
import json
|
|
15
15
|
import os
|
|
16
16
|
import re
|
|
17
|
+
import stat
|
|
17
18
|
import threading
|
|
18
19
|
from datetime import UTC, datetime
|
|
19
20
|
from pathlib import Path
|
|
@@ -49,6 +50,22 @@ def project_store(root: Path) -> Path:
|
|
|
49
50
|
return home() / "projects" / f"{name}-{digest}"
|
|
50
51
|
|
|
51
52
|
|
|
53
|
+
def prepare_project_store(root: Path) -> Path:
|
|
54
|
+
"""Create or secure the per-user project store before writing review data."""
|
|
55
|
+
folder = project_store(root)
|
|
56
|
+
folder.mkdir(mode=0o700, parents=True, exist_ok=True)
|
|
57
|
+
if os.name == "posix":
|
|
58
|
+
# Work on the directory itself without changing the target of an existing symlink.
|
|
59
|
+
fd = os.open(folder, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW)
|
|
60
|
+
try:
|
|
61
|
+
mode = stat.S_IMODE(os.fstat(fd).st_mode)
|
|
62
|
+
if mode & 0o077:
|
|
63
|
+
os.fchmod(fd, mode & ~0o077)
|
|
64
|
+
finally:
|
|
65
|
+
os.close(fd)
|
|
66
|
+
return folder
|
|
67
|
+
|
|
68
|
+
|
|
52
69
|
def now() -> str:
|
|
53
70
|
return datetime.now(tz=UTC).isoformat(timespec="seconds")
|
|
54
71
|
|
|
@@ -124,7 +141,7 @@ def run_ids(root: Path) -> list[int]:
|
|
|
124
141
|
|
|
125
142
|
def create_run(root: Path) -> RunFolder:
|
|
126
143
|
"""A new, empty run folder with the next number; safe against a concurrent run."""
|
|
127
|
-
folder =
|
|
144
|
+
folder = prepare_project_store(root) / "runs"
|
|
128
145
|
folder.mkdir(parents=True, exist_ok=True)
|
|
129
146
|
number = max(run_ids(root), default=0) + 1
|
|
130
147
|
while True:
|
|
@@ -203,7 +220,7 @@ def turns(run: RunFolder) -> dict[str, dict[str, Any]]:
|
|
|
203
220
|
|
|
204
221
|
def record_shown(root: Path, plan_id: str) -> None:
|
|
205
222
|
"""Remember that ``check`` showed this plan, so ``run --plan`` can require it."""
|
|
206
|
-
path =
|
|
223
|
+
path = prepare_project_store(root) / "shown" / plan_id
|
|
207
224
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
208
225
|
path.write_text(now() + "\n", encoding="utf-8")
|
|
209
226
|
|
|
@@ -40,11 +40,6 @@ APPROVED_VIA = "the comitia page"
|
|
|
40
40
|
MAX_LISTED = 400
|
|
41
41
|
MAX_PREVIEW = 200_000
|
|
42
42
|
_SKIPPED_DIRS = frozenset({"node_modules", "__pycache__", "dist", "build", "target"})
|
|
43
|
-
# The companies the page offers for a recipe's `providers`; crossby names each one.
|
|
44
|
-
_COMPANIES = (
|
|
45
|
-
"anthropic", "openai", "google", "xai", "github",
|
|
46
|
-
"cursor", "opencode", "amazon", "microsoft", "openrouter",
|
|
47
|
-
) # fmt: skip
|
|
48
43
|
_NOT_APPROVING = (
|
|
49
44
|
"This page cannot approve anything: it was not started from a terminal, so it cannot "
|
|
50
45
|
"tell that the request comes from you. Run `comitia ui` in your own terminal."
|
|
@@ -106,7 +101,7 @@ class Service:
|
|
|
106
101
|
"personas": catalog.personas(self.root),
|
|
107
102
|
"skills": catalog.skills(self.root),
|
|
108
103
|
"mcp": catalog.mcp(self.root),
|
|
109
|
-
"companies": {company: api.company_name(company) for company in
|
|
104
|
+
"companies": {company: api.company_name(company) for company in api.COMPANIES},
|
|
110
105
|
# Read-only is required of everyone; these are the ones a recipe may add.
|
|
111
106
|
"channels": sorted(
|
|
112
107
|
channel.value for channel in RestrictionChannel if channel not in planning.READ_ONLY
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
6
|
import os
|
|
7
|
+
import stat
|
|
7
8
|
import subprocess
|
|
8
9
|
import sys
|
|
9
10
|
import threading
|
|
@@ -56,6 +57,26 @@ def _journal(tmp_path: Path, **kwargs: Any) -> Journal:
|
|
|
56
57
|
return Journal("run-1", path=tmp_path / "out" / JOURNAL_FILE, **kwargs)
|
|
57
58
|
|
|
58
59
|
|
|
60
|
+
@pytest.mark.skipif(os.name != "posix", reason="checks Unix file permissions")
|
|
61
|
+
@pytest.mark.parametrize("existing_empty", [False, True])
|
|
62
|
+
def test_fresh_journal_files_are_owner_only(tmp_path: Path, existing_empty: bool) -> None:
|
|
63
|
+
path = tmp_path / "out" / JOURNAL_FILE
|
|
64
|
+
if existing_empty:
|
|
65
|
+
path.parent.mkdir()
|
|
66
|
+
path.touch()
|
|
67
|
+
path.chmod(0o644)
|
|
68
|
+
|
|
69
|
+
previous_mask = os.umask(0o022)
|
|
70
|
+
try:
|
|
71
|
+
journal = _journal(tmp_path)
|
|
72
|
+
try:
|
|
73
|
+
assert stat.S_IMODE(path.stat().st_mode) == 0o600
|
|
74
|
+
finally:
|
|
75
|
+
journal.close()
|
|
76
|
+
finally:
|
|
77
|
+
os.umask(previous_mask)
|
|
78
|
+
|
|
79
|
+
|
|
59
80
|
def test_a_consultation_is_one_ordered_stream(tmp_path: Path) -> None:
|
|
60
81
|
runner = FakeRunner(["Is it a PFO?\nNEXT: ASK", "Yes, a flap.", "It is.\nNEXT: DONE"])
|
|
61
82
|
journal = _journal(tmp_path)
|
|
@@ -382,7 +382,7 @@ def test_the_program_that_started_this_one_is_named() -> None:
|
|
|
382
382
|
import subprocess
|
|
383
383
|
import sys
|
|
384
384
|
|
|
385
|
-
probe = "from comitia import host; print(host.
|
|
385
|
+
probe = "from comitia import host; print(host._invocation()[1])"
|
|
386
386
|
done = subprocess.run([sys.executable, "-c", probe], capture_output=True, text=True, check=True)
|
|
387
387
|
named = done.stdout.strip()
|
|
388
388
|
if named == "None":
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import os
|
|
6
|
+
import stat
|
|
5
7
|
from pathlib import Path
|
|
6
8
|
from typing import Any
|
|
7
9
|
|
|
10
|
+
import pytest
|
|
8
11
|
from conftest import Project, findings, simple_review
|
|
9
12
|
|
|
13
|
+
from comitia import diffs, posting, report, store
|
|
10
14
|
from comitia import findings as fd
|
|
11
|
-
from comitia import posting, report, store
|
|
12
15
|
from comitia.discussion.journal import EventType
|
|
13
16
|
|
|
14
17
|
REVISED = "# Spec\n\nGate 1 is owned by Ivan and ships on 1 March.\nPanels are in release 1.\n"
|
|
@@ -69,6 +72,37 @@ STANDARD_VERDICTS = {
|
|
|
69
72
|
SAME_AS = {"antigravity-cli": [{"finding": "gemini-1", "earlier": "F3"}]}
|
|
70
73
|
|
|
71
74
|
|
|
75
|
+
@pytest.mark.skipif(os.name != "posix", reason="checks Unix directory permissions")
|
|
76
|
+
@pytest.mark.parametrize("existing", [False, True])
|
|
77
|
+
@pytest.mark.parametrize("writer", ["run", "diff", "plan"])
|
|
78
|
+
def test_review_store_writes_keep_new_and_existing_data_private(
|
|
79
|
+
project: Project, monkeypatch: pytest.MonkeyPatch, existing: bool, writer: str
|
|
80
|
+
) -> None:
|
|
81
|
+
folder = store.project_store(project.root)
|
|
82
|
+
if existing:
|
|
83
|
+
folder.mkdir(parents=True)
|
|
84
|
+
folder.chmod(0o755)
|
|
85
|
+
(folder / "previous").write_text("saved review data", encoding="utf-8")
|
|
86
|
+
|
|
87
|
+
previous_mask = os.umask(0o022)
|
|
88
|
+
try:
|
|
89
|
+
if writer == "run":
|
|
90
|
+
assert store.create_run(project.root).path.is_dir()
|
|
91
|
+
elif writer == "diff":
|
|
92
|
+
monkeypatch.setattr(diffs, "_capture", lambda *_: "review material")
|
|
93
|
+
saved = diffs.from_range(project.root, "HEAD~1")
|
|
94
|
+
assert saved.read_text(encoding="utf-8") == "review material"
|
|
95
|
+
else:
|
|
96
|
+
store.record_shown(project.root, "test-plan")
|
|
97
|
+
assert store.was_shown(project.root, "test-plan")
|
|
98
|
+
finally:
|
|
99
|
+
os.umask(previous_mask)
|
|
100
|
+
|
|
101
|
+
assert stat.S_IMODE(folder.stat().st_mode) == 0o700
|
|
102
|
+
if existing:
|
|
103
|
+
assert (folder / "previous").read_text(encoding="utf-8") == "saved review data"
|
|
104
|
+
|
|
105
|
+
|
|
72
106
|
def test_first_run_links_every_finding_to_its_turns(project: Project) -> None:
|
|
73
107
|
before = snapshot(project.root)
|
|
74
108
|
folder, state, _ask = project.run(simple_review)
|
|
@@ -117,7 +117,7 @@ wheels = [
|
|
|
117
117
|
|
|
118
118
|
[[package]]
|
|
119
119
|
name = "comitia"
|
|
120
|
-
version = "0.1.
|
|
120
|
+
version = "0.1.2"
|
|
121
121
|
source = { editable = "." }
|
|
122
122
|
dependencies = [
|
|
123
123
|
{ name = "crossby" },
|
|
@@ -137,7 +137,7 @@ dev = [
|
|
|
137
137
|
|
|
138
138
|
[package.metadata]
|
|
139
139
|
requires-dist = [
|
|
140
|
-
{ name = "crossby", specifier = ">=0.
|
|
140
|
+
{ name = "crossby", specifier = ">=0.75.0,<0.76.0" },
|
|
141
141
|
{ name = "mypy", marker = "extra == 'dev'", specifier = ">=1.10" },
|
|
142
142
|
{ name = "pydantic", specifier = ">=2.0" },
|
|
143
143
|
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0" },
|
|
@@ -151,7 +151,7 @@ provides-extras = ["dev"]
|
|
|
151
151
|
|
|
152
152
|
[[package]]
|
|
153
153
|
name = "crossby"
|
|
154
|
-
version = "0.
|
|
154
|
+
version = "0.75.0"
|
|
155
155
|
source = { registry = "https://pypi.org/simple" }
|
|
156
156
|
dependencies = [
|
|
157
157
|
{ name = "jsonschema" },
|
|
@@ -166,9 +166,9 @@ dependencies = [
|
|
|
166
166
|
{ name = "tomli-w" },
|
|
167
167
|
{ name = "typer" },
|
|
168
168
|
]
|
|
169
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
169
|
+
sdist = { url = "https://files.pythonhosted.org/packages/48/22/528fa453b5ac8c3ebcb4771a5c364acf1c213dfa85735b9dca32de2de5d3/crossby-0.75.0.tar.gz", hash = "sha256:5cdf5a9423b8e8891a827a5e62d45dfaf69f402619aa773dc927ee5a3205c832", size = 1507166, upload-time = "2026-11-30T23:07:09.268Z" }
|
|
170
170
|
wheels = [
|
|
171
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
171
|
+
{ url = "https://files.pythonhosted.org/packages/06/49/668ef495c3773fd539a28593fbed2c0bc2aca22d49a6c2c8cc9b45dd6066/crossby-0.75.0-py3-none-any.whl", hash = "sha256:e6a9239dc893329c6b87d465db01d7c0bca976cee0b150b17bba11d01db8e007", size = 826264, upload-time = "2026-11-30T23:07:07.756Z" },
|
|
172
172
|
]
|
|
173
173
|
|
|
174
174
|
[[package]]
|
|
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
|