Skip to content

refactor(mission): return how a mission ended instead of printing and exiting - #961

Merged
ajianaz merged 1 commit into
developfrom
refactor/mission-result
Nov 19, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/mission-result

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Split the mission loop so it returns a result: run_mission_outcome runs the loop, writes the fact/mission summary and returns a MissionOutcome; run_mission calls it and keeps the console report and the nonzero exit for a mission that did not complete. MissionConfig gains fresh_id (the CLI passes None).

Why

Prerequisite for mission over serve (#947, step 5 of #941): a daemon has to run a mission on a thread and report its end, and cannot print and exit. This change alone has no behavior change.

Changes

  • mission.rs: MissionOutcome, run_mission_outcome, thin run_mission wrapper; fresh_id lets a caller know the session id before the loop runs.
  • main.rs: passes fresh_id: None.

Testing

The existing mission_e2e suite passes unchanged (9 passed, 0 failed), and so does the full cargo test -p tole-cli (no failing result line). cargo fmt and cargo clippy -p tole-cli --all-targets -- -D warnings are clean in the default, --no-default-features and --no-default-features --features shell-tools profiles.

… exiting

run_mission_outcome runs the loop and returns a MissionOutcome; run_mission keeps the console report and the nonzero exit. MissionConfig gains fresh_id so a face can know the session id up front. No change to the CLI.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 6ce28af into develop Nov 19, 2026
23 checks passed
@ajianaz
ajianaz deleted the refactor/mission-result branch November 20, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant