engine-adapters: clan vars --prompt-input flag unrecognised by the pinned clan CLI (answered/rotation generate fails) #186
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent / precedent
Surfaced by the #185 write-side family-1 smoke on the golden clan-lab (clan-core
db4db726), 2026-07-30. Filed as its own ticket per the #184/#185 split precedent (a defect a family smoke surfaces that is out of the surfacing ticket's scope gets its own slice).The defect
internal/clan/vars.govarsFace.Generatefeeds known prompt answers toclan vars generatevia a--prompt-input <file>flag:The pinned clan CLI (
db4db726) does not recognise that flag:clan vars generate --helpat this pin offers--fake-prompts(testing only) and stdin for prompt answers — there is no file-based prompt-input flag. So any answered generate — which includes the adapter's rotation path (answered[ref] && sealed→--regenerate --generator <g>with the answer file) — fails against the real pinned CLI. The headless seal (no answers → no flag) works fine; #185's smoke proved the seal through the real adapter and proved rotation scoping at the raw clan seam.What a fix needs to decide
How the adapter feeds prompt answers headlessly at the pinned clan version, keeping the S13 Q1 "no TTY, never hang" contract:
Plus: the adapter's rotation model couples "rotate" to "answered", but a script-based (non-prompting) generator needs no answer to be rotated — worth revisiting so a no-prompt rotation does not require a dummy answer at all.
Not in scope of #185
#185 is the clan-native inventory rendering layer; this is the clan vars-CLI transport.
vars_test.go's scripted CLI double does not exercise the real flag, so this only shows against a real clan.Triage
Category:
bug— confirmed real defect, verified against the code.Verification: read
internal/clan/vars.go:111-131—varsFace.Generatedoes append--prompt-input <file>to theclan vars generateinvocation whenever an answer file is written (the answered/rotation path). This matches the issue's repro exactly.vars_test.goonly exercises a scripted CLI double (comment at L15-16: "a scripted clan-CLI double that stands in for clan's per-generator secret sealing"), which is why this never showed up before a real-clan smoke (#185). No existing fix in the tree; not redundant. Checked.out-of-scope/(does not exist yet) and the ADR index for any prior ruling on headless prompt-answer transport at this clan pin (searched for "S13", "no TTY", "never hang" acrossdocs/adr/*.md) — no ADR settles this, so it is not a previously-rejected request either.State:
ready-for-human, notready-for-agent— the issue body itself lays out three materially different fixes with no clear winner from the repo's existing decisions:db4db726.Plus a separate coupling question the issue flags: whether "rotate" should require an "answered" generator at all, given script-based generators need no prompt answers.
None of these is a mechanical implementation task — each is a transport/architecture choice with downstream consequences (S13's no-TTY-never-hang contract, the clan version pin, the adapter's public contract). Per the design-to-agent system's human-decision gate, this routes to
ready-for-humanwith the judgement call named rather thanready-for-agent.Suggested next step for the human: pick one of the three transport options above (or the stdin-vs-capability-gate combination), and decide separately whether to decouple "rotate" from "answered" in the same pass or file it as a follow-on.
Ben's ruling (2026-07-30) — stdin.
The adapter feeds prompt answers to
clan vars generatevia stdin as data, at the current pin (db4db726). No pin bump for this; capability-gating rejected — answered generate/rotation must actually work headlessly.Guardrails (the S13 Q1 "no TTY, never hang" contract holds):
The follow-on (rotation coupled to "answered", forcing a dummy answer for no-prompt generators): decouple it as part of this fix — a
--regenerateof a non-prompting generator needs no answer fed. Shape of that decoupling is agent-decided.A newer clan pin with a file-based flag can be weighed later on its own merits — out of scope here.
Taken by Ben's local session (2026-07-30) — implementing the stdin ruling here, alongside the #175 smoke run. Label parked
no-triageso the swarm doesn't double-work it.Blocked — Ben's 16:31 ruling rests on a premise the pinned clan source contradicts (source-verified)
A Sandcastle iteration read the pinned clan-core source (
db4db726) to implement the stdin transport and found the ruling's mechanism is not how the pinned CLI works. Recording the evidence and the decision needed; routing toready-for-human. Theask-humanthread for this issue got no reply in the window, so this is the durable record (a later ask resumes that thread).What the source actually shows (files fetched from
git.clan.lolat revdb4db726f0c16fe7d1c97adf020811f705d2ef81)clan vars generatehas no stdin path for prompt answers, and no--prompt-input.clan_cli/vars/generate.pyregisters onlymachines,--generator/-g,--regenerate/-r,--no-sandbox,--fake-prompts. Prompt answers flow throughclan_lib/vars/prompt.pyask()→get_input(), which uses raw-terminal termios mode:fd = sys.stdin.fileno(); termios.tcgetattr(fd); tty.setraw(fd)then char-by-charsys.stdin.read(1). On a pipe,tcgetattrraisestermios.error: (25, 'Inappropriate ioctl for device')— clan crashes, it does not read the answer. So "feedclan vars generatea stdin pipe carrying the answers" is impossible at this pin (it trades a hang for a crash, and the secret is never generated).The pin's real stdin-as-data path is a different command:
clan vars set <node> <generator>/<prompt>.clan_cli/vars/set.py→clan_lib/vars/set.pyset_via_stdin:This matches every guardrail in the ruling (pipe, no TTY, closed-after-write; a hard subprocess timeout still applies). A persisted prompt's value is stored as a var
generator/promptname(generator.py get_previous_valuereads_secret_store.get(self.key, prompt.name)), soclan vars setwrites exactly what a laterclan vars generatereuses.Prompt-driven rotation still can't run headless at this pin.
generate_commandsetsauto_accept_prompts = not args.regenerate→ with--regenerateit is False, so_default_prompt_functakes theelse: ask()branch (TTY) even when a value is stored. Non-prompting rotation (--regenerate --generator g, generator has no prompts) never reachesask()and runs fine on a closed pipe — that is exactly thesmoke-tlscase #185 proved.Recommended plan (honors the ruling's intent + guardrails)
StdintoInvocation(data via an EOF-closed pipe, never a TTY) + a hard subprocess timeout inExecCLI.clan vars set <node> <generator>/<prompt>on a closed stdin pipe, thenclan vars generateseals headlessly reusing the set value. Drop the broken--prompt-inputflag.--regenerateof a non-prompting generator feeds no answer/stdin (no dummy). A value-less answer is a pure rotation selector.The decision needed (why this is
ready-for-human, not a silent reinterpretation)Two things changed under the ruling's feet: (a) the transport command pivots from
clan vars generatetoclan vars set(the ruling named the wrong subcommand because the ticket body's "generate feeds answers via stdin" is false in source); and (b) prompt-driven rotation is genuinely infeasible headless at this pin, which collides with the ruling's "answered generate/rotation must actually work headlessly / no capability-gating."Please confirm:
generate-stdin →clan vars setas above? (Recommended — it's the only pin-accurate stdin-as-data path and satisfies every guardrail.)Once (1)+(2) are ruled, the change is mechanical and this re-arms to
ready-for-agent.Done (Ben's stdin ruling, implemented same-day) — landed as
4394d55, lab-proven by the #175 family-1 smoke's vars leg (7-leg PASS run, 2026-07-30).Ground truth at the pin (lab-probed, recorded in
docs/spike-findings/smoke-clan-175.md):--prompt-inputnever existed; prompt answers land viaclan vars set <node> <gen>/<prompt>reading stdin as data (set_via_stdin); a plain generate auto-accepts persisted answers and re-runs a generator whose answer changed (staleness = the prompting rotation);--regeneratere-asks interactively (headless termios crash, loud, ~1s) so it is never driven for a prompting generator.Implementation:
Invocationgrew a data-onlyStdin(closed-after-write pipe, never a TTY, never logged, hardanswerFeedTimeout); rotation decoupled from "answered" (a valueless answer naming a sealed non-prompting secret drives a scoped--regeneratewith no stdin; a valueless PROMPTING rotation is a typedFailMissingVarrefusal); every generate scoped per-generator (a node-wide bulk would crash on undeclared prompting generators). Constraint recorded: prompting generators declarepersist = true.Smoke evidence: answered seal →
Getrevealedderived:<answer>; prompting rotation off a fresh answer churned ONLY itself; valueless non-prompting rotation churned ONLY itself (S13 Q3).localhost:9000, never the mesh serve port — the render sets a flat"app.address"TOML key instead ofsettings.app.address#1308