Adopt Kida 0.7 capabilities across milo-cli#58
Merged
Conversation
Five-sprint epic landing strict-safe defaults, workload-aware
executor sizing, streaming flush boundaries, live-rendering
re-exports, and component introspection — taking get_env() from
1 to 4 kida features and milo subcommands from 4 to 5.
- get_env(): inline_components=True, validate_calls=True, opt-in
enable_capture; default-singleton fast path updated.
- gateway.py / registry.py / state.py: use kida.get_optimal_workers
with IO_BOUND (gateway, registry) and RENDER (saga executor)
workload types; integration spy tests confirm wiring.
- _defs.kida: {% flush %} boundaries on pipeline_progress (×2)
and pipeline_detail (×3) to encode streaming contract.
- src/milo/live.py: re-export LiveRenderer/Spinner/
stream_to_terminal/terminal_env from kida.terminal; new
examples/liverender; site/content/docs/usage/live.md covers
App+Tick vs LiveRenderer decision.
- src/milo/components_cli.py + cli.py: new `milo components`
subcommand backed by kida.DefMetadata, with --json and --path.
- scripts/check_templates.py + ci.yml: compile-time template
validation gate using milo's actual env.
- pyproject.toml: pin kida-templates>=0.7.0,<0.8.0.
- changelog.d: two towncrier fragments documenting adoption +
strict_undefined conformance.
Test suite: 1422 → 1431 (+9). Fixed latent {% def %}-in-{% elif %}
in examples/filepicker, and a progress.kida bug surfaced by the
new template-check gate. Plan and per-sprint results recorded in
.context/plans/kida-0.7-adoption.md.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sprint 2 set Store's auto-sized executor to WorkloadType.RENDER, which caps at 4 workers and is halved to 2 under CI=true. With 2 workers and 8 blocking Take() waiters, only 2 sagas consumed BROADCAST per dispatch and the other 6 each waited their full 5s timeout — blowing the test_bench_take_multiple_waiters[waiters-8] per-round budget and exceeding the 120s pytest-timeout on the pytest-benchmark CI job. Sagas execute side-effect code (Call / Take / Retry / Race) which is I/O-shaped, not template rendering. IO_BOUND is the correct classification and matches the gateway/registry pools (also IO_BOUND). Restores the pre-Sprint-2 effective worker count of 4 in CI. Verified locally: CI=true uv run pytest .../waiters-8 finishes in 115s of the 120s budget. Full suite still 1431 passed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Coverage Report✅ 87.7% overall coverage
|
test_race_inside_all and test_take_inside_all use the default Store executor sizing (IO_BOUND -> 4 workers under CI=true, even fewer on 3-core macOS GitHub-hosted runners). Their nested All/Race/Take compositions starved the pool, causing 120s pytest-timeout and missed Take dispatches. Mirror the existing precedent at test_all_inside_race (line 1373): explicit max_workers=8 with a comment documenting the nested-effect starvation case. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five-sprint adoption epic for kida 0.7 capabilities. Wires
inline_components/validate_calls/ opt-inenable_captureintoget_env(); routes the gateway / registry / saga executor pools throughkida.get_optimal_workers(IO_BOUND vs RENDER); adds{% flush %}boundaries topipeline_progressandpipeline_detail; shipsmilo.livere-exports + a newexamples/liverender; adds amilo componentssubcommand backed bykida.DefMetadata; and gates CI on a new template-compile script. Pinskida-templates>=0.7.0,<0.8.0and adds two towncrier fragments.Test suite: 1422 → 1431 (+9). Plan and per-sprint results in
.context/plans/kida-0.7-adoption.md.Test plan
uv run pytest -q(1431 passed, 1 skipped)uv run ruff check src/milo/ tests/clean on touched filesuv run ruff format --checkcleanuv run python scripts/check_templates.py(new gate) passesuv run milo componentslists 22 bundled defs;--jsonparses cleanlyuv run python examples/liverender/app.pysmoke testuv run towncrier build --draft --version 0.3.0renders without warnings🤖 Generated with Claude Code