Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
3e154a6
chore: add v0.1 planning infrastructure
mahimairaja May 3, 2026
28163d2
refactor: delete v0.1 Phase 0 dead code
mahimairaja May 3, 2026
0adfa58
refactor: rename provider_types.py to types.py
mahimairaja May 3, 2026
9257fe2
refactor: move pool.py into core/ package
mahimairaja May 3, 2026
f9af485
refactor: extract core/config.py from pool.py
mahimairaja May 3, 2026
b728eba
refactor: extract core/routing.py from pool.py
mahimairaja May 3, 2026
54df136
refactor: extract core/discovery.py from pool.py
mahimairaja May 3, 2026
b1d9307
refactor: extract core/serialization.py from pool.py
mahimairaja May 3, 2026
8c41602
docs(journal): record core/serialization.py extraction
mahimairaja May 3, 2026
8438cae
refactor: extract core/turn_handling.py from pool.py
mahimairaja May 3, 2026
4cdff95
chore: split observability extraction into three subtasks
mahimairaja May 3, 2026
3117688
refactor: rename resources.py to observability/metrics.py
mahimairaja May 3, 2026
b2b0adc
refactor: rename metrics_stream.py to observability/stream.py
mahimairaja May 3, 2026
53d68f3
refactor: extract observability/snapshot.py from metrics.py
mahimairaja May 3, 2026
718aadf
refactor: move CLI modules into a cli/ package
mahimairaja May 3, 2026
c3b6410
refactor: move tui_app.py into tui/ package
mahimairaja May 3, 2026
5a8f4ce
chore: verify public surface still resolves after Phase 0
mahimairaja May 3, 2026
ca94e12
chore: verify openrtc dev/list/tui CLI commands still work
mahimairaja May 3, 2026
3222fb2
chore: verify full test suite + coverage gate (Phase 0 complete)
mahimairaja May 3, 2026
99ee753
chore(deps): pin livekit-agents to ~=1.5
mahimairaja May 3, 2026
214929d
docs(design): capture JobExecutor Protocol surface
mahimairaja May 3, 2026
3191f86
docs(design): capture ProcPool surface AgentServer uses
mahimairaja May 3, 2026
f6349e2
docs(design): capture AgentServer integration points
mahimairaja May 3, 2026
b130fce
feat(pool): plumb `isolation` parameter (no behavior yet)
mahimairaja May 3, 2026
3752979
feat(pool): plumb max_concurrent_sessions parameter (no behavior yet)
mahimairaja May 3, 2026
2c49126
feat(execution): coroutine executor + pool skeletons
mahimairaja May 3, 2026
095b439
feat(execution): implement CoroutineJobExecutor.initialize + aclose
mahimairaja May 3, 2026
6550add
feat(execution): implement CoroutineJobExecutor.launch_job
mahimairaja May 3, 2026
ce3c230
feat(execution): add CoroutineJobExecutor.kill (forceful escalation)
mahimairaja May 3, 2026
dc910e0
feat(execution): implement CoroutinePool.start
mahimairaja May 3, 2026
2fd6fed
feat(execution): implement CoroutinePool.launch_job
mahimairaja May 3, 2026
4524832
feat(execution): CoroutinePool.current_load + max_concurrent_sessions
mahimairaja May 3, 2026
5405fe1
feat(execution): implement CoroutinePool.aclose
mahimairaja May 3, 2026
eae2e26
feat(execution): add _CoroutineAgentServer swap shim
mahimairaja May 3, 2026
240cb68
feat(pool): wire isolation -> server class
mahimairaja May 3, 2026
253fbdb
test(coroutine): end-to-end smoke for the v0.1 coroutine path
mahimairaja May 3, 2026
5d76ae2
bench(density): 50 concurrent sessions in one worker
mahimairaja May 3, 2026
41f0a7d
docs(benchmarks): record density results (Phase 1 §7 gate met)
mahimairaja May 3, 2026
145e433
test(isolation): per-job error isolation (Phase 2 task 1)
mahimairaja May 3, 2026
e232de2
feat(execution): consecutive-failure supervisor
mahimairaja May 3, 2026
03e0c38
feat(execution): drain primitive + executor.join
mahimairaja May 3, 2026
0791e2b
feat(cli): --isolation + --max-concurrent-sessions
mahimairaja May 3, 2026
a3114b3
chore(test): integration harness (containerized LiveKit dev server)
mahimairaja May 3, 2026
36a6fac
test(integration): 5 concurrent real calls (§8.4)
mahimairaja May 3, 2026
6c40ad3
test(parity): isolation="process" matches v0.0.17 (§8.7)
mahimairaja May 3, 2026
c01bce6
test(backpressure): current_load + load_fnc end-to-end (§8.6)
mahimairaja May 3, 2026
453ad17
test(drain): SIGTERM-style drain with 3 in-flight (§8.8)
mahimairaja May 3, 2026
3fe2317
ci(canary): pytest -m integration vs latest livekit-agents (§9.1)
mahimairaja May 3, 2026
8fc0512
ci(bench): density benchmark gate at 50 sessions, 4 GB peak RSS
mahimairaja May 3, 2026
bcac455
docs(README): isolation modes + density benchmark table
mahimairaja May 3, 2026
0b44530
docs(architecture): coroutine-mode lifecycle
mahimairaja May 3, 2026
1a8b699
docs(changelog): v0.1.0 migration note (Unreleased)
mahimairaja May 3, 2026
70659d3
chore(version): set fallback_version to 0.1.0.dev0
mahimairaja May 3, 2026
f9597fb
refactor(coroutine_server): extract closures, lift coverage to 100% (…
mahimairaja May 3, 2026
1e718c3
test(coverage): close defensive gaps in coroutine.py (90% -> 97%)
mahimairaja May 3, 2026
62f7b91
docs(cli): cover --isolation + --max-concurrent-sessions in CLI ref
mahimairaja May 3, 2026
1bdadb2
chore(todo): record discovered work + fix corrupted section header
mahimairaja May 3, 2026
187d3fb
docs(cli): fix stale openrtc.resources reference
mahimairaja May 3, 2026
3f98362
chore(issue-template): refresh for v0.1
mahimairaja May 3, 2026
9390064
docs(release): single-page v0.1 release checklist
mahimairaja May 3, 2026
c5b6c99
docs(README): list v0.1 constructor kwargs in API summary
mahimairaja May 3, 2026
58fffd4
chore(make): add `make bench` target
mahimairaja May 3, 2026
7064408
docs(site): link density benchmark in VitePress sidebar
mahimairaja May 3, 2026
9507e8e
feat(execution): make CoroutineJobExecutor.start a no-op (last NotImp…
mahimairaja May 3, 2026
0851007
test(routing): close core/routing.py coverage gap (76% -> 100%)
mahimairaja May 3, 2026
d8af90e
test(turn-handling): close core/turn_handling.py coverage gap (88% ->…
mahimairaja May 3, 2026
c19ea2e
test(config): close core/config.py coverage gap (97% -> 100%)
mahimairaja May 3, 2026
6968240
test(serialization): close core/serialization.py coverage gap (98% ->…
mahimairaja May 3, 2026
1ef3033
test(cli): close cli/commands.py coverage gap (93% -> 100%)
mahimairaja May 3, 2026
3dd1512
test(reporter): close cli/reporter.py coverage gap (86% -> 100%)
mahimairaja May 3, 2026
114b105
test(livekit-cli): close cli/livekit.py coverage gap (86% -> 100%)
mahimairaja May 3, 2026
704fe5f
test(metrics): close observability/metrics.py coverage gap (84% -> 100%)
mahimairaja May 3, 2026
e1248a5
test(pool): close core/pool.py coverage gap (93% -> 100%)
mahimairaja May 3, 2026
ffcb2ad
test(dashboard): close cli/dashboard.py coverage gap (82% -> 100%)
mahimairaja May 3, 2026
e8f569e
test(init): close cli/__init__.py (54%) and openrtc/__init__.py (80%)…
mahimairaja May 3, 2026
79a7b39
test(discovery): close core/discovery.py coverage gap (98% -> 100%)
mahimairaja May 3, 2026
ad75434
test(coroutine): close execution/coroutine.py gap (97% -> 100%) — pro…
mahimairaja May 3, 2026
22270c4
chore(ci): lock the v0.1 coverage ratchet at 95% (was 80%)
mahimairaja May 3, 2026
702ec94
chore(coverage): enable branch coverage as the v0.1 hardness gate
mahimairaja May 3, 2026
dbe6271
test(branches): close first batch of 8 branch gaps (99.06% -> 99.40%)
mahimairaja May 3, 2026
b3e3cf4
test(branches): close batch 2 of 4 branch gaps (99.40% -> 99.57%)
mahimairaja May 3, 2026
878cf35
test(branches): close all 6 execution/coroutine.py branch gaps (99.57…
mahimairaja May 3, 2026
4b62b98
test(branches): close all 3 tui/app.py branch gaps (99.83% -> 99.96%)
mahimairaja May 3, 2026
289ec87
test(branches): close last branch cli/__init__.py 32->36 (99.96% -> 1…
mahimairaja May 3, 2026
9884b02
chore(ci): ratchet coverage gate from 95% to 99% (now that combined i…
mahimairaja May 3, 2026
230c400
chore(typecheck): enable mypy strict mode for the source tree
mahimairaja May 3, 2026
3279916
chore(lint): enable ruff `SIM` ruleset (SIM117 ignored)
mahimairaja May 3, 2026
82bbabd
chore(lint): enable ruff `PT` (pytest-style) ruleset
mahimairaja May 3, 2026
34d8999
chore(lint): enable ruff RET+PERF+PIE+ICN+TID rulesets in one batch
mahimairaja May 3, 2026
c613a23
chore(lint): enable ruff `BLE` (blind-except) and `A` (builtin shadow…
mahimairaja May 3, 2026
a53a893
chore(pre-commit): add local mypy --strict hook for src/
mahimairaja May 3, 2026
f7c41d2
chore(make): add `make ci` aggregate target
mahimairaja May 3, 2026
03c93bf
chore(deps): add Dependabot config for weekly pip + GitHub Actions up…
mahimairaja May 3, 2026
8c49285
docs(security): add SECURITY.md vulnerability disclosure policy
mahimairaja May 3, 2026
d3494f1
docs(contributing): refresh for v0.1 dev workflow
mahimairaja May 3, 2026
5f3855e
docs(github): add PR template
mahimairaja May 3, 2026
fe7539e
chore(editorconfig): add `.editorconfig` for cross-editor consistency
mahimairaja May 3, 2026
9692c0d
docs(changelog): record dev-experience improvements under v0.1.0
mahimairaja May 3, 2026
78a5c79
ci(build): add per-PR build-sanity workflow
mahimairaja May 3, 2026
6fe2422
ci(build): add wheel smoke-install step
mahimairaja May 3, 2026
3aeba41
ci(audit): add `pip-audit --strict` workflow (per-PR + weekly)
mahimairaja May 3, 2026
8e68b91
chore(pre-commit): add codespell hook (v2.4.2)
mahimairaja May 3, 2026
24ce48f
chore(pre-commit): add `actionlint` hook (v1.7.7)
mahimairaja May 3, 2026
11d1add
fix(ci): repair pip-audit workflow
mahimairaja May 3, 2026
eddc622
fix(ci): make pip-audit job green via shell-trap + GitHub annotation
mahimairaja May 3, 2026
62bb666
chore: address review feedback
mahimairaja May 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,292 changes: 2,292 additions & 0 deletions .agents/JOURNAL.md

Large diffs are not rendered by default.

129 changes: 129 additions & 0 deletions .agents/PROMPT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# OpenRTC-Python v0.1 — Implementation Agent (Ralph Loop)

You are an autonomous engineering agent shipping **OpenRTC-Python v0.1**.
You run inside the Anthropic `ralph-loop` plugin. Each time you try to
exit, the Stop hook re-feeds your prompt. Treat each re-prompt as one
Ralph iteration. Make exactly one focused unit of progress per iteration,
then attempt to exit.

The loop terminates when you output `<promise>OPENRTC_V01_COMPLETE</promise>`
as your final message, OR `--max-iterations` is reached. **Never** emit
the promise tag unless every condition under "Completion criteria"
below is genuinely true. Do not lie to escape the loop.

## Source of truth (read every iteration before doing anything else)

1. `docs/design/v0.1.md` — the locked design spec. Read only the
sections relevant to your current task; do not skim the whole thing
every iteration.
2. `AGENTS.md` — coding standards, naming, comment policy. Follow exactly.
3. `.agents/TODO.md` — the task list. Pick the next unchecked task.
4. `.agents/JOURNAL.md` — read the last 5 entries to understand state
without re-reading the codebase.

## Your workflow (every iteration)

1. **Orient.** Read this PROMPT.md, TODO.md, and the last 5 entries of
JOURNAL.md. Cross-reference the design doc section the task points to.
2. **Pick.** Find the first unchecked task `[ ]` in TODO.md. If blocked
or unclear, read the design doc section it references. If still
unresolvable, mark `[?]` with a note in TODO.md and pick the next.
3. **Do.** Execute that one task. Stay in scope — do not opportunistically
refactor adjacent code unless the task itself requires it.
4. **Verify.** Run `make test` (or `uv run pytest`). For density-related
tasks, run the relevant benchmark. Run `make lint` and `make typecheck`.
Fix all errors before proceeding.
5. **Update files:**
- Mark the task `[x]` in TODO.md.
- Append a JOURNAL.md entry (format below).
- If you discovered new work, add it to the "Discovered work"
section of TODO.md.
6. **Commit.** One commit per task. Conventional commit format
(`feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `chore:`).
Example: `feat(execution): add CoroutineJobExecutor skeleton`.
Do NOT add `Co-Authored-By: Claude` or `🤖 Generated with Claude Code`
trailers. The author identity comes from local `git config user.name`,
which is already correct.
7. **Try to exit.** The Stop hook will re-feed this prompt for the next
iteration. Do not chain a second task — exit cleanly first.

## Hard rules

- **Never** modify `docs/design/v0.1.md` to make a task easier. The
design is locked. If a task is genuinely impossible, mark it `[?]`
in TODO.md, write a finding to JOURNAL.md, and pick the next task.
- **Never** delete or rewrite tests to make them pass. Failing tests
are bugs in your code. The exception is intentionally updating tests
for a behavior change explicitly required by a task — say so in
JOURNAL.md.
- **Never** introduce a new external dependency without an explicit
TODO.md task approving it.
- **Never** push to main. Work in a feature branch named
`v0.1/<short-task-slug>`. Create a PR if one doesn't exist for the
current chunk of work.
- **Never** run `git commit --no-verify` or otherwise bypass git hooks.
- **Always** run `make lint` and `make typecheck` before committing.
No `# type: ignore` or `# noqa` without an inline comment explaining
why.
- **Always** match existing code style. No introduced bullet comments,
no emoji in code, no AI-narration comments ("# This function does X").
Follow AGENTS.md.
- **Always** preserve backward compatibility on `isolation="process"`.
Existing tests must continue to pass.

## Scope reminders

- **In scope:** changes called out in TODO.md.
- **Out of scope (defer to v0.2+):** multi-participant rooms, GPU,
Rust/PyO3, replacing AgentServer, plugin marketplace.
- If you find tempting refactors not in TODO.md, add them as `[ ]`
items in the "Discovered work" section and move on.

## What "one task" means

A task is something you can finish in one iteration — typically 30–90
minutes of work, one logical unit, one commit. If a TODO item feels
larger, your first action is to break it down into smaller items in
TODO.md, commit that breakdown as
`chore: split <task> into subtasks`, and exit. The next iteration
picks up the first subtask.

## JOURNAL.md entry format

Terse and factual. No celebrations, no narration of feelings, no
"successfully implemented" prose.

## 2026-05-03 14:32 UTC — feat(execution): add CoroutineJobExecutor skeleton
Files: src/openrtc/execution/coroutine.py (new, 87 LOC),
tests/execution/test_coroutine_executor.py (new, 4 tests).
Tests: 128/128 pass. Coverage 81%.
Notes: Implements JobExecutor Protocol per
livekit/agents/ipc/job_executor.py:23. Status transitions
verified. launch_job deferred to next task — currently raises
NotImplementedError.

## Completion criteria

Output `<promise>OPENRTC_V01_COMPLETE</promise>` as your final message
ONLY when **all** of the following are simultaneously true:

1. Every task in `.agents/TODO.md` is marked `[x]` or `[~]`
(intentionally skipped with documented reason).
2. `make test` exits 0 with all tests passing on Python 3.11, 3.12, 3.13.
3. `make lint` exits 0 with zero warnings.
4. `make typecheck` exits 0.
5. The Phase 1 density benchmark in `docs/design/v0.1.md` §7 shows
≥ 50 concurrent sessions at ≤ 4 GB peak RSS, no errors. Results
committed to `docs/benchmarks/density-v0.1.md`.
6. All 12 acceptance criteria in `docs/design/v0.1.md` §8 are
demonstrably satisfied. Verify each one before emitting the promise.
7. The integration test for crash isolation (criterion §8.5) passes:
one session raising `RuntimeError` does not affect 4 sibling
sessions in the same coroutine worker.
8. `isolation="process"` regression: full v0.0.17 test suite still
passes when run against process mode.

If any one of these is not true, you are not done. Pick the next task
and continue. Do not emit the promise to escape the loop. Lying about
completion will be detected when the user reviews the work, and is a
direct violation of these instructions.
Loading
Loading