oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Brief: Paul's typed answers never reach terminalAnswer
2
3Branch `tty-answers` from main a2774dc. OFFLINE ONLY: Paul's run
4(run-4024280761) is live right now on his accounts; do not launch
5providers, do not touch ~/.local/share/equipo*, read-only evidence ok.
6
7Symptom across every real run: Paul types `Allow once` + Return at the
8guide's prompt (printed by internal/directlive/terminal.go via /dev/tty),
9the line echoes in his terminal, and nothing is ever read: no person
10answer artifact, the control step times out (run-4024280761
11claude-Engineering: `controls: context deadline exceeded`, only an
12`answered_by: automatic` answer-8 file exists; run-582068017 Codex
13controls timed out after his Allow once; run 3's "recorded" message was
14printed before reading, so no person answer has EVER been read).
15Astra's previous pty tests fed terminalAnswer directly, not the real
16process chain.
17
18Real chain: Paul's interactive bash on docs-t1 (ssh or local terminal)
19→ scripts/try-equipo.sh (sh) → `go run ./cmd/equipo-try` → wizard reads
20earlier prompts from stdin via bufio (internal/tryequipo/state.go) →
21spawns `go test -timeout=0 -tags direct_live ./internal/runner/provider
22-run ^TestDirectLive...` (internal/tryequipo/command.go childCommand,
23process group / Setpgid / Ctty settings) → test binary → directlive
24driver → provider launches in bwrap (--new-session?) → terminalAnswer
25opens /dev/tty O_NONBLOCK, TCIFLUSH, prints, polls, reads.
26
27Find the root cause by reproducing the WHOLE chain under a real pty (e.g.
28python pty.fork or `script -qfc`) with a fake answer request (no
29provider: stub the driver or use an existing fake-CLI harness), typing as
30a human would AFTER the prompt appears. Candidates to test, not assume:
31another process in the chain reading the tty (wizard bufio on stdin,
32`go test` stdin handling, a provider or bwrap child inheriting the tty),
33the reader's process not in the foreground process group (SIGTTIN/EIO),
34TCIFLUSH discarding the line (timing), O_NONBLOCK + poll on a different
35open file description, canonical-mode differences, `go test` buffering.
36Fix it so the real chain delivers the line, add a regression test that
37runs the real chain (wizard → go test → reader) under a pty, and make
38the guide print a short confirmation only AFTER an answer is actually
39read and accepted. Targeted tests, ONE full `make -k ci` (rerun at most
40twice). Commit subject < 80, body `Co-Authored-By: Astra
41<noreply@openai.com>`, push. CONTROLLER-REPORT-tty-answers.md. Scratch
42removed; nothing running; no copy-review server. Print a five-line
43summary.
44