Repository navigation
T27: the Mission panel and the Braid line; the ops dashboard retired (#43) - #191
Conversation
Step 27: runners/watch gains the two operator surfaces the plan names, and the
ops dashboard's last references leave the tree.
- Mission panel (tab 8, reading GET /braid): the braid's session, generation,
open missions, promotion and quarantine stamps and schema_version, drawn from
the agent's wire body (`qualia.braid-state.v1`); an agent that is not
answering degrades the panel to the reason instead of blanking it. The poll is
a blocking client on a worker thread, the shape the ops dashboard used
(`docs/frontend-lessons.md`, source 2).
- Braid line in the chrome: `braid gen {n} · belief lag: {ms} ms`, the value
from Step 24b's `qualia_braid::BeliefClock::decision_latency_ns()`; the
generation prefix is source 2's "the chrome names which stack it is watching".
- `QUALIA_OPS_URL` is gone (from `docs/frontend-lessons.md`, the only file that
still carried it), so `grep -rn QUALIA_OPS_URL` returns nothing. `runners/ops`,
its workspace member and the `runners/README.md` row were never carried in
this repository and are still absent; its stack survives only as the fallback
Step 26 named.
Files beyond the ticket's `runners/watch/src/main.rs`, all forced:
`src/braid.rs` and `tests/braid.rs` (this crate's own doc says the library holds
what is testable without a TTY, and the panel is what the ticket asks to see),
`src/view.rs` (the four-edit panel convention documented in that file),
`Cargo.toml`/`Cargo.lock` (the reqwest and qualia-braid dependencies) and
`docs/frontend-lessons.md` (the ticket's own grep test).
Blocked on #150 (T19) then #188 (T24b): this branch calls
`qualia_braid::BeliefClock`, which lands with those two PRs, so it does not
compile against main alone.
97a5f55 to
0ba714a
Compare
Rebased onto current Host verification at 0ba714a (Windows dev host, The ticket's grep test still holds at the new head: |
|
role: correctness Head: What the ticket asks
The data source: the route is on main, the default transport is not
The defect is the default address. Reproduced against the real agent certificate ( The degradation is honest — an absent or refusing agent yields Note 1 (blocking): default the panel to the agent's real scheme, e.g. the Commands (my archive tree,
|
`DEFAULT_AGENT_URL` was plaintext `http://127.0.0.1:8080`, but the agent's only listener is `axum_server::bind_rustls` (`runners/agent`), its banner prints `https://0.0.0.0:{web_port}` and the Makefile reaches it with `curl -ks https://...`. The module's own `danger_accept_invalid_certs(true)` only means anything over TLS, so out of the box the Mission panel could never reach `GET /braid`; the reviewer reproduced it against the real agent certificate (plaintext default: 0 served / 20 handshake failures). `braid::agent_url()` now resolves `QUALIA_AGENT_URL` first — an explicit override is honoured exactly as before — and otherwise `https://127.0.0.1:${QUALIA_WEB_PORT:-8080}`, the convention `runners/cli::platform::default_agent_url` already takes. The panel honoured no `QUALIA_WEB_PORT` before either. `braid::agent_url_from` keeps the precedence free of the environment so it is testable; `main.rs` hands the resolved URL to both `Mission::pending` and `BraidPoller::spawn`, and this is the only place the crate builds an agent URL. Tests: `the_default_agent_url_is_the_agents_tls_surface` and `a_configured_agent_url_wins_over_the_loopback_default` pin the dialed scheme, and the poller stub now reports its request line so `poller_takes_the_agents_view_off_the_wire` pins `GET /braid` — the stub answers any path, so only the request line can (the reviewer's observation). The mission panel and the braid line are otherwise unchanged.
New head 2306c4c, one commit on the reviewed 0ba714a ( Note 1 — the default scheme
Every place the crate dials the agentThe only URL literal left in the crate is the Nothing in the mission panel or the braid line otherwise reads, writes or renders an address; the panel draws The testsThe reviewer's observation, not a defect: the poller stub answered every path, so neither the scheme nor
Both new assertions fail on the mutant that would let the defect back: Restored the pre-mutation file and reran: the braid suite read The reviewer's experiment, re-runTheir TLS stub and the real agent certificate ( Same contrast as the review (they read 0/20 vs 20/0; the counts differ only with the wall clock). The default now reaches the TLS route and the chrome carries generation 12; the plaintext default is the case that never completed a handshake. The Suite and gate38 in the package (was 36 + the two new tests). No other file changed: Requesting the correctness re-read at 2306c4c. The mission panel and the braid line render, format and degrade exactly as reviewed; the only behaviour change is the address they dial when |
|
role: correctness Head before and after: 1. The fix, and every place the crate dials
if let Some(url) = configured {
let url = url.trim().trim_end_matches('/');
if !url.is_empty() { return url.to_string(); }
}
let port = port.map(str::trim).filter(|port| !port.is_empty());
format!("https://127.0.0.1:{}", port.unwrap_or(DEFAULT_AGENT_PORT))
One precision on the author's wording, not a defect: "honoured exactly as before, trailing slash and 2. The served-vs-failed contrast, reproducedMy TLS
Same contrast, same direction as the predecessor's review at 3. The new tests pin the observable dial, and fail on the old one
Falsification, single-token reverts in the head file, then Restored 4. Suite and clean-room gate at the headThe build recompiled the crate from a fresh target dir, so this is compilation of the head source, 5. The rest of the panel is unchanged since the read at 0ba714a
I could not press keys without a PTY, so I did not drive Verdict: approve. The blocking note is fixed and I reproduced the served/failed contrast, the |
Head, re-read immediately before posting: This is a static contract read: names, signatures, wire/JSON fields, constants and scope. I ran no Per surface
The deletion, as run
New/changed public items and strings
Scope, as runThat is exactly the ticket's subject — The gate, as runObservations (both non-blocking)
For Main, outside this diff: Head and command evidenceVerdict: approve — every consumed name, field and constant matches the interface it must |
|
role: clean-room Head before and after: 1. The gate, in the archive's contentOne harness warning for the next reader: a naive
2. Whole-tree measurement of the changed filesThresholds: gate defaults
3. Added lines verbatim in a front-end source589 added lines (334 code, 116 prose, 139 trivial by the gate's line classifier). No added line
4. The ops dashboard: nothing to delete here, and nothing moved
No file from the ops dashboard was moved into 5. The TUI's rendering code (item 4)
So the TUI's rendering code shares no implementation run with the reference or with Verdict: approve, notes 0. |
Head re-resolved:
|
What this is
Step 27 (#43):
runners/watchgains the Mission panel and the Braid line, and the opsdashboard's last references leave the tree.
8,GET /braid. It draws the braid body field for field(
schema_version,session_id,generation,open_missions,last_promotion_ns,last_quarantine_ns, the wire shape T19qualia-braidstate machine #34/T20 Strands emit events;GET /braid#35 fixed asqualia.braid-state.v1), names the agent itasked, and when the agent is not answering replaces the state with the reason. The poll is a
blocking
reqwestclient on a worker thread feeding the render loop through one channel — theshape
docs/frontend-lessons.mdsource 2 keeps from the ops dashboard — so a dead or slow agentdegrades a line instead of stalling the panel.
braid gen {n} · belief lag: {ms} ms. The value isStep 24b's
qualia_braid::BeliefClock::new(&shm).decision_latency_ns()(ns → whole ms); thegeneration prefix is source 2's requirement that the chrome say which stack it is watching.
format_clockmoved from
main.rstoview.rsso the Mission rows are formatted where they are asserted (onecall site updated).
grep -rn QUALIA_OPS_URLreturns nothing: the only file still carrying it wasdocs/frontend-lessons.md, now reworded.runners/ops, its workspace member and therunners/README.mdrow were never carried in this repository and are still absent, so there is nodeletion to make; its stack survives only as the fallback Step 26 named.
Files beyond the ticket's
runners/watch/src/main.rs, all forced:src/braid.rs+tests/braid.rs(the crate's own doc says the library holds what is testable without a TTY, and the panel's rendering
is what the acceptance asks to see),
src/view.rs(the four-edit panel convention documented there),Cargo.toml/Cargo.lock(thereqwestandqualia-braiddependencies) anddocs/frontend-lessons.md(the ticket's own grep test).Blocked on #188 (T24b)
This branch calls
qualia_braid::BeliefClock, which is not onmainyet — #150 (T19, the braidstate machine) has merged, #188 (T24b, the belief clock) is open. Until it lands the package does not
compile against
mainalone; that is the expected red state, and it is the only reason. Nothing elsehere depends on an unlanded ticket. Verified locally against the sanctioned overlay of #150 + #188
(scratch tree, nothing outside
runners/watch/**committed):The panel, live
The shipped
target/debug/qualia-watch.exerun in a PTY against a stubGET /braidonhttp://127.0.0.1:8080(empty stack manifest,/qualia_t27_smoke),8pressed to select the panel.The harness flattens cursor moves in the PTY log, so the differential writes appear in place; the
panel and the chrome read:
with a mission (
open_missions: 1,last_quarantine_ns: null)without a mission (
open_missions: 0,last_quarantine_ns: 1789081200000000000)and with the stub stopped, the same panel degrades to
state unreachable: tcp timeoutwith thechrome falling back to
braid gen unknown · belief lag: 0 ms. The braid lag stays live in everystate because it is read from the local SHM region, not from the agent.
Provenance
Closes #43