Repository navigation
feat(cli): independent read-only discussion participants and uteke round documents (#588 part 2e) - #692
Merged
Conversation
… caps (#588 part 2a) Every provider call of a discussion is reserved before it runs and settled after it; a call that does not fit the budget records the budget escalation at once. A refused digest falls back to the round as written. Records and the log are capped on write as well as read, and the log and its lock are never opened through a symlink.
…onfig overrides only (#588 part 2b)
# Conflicts: # CHANGELOG.md
…nt left open (#588 part 2c)
# Conflicts: # CHANGELOG.md # crates/tole-cli/src/lib.rs
…und documents (#588 part 2e)
# Conflicts: # CHANGELOG.md # crates/tole-cli/src/discussion_host.rs # crates/tole-cli/src/discussion_host_tests.rs # docs/epics.md # docs/threat-model.md
…ross a crash (#588 part 2e)
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
Part 2e of #588, the last of the scope that excludes the entry point: independent read-only discussion participants through the existing
delegatepath, and uteke round documents (digests only) with theparentargument of #576.tole_cli::discussion_hoststays a library.Why
A7/A8.3: inline voices of one model tend to agree, so review and critique may use a really independent participant, which must not escape the delegation caps. A8.4: the round results go into a hierarchy of uteke documents, while raw contributions stay in tole's ledger.
Changes
Driver::with_independent(names, runner), for review and critique only; names must be participants of the driver):Independenttrait (start,find,poll);DelegateIndependentruns a participant as aconsult(read-only) delegated child as its profile throughDelegator::consult, so the carve, the depth and live-process caps, the leases and the machine resource guard apply. Its contribution is its completion report (summary and risks), read by the parent with the report caps (O_NOFOLLOW | O_NONBLOCK, size cap), then pass 1 like any turn.Delegator::find_child(direct children of a goal at the root, since the root goal is new in every process; direct children of the session's own node in a delegated child; never deeper, so a child cannot plant a match) and starts one only when there is none, under the same reservation. This closes the double-start window named on feat(cli): multi-round discussion host driver as a library, entry point left open (#588 part 2c) #689.Delegator::poll_nodesettles an ended child (measured usage, report) and drains the queue.Driver::with_docs(RoundDocs),UtekeDocsoveruteke_document):goal-<id>(contract, participants, budget, status, outcome and checklist) andgoal-<id>-r<n>(the digest, or that the round was passed on as written, with the fallback reason), each round created withparent = goal-<id>and naming the parent in its body;uteke_document;Outcome::notes.epics.mdalready lists the part.Testing
discussion_host_tests.rs(mock provider, fake runner and fake document sink): an independent participant is started once with a read-only task, polled, sanitized and settled at what it spent; a run that dies while polling resumes without a second start; a bound child is polled, never restarted; a crash between start and bind finds the marked child (one start, one reservation, exact tokens); an intent with no child starts one under the same reservation; only voices can be independent. Round documents: slugs and parents, digests only (no raw marker, no secret), the fallback/verbatim text, the final goal document with outcome and checklist; a failing sink leaves the discussion complete with redacted notes.delegate_tests.rs: the adapter on a realDelegatorwith a stand-in child:consultmode, the profile, the carve, the report as contribution, the whole carve charged when no usage is readable,done; a restarted host finds the child by its call; an unknown profile is refused.findignored, an unbound intent re-reserved, raw text in a round document, unredacted notes, zero spend,executeinstead ofconsult, the marker filter infind_child.cargo fmt --all --check,cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo test --workspace,cargo test -p tole-core --no-default-features,cora review --no-llm --staged: all clean.