Tasks: tiny-harness tui never asserts a participant, so it cannot send messages
Derived from
bugfix.md,design.mdandtesting-plan.md. No approval gate follows this file.
Task list
- [x] 1. Regression test first: the real
run_tuipath sends a message- New scenario
TUI sends a message under the asserted participantintests/integration/embedded/test_cli_embedded.py: patch onlyHarnessApp.run_asyncto drive the app under Textual's pilot. Callcommands.tui(settings, url=None, participant="alice"), type a message, expectCOMPLETEDandalicein the composer placeholder. - Rewrite the existing embedded scenario's stand-in to accept
participantfrom the command and connect with it (R2.2). - Run it on today's code and record the red (
no participant asserted, or theparticipantkeyword the old signature rejects). - Depends on: none
- Requirements: R2.1, R2.2
- Test: T2 —
uv run pytest tests/integration/embedded/test_cli_embedded.py(red)
- New scenario
- [x] 2. CLI:
--participantand fail-closed resolution- Unit tests first in
tests/unit/service/test_cli.py: parse--participant;tui_participantfor flag, blank flag, OS default,OSError;mainexits 2 naming--participantfor a blank flag and forOSError. - Implement
--participant,tui_participant, the refusal inmainand the pass-through indispatch. - Depends on: none
- Requirements: R1.1, R1.3, R1.4, R1.5
- Test: T1 —
uv run pytest tests/unit/service/test_cli.py(red→green)
- Unit tests first in
- [x] 3. Thread the participant through
commands.tuiandrun_tui- Unit test first:
commands.tui(settings, url="http://x", participant="alice")callsrun_tui("http://x", participant="alice"). commands.tuitakesparticipantand passes it on both paths;run_tuimakes it a requiredstrand drops theor "you"placeholder.- The composer placeholder reads
Enter to send as <participant>; regenerate the TUI snapshots (uv run pytest tests/ui --snapshot-update) and check the diff is only that text. - Depends on: 1, 2
- Requirements: R1.2, R1.6, R1.7
- Test: T1 + T2 + T5 + T6 — task 1's scenarios go green; snapshots match
- Unit test first:
- [x] 4. Docs: capability doc, README and guide
docs/capabilities/surfaces-and-renderers.md: the TUI asserts--participantor the OS user name; history row for issue-20.README.md,docs/guide/getting-started.md: mention--participant.evidence/documentation.md.- Depends on: 3
- Requirements: R1
- Test: T12 — markdownlint via
uv run pre-commit run --all-files
Dependency graph (DAG)
Checkpoints
- After 1: the red run is captured for
evidence/integration.md. - After 2 and 3:
uv run pytest tests/unit tests/integration/embedded tests/ui. - After 4:
uv run pre-commit run --all-files; then the verification node runstesting-plan.md.