Skip to content

Commit b09c36d

Browse files
fix(tests): update docs
Statistics: 20 files changed, 673 insertions, 23 deletions Summary: - Dirs: packages=7, testql-scenarios=3, .github=2, .=2, scripts=2, tests=2 - Exts: .py=10, .md=4, .yml=2, .yaml=2, .toml=1, other=1 - A/M/D: 9/11/0 - Added: .github/workflows/testql-conversations-live.yml, .github/workflows/testql-conversations.yml, packages/nlpshim/src/nlpshim/conversation_client.py, packages/nlpshim/src/nlpshim/conversation_test_api.py, scripts/run_testql_conversations.py, scripts/validate_testql_conversations.py, testql-scenarios/artifacts/mock-inbox/.gitkeep, testql-scenarios/artifacts/mock-llm-replies.yaml ... - Symbols: _sdk_structural_checks, _plugin_installer_module, _parse_args, test_all_extra_matches_union_of_other_extras, export_trace Added files: - .github/workflows/testql-conversations-live.yml (+81/-0) - .github/workflows/testql-conversations.yml (+52/-0) - packages/nlpshim/src/nlpshim/conversation_client.py (+82/-0) - packages/nlpshim/src/nlpshim/conversation_test_api.py (+75/-0) - scripts/run_testql_conversations.py (+68/-0) - scripts/validate_testql_conversations.py (+109/-0) - testql-scenarios/artifacts/mock-inbox/.gitkeep (+0/-0) - testql-scenarios/artifacts/mock-llm-replies.yaml (+4/-0) - testql-scenarios/conversations/send-invoice.testql.toon.yaml (+39/-0) Modified files: - README.md (+5/-5) - docs/planfile-execution-gateway.md (+30/-0) - packages/coru/README.md (+8/-0) - packages/coru/src/coru/cli.py (+7/-0) - packages/coru/tests/test_coru_cli.py (+14/-3) - packages/nlpshim/README.md (+27/-0) - packages/nlpshim/src/nlpshim/__init__.py (+20/-1) - pyproject.toml (+2/-1) - src/koruide/plugin_installer.py (+11/-4) - tests/test_autopilot_plugin_installer.py (+32/-9) - tests/test_pyproject_metadata.py (+7/-0) Implementation notes (heuristics): - Type inferred from file paths + diff keywords + add/delete ratio - Scope prefers 'goal' when goal/* is touched; otherwise based on top-level dirs - For <=6 files: generate short per-file notes from added lines (defs/classes/click options/headings) - A/M/D derived from git name-status; per-file +X/-X from git numstat Co-authored-by: Koru Agent <agent@coru.dev>
1 parent ba17a73 commit b09c36d

25 files changed

Lines changed: 703 additions & 29 deletions
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Optional live-LLM conversation E2E (manual / scheduled — does not block PR merges).
2+
name: TestQL Conversations (Live LLM)
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
scenario:
8+
description: Scenario file relative to repo root (empty = all)
9+
required: false
10+
default: ""
11+
schedule:
12+
- cron: "0 6 * * 1"
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: testql-live-llm-${{ github.ref }}
19+
cancel-in-progress: false
20+
21+
jobs:
22+
live-llm-e2e:
23+
runs-on: ubuntu-latest
24+
continue-on-error: true
25+
steps:
26+
- name: Checkout koru
27+
uses: actions/checkout@v4
28+
29+
- name: Checkout testql (editable)
30+
uses: actions/checkout@v4
31+
with:
32+
repository: oqlos/testql
33+
path: vendor/testql
34+
ref: main
35+
continue-on-error: true
36+
37+
- name: Set up Python 3.12
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.12"
41+
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
if [ -d vendor/testql ]; then pip install -e vendor/testql; else pip install testql; fi
46+
pip install -e packages/nlpshim
47+
pip install httpx pyyaml
48+
49+
- name: Live LLM conversation run
50+
env:
51+
TESTQL_LIVE_LLM: "1"
52+
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
53+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
54+
NLP2DSL_URL: ${{ secrets.NLP2DSL_URL }}
55+
TESTQL_MOCK_LLM_FILE: testql-scenarios/artifacts/mock-llm-replies.yaml
56+
run: |
57+
if [ -z "${OPENROUTER_API_KEY}${LLM_API_KEY}" ]; then
58+
echo "Skipping: no LLM API key configured in repository secrets"
59+
exit 0
60+
fi
61+
args=(scripts/run_testql_conversations.py --live-llm)
62+
if [ -n "${{ github.event.inputs.scenario }}" ]; then
63+
args+=("${{ github.event.inputs.scenario }}")
64+
fi
65+
python "${args[@]}"
66+
67+
- name: Live LLM pytest (when testql source present)
68+
env:
69+
TESTQL_LIVE_LLM: "1"
70+
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
71+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
72+
run: |
73+
if [ -z "${OPENROUTER_API_KEY}${LLM_API_KEY}" ]; then
74+
echo "Skipping pytest: no LLM API key"
75+
exit 0
76+
fi
77+
if [ -d vendor/testql ]; then
78+
cd vendor/testql && python -m pytest tests/test_conversation_live_llm.py -q -m live_llm
79+
else
80+
echo "testql source not available; skipping pytest live_llm"
81+
fi
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Conversation TestQL scenarios (dry-run IR validation on every PR).
2+
name: TestQL Conversations
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- "testql-scenarios/**"
8+
- "packages/nlpshim/**"
9+
- "scripts/validate_testql_conversations.py"
10+
- ".github/workflows/testql-conversations.yml"
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
conversation-dry-run:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Python 3.12
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.12"
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install testql || true
36+
python -m pip install -e packages/nlpshim
37+
38+
- name: Validate conversation scenarios
39+
run: python scripts/validate_testql_conversations.py
40+
41+
- name: nlpshim conversation API smoke
42+
run: |
43+
python - <<'PY'
44+
from nlpshim import ConversationTestClient, export_trace, parse_conversation_step, ConversationContext
45+
46+
c = ConversationTestClient()
47+
c.start(userId="ci-user")
48+
parse_conversation_step({"text": "hello"}, ConversationContext(conversation_id=c.state.conversation_id))
49+
trace = export_trace(c.state.conversation_id, client=c)
50+
assert "turns" in trace
51+
print("nlpshim conversation API: ok")
52+
PY

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
113113
`docs/plans/observation-mesh-plan.md` describe where to add new
114114
dashboard routes.
115115

116+
## [0.1.313] - 2026-06-06
117+
118+
### Docs
119+
- Update README.md
120+
- Update docs/planfile-execution-gateway.md
121+
- Update packages/coru/README.md
122+
- Update packages/nlpshim/README.md
123+
124+
### Test
125+
- Update testql-scenarios/artifacts/mock-inbox/.gitkeep
126+
- Update testql-scenarios/artifacts/mock-llm-replies.yaml
127+
- Update testql-scenarios/conversations/send-invoice.testql.toon.yaml
128+
- Update tests/test_autopilot_plugin_installer.py
129+
- Update tests/test_pyproject_metadata.py
130+
131+
### Other
132+
- Update packages/coru/src/coru/cli.py
133+
- Update packages/coru/tests/test_coru_cli.py
134+
- Update packages/nlpshim/src/nlpshim/__init__.py
135+
- Update packages/nlpshim/src/nlpshim/conversation_client.py
136+
- Update packages/nlpshim/src/nlpshim/conversation_test_api.py
137+
- Update scripts/run_testql_conversations.py
138+
- Update scripts/validate_testql_conversations.py
139+
116140
## [0.1.312] - 2026-06-04
117141

118142
### Docs

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
## AI Cost Tracking
99

10-
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.312-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
11-
![AI Cost](https://img.shields.io/badge/AI%20Cost-$34.46-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-139.5h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
10+
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.313-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
11+
![AI Cost](https://img.shields.io/badge/AI%20Cost-$34.54-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-140.0h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
1212

13-
- 🤖 **LLM usage:** $34.4633 (417 commits)
14-
- 👤 **Human dev:** ~$13950 (139.5h @ $100/h, 30min dedup)
13+
- 🤖 **LLM usage:** $34.5435 (418 commits)
14+
- 👤 **Human dev:** ~$14000 (140.0h @ $100/h, 30min dedup)
1515

16-
Generated on 2026-06-04 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
16+
Generated on 2026-06-06 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
1717

1818
---
1919

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.312
1+
0.1.313

docs/planfile-execution-gateway.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,36 @@ working implementation.
429429
- optional OpenRouter-backed `llm` executor
430430
- richer multi-actor coordination
431431

432+
## External queue adapters (Mullm and others)
433+
434+
Multiple products can **emit** tickets into the same planfile without owning
435+
execution runtime:
436+
437+
| Source | `source` field | `execution.queue` | `executor.kind` | Replaces local queue? |
438+
| --- | --- | --- | --- | --- |
439+
| Koru scan / code2llm | `koru.scan` | `default` | `human` | — |
440+
| Mullm routing feedback | `mullm.routing` | `mullm-routing` | `human` | Mullm `improvements.jsonl` (optional) |
441+
| Mullm shell (future) | `mullm.execution` | `mullm-shell` | `shell` | Mullm orchestrator only with NATS adapter |
442+
| Mullm nlp2dsl workflow | `mullm.nlp2dsl` | `mullm-workflow` | `human` | partial (DSL engine stays in nlp2dsl) |
443+
444+
Recommended ticket fields for cross-system dedupe:
445+
446+
```yaml
447+
labels:
448+
- mullm
449+
- routing-improvement
450+
- "dedupe:mullm-routing-<turn_id>"
451+
metadata:
452+
external_ref: "mullm://routing-improvement/<uuid>"
453+
mullm_session_id: "<session>"
454+
```
455+
456+
Mullm implements optional sync via `MULLM_PLANFILE_PROJECT` +
457+
`planfile ticket create` (see `mullm/docs/ticket-queues-and-planfile.md`).
458+
**Planfile becomes the human-facing backlog**; Mullm EventStore remains the
459+
shell **execution bus** until `koru --queue` or a projector adapter unifies
460+
completion events.
461+
432462
## Bottom line
433463

434464
If you want `koru` to:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "koru-autopilot-plugins-workspace",
3-
"version": "0.1.312",
3+
"version": "0.1.313",
44
"private": true,
55
"description": "Monorepo root for all koru autopilot IDE plugins. Each IDE has its own VSIX so a regression in one cannot leak into another. Shared code (protocol, socket, host-click-submit) lives in plugins/koru-autopilot-shared and is copied into per-IDE plugins at prebuild time.",
66
"workspaces": [

packages/coru/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Goal:
88

99
## Install
1010

11+
From the monorepo root, the normal editable install exposes both `koru` and `coru`:
12+
13+
```bash
14+
pip install -e .
15+
```
16+
17+
For standalone `coru` development:
18+
1119
```bash
1220
pip install -e ./packages/coru
1321
```

packages/coru/src/coru/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ def _distribution_version(distribution: str) -> str:
108108
try:
109109
return metadata.version(distribution)
110110
except metadata.PackageNotFoundError:
111+
if distribution == "coru":
112+
try:
113+
return metadata.version("koru")
114+
except metadata.PackageNotFoundError:
115+
pass
116+
except Exception:
117+
return "unknown"
111118
return "not-installed"
112119
except Exception:
113120
return "unknown"

0 commit comments

Comments
 (0)