Repository navigation
Conversation
Member
|
merged via rebase, thank you! |
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.
Fixes #144
Problem
An inference failure without reported usage fails the mission and cancels other supervised work. Responses that omit usage already block the mission, but also cancel admitted work. Unknown spend should prevent new mission work without cancelling children already running.
Fix
mission--settle-inferenceretains the failure report and unknown accounting, then blocks without cancelling running operations. Known token overspend still exhausts the mission and cancels work.mission--operation-draining-p,mission--admitandmission-agent-terminal-pallow only a live, uncancelled child of the exact blocked mission to continue. Existing deadlines, budgets and cancellation checks apply.mission-task-job-run,agent--tool-thread-functionandtool-execution-invoke :aroundpreserve the admitted child's identity across execution boundaries.mission--superviserechecks cancellation at registration.task-orchestrator-start-jobsrefuses new mission children before consuming session or pool identity, including queued tasks that have not started.mission--account-inferencesettles known zero usage when unwinding before the supervised provider callback starts. After callback entry, missing usage is unknown; settlement is exactly once.Tests
mission-inference-tests.lispruns a real child through a gated tool while another streaming request fails without usage. It verifies BLOCKED, refusal of new children, successful child continuation, retained failure evidence and unknown usage, exact known charges, and complete reservation settlement.test-mission-inference-cancel-before-dispatchverifies known zero usage and complete reservation settlement when cancellation prevents provider dispatch.Validation
On 0.67.10 (
1b3f325b), Linux x86-64, SBCL 2.6.6; candidate66e77f35:./script/check --sourcepasses on unchanged upstream and this PR.mission-inferenceRED/GREEN on the same 9 cases / 63 checks: unchanged1b3f325bproduction with only this PR's test changes fails 3 cases / 11 checks (exit 1); this PR passes all 63 checks (exit 0). The RED failures aretest-mission-inference-unknown-drains-child,test-mission-inference-cancel-before-dispatch, andtest-mission-inference-unknown-and-interruption-cleanup../script/check: 1,246 cases / 16,874 checks / 2 failed cases; unchanged upstream: 1,244 cases / 16,857 checks / the same 2 failed cases. Both exit 1; source and recovery checks pass. Failures:test-telemetry-subprocess-deadlines(libcrypto.so.3reopen) andtest-model-catalog-standalone-http(bounded-body assertion).