Worktree issue 1857 parked wait events - #2018
Conversation
…ken wire events for parked waits The parked-wait primitive (#1471) announced the park and the wake as synthetic AgentEvent::Text deltas, so consumers could not tell a park from model narration and replay could not attribute the wall-clock gap. - AgentEvent::TurnParked { description, poll_interval_secs, deadline_secs } / TurnWoken { reason, polls_used } beside Steered, with wire tags turn_parked/turn_woken and serde round-trip witnesses (invariant 4). event.rs's inline test module moves to src/event/tests.rs (the anthropic/tests.rs pattern) so the wire contract stays under its file-size ceiling. - Bus lifecycle names agent.turn.parked / agent.turn.woken (observer-only; names::BLOCKING untouched). The names catalog moves to bus/names.rs (the driver/settlement.rs pattern) for the same ceiling reason. Payloads carry the timing envelope and the WakeReason token only — never the tool-authored description (content-free rule). - driver/waiting.rs emits the typed pair and drops the ⏳/▶ prose deltas; WakeReason::wire_token() pins the reason spelling. - The deck folds the pair into typed Parked/Woken transcript entries, the plain surface words them in textline (parked/woken), the fleet deck traces them cool (intensity 60) and keeps the lane Running. - Pipeline replay: signatures for totality; excluded from structural_diff's positional walk (external-state timing, additive vs old goldens — the SpeculationDiscarded + SubAgent grounds). - The parked_wait witnesses now assert the typed events, including the deadline path's polls accounting. Refs #1471 Closes #1857
… bridge, transcript search, and the regenerated wire schema - diag_bridge: agent.turn.parked / agent.turn.woken records — timing envelope and polls only, the tool-authored description stays off the record (stella-diag content-free contract). - transcript_nav: the wait description is searchable; the wake's closed reason token is chrome. - docs/wire regenerated (additive: two new type tags). Refs #1857
…ts.rs The extracted test module landed 30 lines under the 1500-line ratchet, which makes it a new file that fails the gate on the very next variant added — exactly the shape AGENTS.md says to split rather than grow. The seam is real, not arbitrary: the parent module tests each variant's round-trip (one test per variant, so it grows with the enum), while the extracted half tests the tag table itself — type_tag() agreeing with serde, KNOWN_TYPE_TAGS totality, and the Unknown forward-compat fallback — which grows only when the *mechanism* changes. Refs #1857
The file splits de-indented string literals past their wrap points; rustfmt settles all formatting here. Refs #1857
…ew rows for palette compliance - A fold witness: the park/wake events become typed transcript entries carrying their own facts, instead of coalescing into the preceding answer text the way the synthetic Text deltas did. - sample_entries() gains both kinds. Its doc comment claims 'one entry of every transcript kind', and the palette sweep it feeds is what proves no row carries a raw ANSI colour — a kind missing from the list is silently unswept. Refs #1857
…om the operator journal and the fleet row Three consumers matched AgentEvent behind a wildcard, so the compiler could not flag them — and because the park used to arrive as Text, all three silently got WORSE when it became its own variant: - stella-observatory's execution_journal selects an event_type allowlist. 'text' was on it; 'turn_parked'/'turn_woken' were not, so the park disappeared entirely from the transcript an operator opens to ask why an execution took so long. Added to the allowlist, with journal_entry arms carrying the payload (a row saying a park happened but not what was awaited answers nothing) and a frontend arm — without one it fell through to 'answer' and drew a blank row. - stella-tui's fleet dashboard froze row.action on the last tool, so a worker deliberately waiting read as one stuck mid-tool. New LastAction::Parked rather than reusing Blocked: Blocked means a human must act, and a park needs nobody — mislabelling it would send an operator hunting an approval prompt that does not exist. Refs #1857
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Reviewer's GuideAdds typed parked/woken wait events to the agent event wire contract and lifecycle, replacing prose Text narration, and wires them through core engine, bus names, TUI model/rendering, CLI diagnostics, observatory journal, and replay tooling while splitting oversized modules for file-size constraints. Sequence diagram for engine parked/woken turn lifecycle eventssequenceDiagram
participant Engine
participant EventSender
participant HookBus
participant lifecycle
Engine->>EventSender: send(AgentEvent::TurnParked)
Engine->>HookBus: emit_lifecycle(bus::names::AGENT_TURN_PARKED, closure)
HookBus->>lifecycle: turn_parked_payload(poll_interval_secs, deadline_secs)
loop engine_side_probes
Engine-->>Engine: probe_fingerprint / decide
end
Engine->>EventSender: send(AgentEvent::TurnWoken)
Engine->>HookBus: emit_lifecycle(bus::names::AGENT_TURN_WOKEN, closure)
HookBus->>lifecycle: turn_woken_payload(WakeReason::wire_token(), polls_used)
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Closing as fully superseded — every commit on this branch has already landed on main through two other PRs, and merging it now would revert work rather than add any. The content already shippedVerified against
The work reached main as #1994 (protocol + deck park state) and #2005 (the observatory-journal and fleet-row consumers). #1857 is served by those. Why fixing the conflicts would be the wrong moveThe branch forked at 7947a07 and is 33 commits behind main. Its diff against current main is 152 files, +1,639 / −11,917 — the deletions are merged work it predates (website content, the investor deck, docs), not changes it intends. A rebase would mean hand-resolving conflicts in The cost is high, the yield is zero, and the risk is a regression. Closing is the correct outcome; nothing is lost. (Housekeeping note for whoever opened it: the PR template was left unfilled — |
What & why
Closes #N
The witness
Stella's definition of done is a test that fails on the old code and passes on the new.
main, passes here), orThe gate
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace--help, doc comments)Closes #Nappears both above and as a commit trailer — squash buildsthe commit body from commit messages, so the description alone won't carry it
Nothing left behind
Anything you noticed and did not fix — a bug, a missing test, dead or unwired
code, the logical next step of this work — is a GitHub issue before this merges,
written as a handoff a fresh agent could execute (AGENTS.md § "Nothing left
behind"). The gate catches the residue (a
TODOwith no issue number); itcannot catch what only you saw.
Ground-rule check
stella-core; no new deps without justification belowAnything reviewers should know?
Summary by Sourcery
Add structured parked-wait span events to the agent protocol and lifecycle, replace prose notifications with typed TurnParked/TurnWoken events across engine, UI, CLI, and observability surfaces, and split large event and bus name modules into sibling files to stay within file-size limits.
New Features:
Enhancements:
Tests: