feat(goals): add path-scoped continuation boundary - #175
Merged
Conversation
Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a path-scoped, checked GoalStore boundary and updates the query/CLI/TUI flow to (1) account goal progress atomically and active-only, and (2) emit “durable” transcript events so finalized assistant/tool-result messages can survive compaction and terminal paths.
Changes:
- Add atomic, checked goal progress recording and active-only state transitions (including expected-goal-ID guards and path-scoped APIs).
- Add
QueryEvent::DurableMessageemission for finalized assistant/tool-result messages across terminal paths (stall/error/cancel/budget/unsupported stop reasons), plus broader terminal-guard handling. - Add a path-scoped
GoalCompletetool constructor (GoalCompleteTool::at_path) while preserving the default unit-struct tool behavior.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src-rust/crates/tui/src/app.rs | Adds a new QueryEvent match arm for DurableMessage (currently ignored). |
| src-rust/crates/tools/src/lib.rs | Re-exports PathScopedGoalCompleteTool alongside GoalCompleteTool. |
| src-rust/crates/tools/src/goal_complete.rs | Implements path-scoped goal completion and refactors shared completion logic; adds tests. |
| src-rust/crates/query/src/lib.rs | Adds QueryEvent::DurableMessage and emits durable finalized messages before terminal outcomes; expands terminal stop/error handling and adds extensive tests. |
| src-rust/crates/query/src/goal_loop.rs | Introduces path-scoped and expected-goal continuation APIs; switches completion to active-only transitions; adds tests. |
| src-rust/crates/core/src/goal.rs | Adds fallible decoding, checked/atomic progress accounting, and active-only transitions with richer GoalError; adds reconciliation and tests. |
| src-rust/crates/cli/src/main.rs | Adds per-turn goal token baselining and expected-goal accounting to convert tracker deltas into goal-absolute totals. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| _ => {} | ||
| } | ||
| } | ||
| QueryEvent::DurableMessage { .. } => {} |
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
GoalStoreboundary with atomic progress accounting, active-only transitions, and reconciliation.GoalCompleteToolwhile retaining the default unit-struct tool and registry behavior.Context
claurst-core,claurst-query, CLI/TUI event handling, andclaurst-toolsgoal completion.Changes
Validation
git diff --checkcargo fmt --all --checkcargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo test --workspace --quietPR Readiness