Park a seat on the host, and brief it on its other conversations - #72
Merged
Merged
Conversation
A turn that stops on something only the host can settle -- an approval -- read as a silent one: nudged, then a stall. `record_parked` holds the seat where it stopped, not nudged, not stalled, not proposed, with a parked askee's conversation waiting rather than concluding; `resume_seat` owes it a turn there. Nothing due with a seat parked is a wait, and `Error::Parked` is the host giving up on one. `EpisodeBrief::elsewhere` carries the newest rows of the seat's other conversations, rendered as context after the turn's own rows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A host that briefs a seat on its other channels writes that read itself, and a read written in the host is how a seat ends up shown a row it was never addressed on. `gather_elsewhere` does it over the same log port and the same projection as every other read: narrowed to the seat, every conversation bounded by one `before` so a turn's context is a snapshot, and a conversation the seat may read nothing of listed with no rows rather than dropped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`TurnResult` becomes an enum -- replied, failed, parked -- which drops a `None` case no runner ever produced and gives a turn that stopped on the host somewhere to say so. `EpisodeHost::after_turn` returns a `Disposition`, so a host that queues an approval parks the seat; the loop records what the turn called and holds it. With nothing to run and seats parked, the loop asks `Journal::released`, where a host blocks on its own queue, and a host that releases nobody ends the episode parked rather than spinning. `Journal::channels` names the seat's other conversations, whose newest rows are gathered through the same wave watermark and carried in the brief as context. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Tiny Sweeper review
|
|
Warning Review limit reached
This review includes 39 billable files and costs up to $9.75. Or wait 15 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (39)
Comment |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two things a host needs before it can run its own agents in a completion episode, and which OpenCompany blocks on.
A turn can park. A seat whose turn stops on something only the host can settle — an approval it has queued — used to read as a silent one: nudged, nudged again, then
Error::Stalled, while the approval sat unanswered.Conductor::record_parkedrecords whatever the turn called and then holds the seat where it stopped: not nudged for silence, not counted toward a stall, not proposed again, and a parked askee's conversation waits with it rather than concluding for want of a turn.resume_seatputs it back in the next wave. Nothing due with a seat parked is a wait, not an end.A seat can be shown its other conversations. A host that briefs a seat on its other channels writes that read itself, and a read written in the host is how a seat ends up shown a row it was never addressed on.
gather_elsewheredoes it over the same log port and the same projection as every other read: narrowed to the seat, every conversation bounded by onebeforeso a turn's context is a snapshot rather than reads drifting while the log grows, and a conversation the seat may read nothing of listed with no rows rather than dropped.EpisodeBrief::elsewherecarries the result, rendered under a heading that says it is context, not work.The loop ties both to the host:
Journal::releasedis where a host blocks on its approval queue, andJournal::channelsnames the conversations to gather. Both have defaults, so a host that does neither is unaffected.Related issue
None; groundwork for the OpenCompany integration.
API or behavior changes
TurnResultis an enum —Replied,Failed,Parked— rather thanOption<Result<String, String>>. TheNonecase meant "timed out" and no runner ever produced it; the embed runner's timeout is now aFailednaming the seat.reply()andparked()read it.EpisodeHost::after_turnreturnsResult<Disposition>instead ofResult<()>.Disposition::Doneis the default and the old behavior.tinyhivemind: theelsewheremodule —gather_elsewhere,ElsewhereQuery,Elsewhere,render_row.tinyhivemind-driver:Conductor::record_parked,Conductor::resume_seat,Conductor::parked,Event::Parked,Event::Resumed,Error::Parked,EpisodeBrief::elsewhere,ElsewhereView.tinyhivemind-openhuman:Disposition,Released,Journal::channels,Journal::released,MemoryLog::append_to,Row::desk.Conductor::record_parkedrecords the turn's calls before holding the seat, so a seat that broadcast and then parked keeps its broadcast.Validation
Run from the repository root, all passing:
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-features(36 suites)RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features.github/scripts/assert-pure.sh,.github/scripts/assert-openhuman-pin.shcargo llvm-cov --workspace --all-targets --all-features: no file under the 90% gatecargo test --locked --manifest-path examples/openhuman/Cargo.tomlTests
conduct/test/parked.rs: a parked desk seat held and released; a parked askee holding its conversation open and answering once released; releasing a seat that was never parked changing nothing, with the ordinary stall still a stall; and what a seat said before it parked being recorded.driver/brief/test.rs: elsewhere rendered after the turn's own rows, on the desk and in a thread, and absent when the host gives none.elsewhere/test.rs: the turn's own conversation skipped, the narrowing to the seat, the bound holding every conversation to one moment, a thread as its own conversation, and a failed read reported.episode/test/parking.rs: a parked seat waited for and run again throughrun_episode; a host that releases nobody ending the episode parked; a seat's other desk reaching its brief.Documentation
conduct/README.mdgains the parking rule;episode/README.md,hosted/README.md,runner/README.mdandjournal/README.mdfollow the new hooks;elsewhere/README.mdis new and indexed fromsrc/README.md.Checklist