Files
rune/scripts/admit_wave_i3_live_task_tree.py
Nick a54b9acd33 feat(tui): I3 live question-anchored task tree (D28) — the face operates on real runtime data
- Seam: tui/runtime/lib — library-binary child processes (entry serve
  ephemeral port; event-bus log --json), built from source at boot,
  GOPROXY=off; go.work/in-process honestly impossible (internal/ blocks
  cross-module; go.mod generator-owned) — shelling the LIBRARY binaries
  is the honest seam. Zero changes inside the five libraries.
- Question-rooted trees per D28: newest unresolved question roots the
  live tree (real task IDs, parent_task_id nesting, journal events as
  sub-trees via parent_id ancestry); resolved questions close to one-line
  history; no open question = honest runtime-activity root. Statuses
  roll on fingerprint-gated re-derivation. Controls carry real IDs,
  footer honestly marks render-only (command paths = next wave).
- Identity: runtime lib:connected vs serve: fallback.
- 32 packages green incl -race + gofmt (go_suite GREEN); 21 new tests;
  env-gated live test verified. Main-session verify: 32/32 own run;
  live pty shows question tree + lib:connected.
- Sibling-mid-flight churn (spine, uv.lock, diff.go) left for their
  waves.
2026-10-17 00:41:50 +01:00

111 lines
3.8 KiB
Python

"""Admission dispatch for wave I3 (live question-anchored task tree, D28).
classify + activate + admit (the headless scaffolding entry law,
scripts/admit_wave_i1_runtime_bridge.py pattern): the live task-tree
build on the existing rune project, user-dispatch approved.
"""
import json
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
from rune import construction_activation as cact # noqa: E402
from rune import construction_admission as cadm # noqa: E402
from rune import construction_mode as cmode # noqa: E402
from rune import scaffold as sc # noqa: E402
ROOT = os.path.join(os.path.dirname(__file__), "..")
OBJECTIVE = (
"build the live question-anchored task tree into the native TUI (D28/"
"TD-1..3): a tui/runtime/lib seam that shells the entry and event-bus "
"library binaries' JSONL interfaces (no behavior changes inside the "
"five libraries; tui go.mod untouched), question-anchored tree "
"derivation from live snapshots in tui/tasks (newest unresolved "
"question roots the live tree, resolved questions close to one-line "
"history, thread/agent events nest as sub-trees), live rolling "
"through the bridge on relevant events only, the working controls "
"driven by real task IDs, and the identity line naming the live "
"source (library-direct vs serve-HTTP fallback)"
)
AFFECTED = [
"tui/runtime/lib/lib.go",
"tui/runtime/lib/lib_test.go",
"tui/runtime/lib/live_test.go",
"tui/tasks/live.go",
"tui/tasks/live_test.go",
"tui/tasks/face.go",
"tui/tasks/render.go",
"tui/bridge/bridge.go",
"tui/bridge/convert.go",
"tui/bridge/bridge_test.go",
"tui/cmd/rune-tui/main.go",
"tui/cmd/rune-tui/main_test.go",
]
def main() -> int:
store = os.path.join(ROOT, "store", "scaffold")
scaffold = sc.Scaffold(store, "rune")
md = cmode.classify_mode(
OBJECTIVE,
target_project="rune",
project_exists=True,
affected_surface=AFFECTED,
)
print("classified mode:", md.mode)
need = {
"need_id": "need-wave-I3-live-task-tree",
"objective": OBJECTIVE,
"origin": "worker",
"project": "rune",
"task_ref": "wave-I3-live-task-tree",
"affected_surface": AFFECTED,
"evidence_refs": [
"docs/openspec/changes/add-native-rune-tui/design.md",
"research/harness-survey/interviews.md",
"src/go/rune-entry/internal/entry/surface.go",
"src/go/event-bus/internal/eventbus/cli.go",
],
}
act = cact.activate(md, need=need, scaffold=scaffold,
builder="wave-I3-live-task-tree")
print("activated:", act.get("activated"), act.get("mode"))
env = cadm.admit(
act,
objective=OBJECTIVE,
builder="wave-I3-live-task-tree",
affected_surface=AFFECTED,
evidence_refs=need["evidence_refs"],
origin="worker",
task_ref="wave-I3-live-task-tree",
expected_new_entities=[
"tui/runtime/lib (package)",
"tui/tasks question-anchored derivation (live.go)",
],
expected_runtime_effects=[
"rune-tui Task lane renders a question-rooted tree from live "
"task-state + journal data",
"identity line names the live source (lib vs serve)",
],
verification_obligations=[
"go test ./... in tui/ green",
"unified_check go_suite green",
"pty proof: face boots, shows a question-rooted tree from live data",
],
approval_ref="user:wave-I3-live-task-tree dispatch",
contract_id="ADMIT-wave-I3-live-task-tree",
project_store=store,
project_id="rune",
)
print(json.dumps(env, indent=2, default=str)[:2400])
return 0 if env.get("success") else 1
if __name__ == "__main__":
sys.exit(main())