fix(orchestrator): preserve invalid-run evidence - #30
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR tightens the orchestrator’s fail-closed behavior by preserving exact validator failure reasons (field/type details) and carrying that context into operator output and OrchestratorHook.on_error, while also allowing the learning layer to store explicit “empty but failed” evidence.
Changes:
- Allow
record_run(..., results=[], final_status="failed")to be stored as failed evidence, while continuing to refuse ordinary empty runs. - Update orchestrator invalid-result diagnostics to preserve the validator’s exact error reason and (when possible) include the offending task context.
- Strengthen completion-integrity tests to assert
root_causecontents (exact reason + task context) for malformed/invalid executor results.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_completion_integrity.py | Adds/extends tests to cover explicit empty-failed learning evidence and to assert preserved validator reasons in root_cause. |
| justai/orchestrator.py | Preserves validator-exact reasons in fail-closed diagnostics and forwards them via on_error(root_cause=...). |
| justai/learning.py | Permits storing explicit empty failed runs while continuing to refuse ordinary empty runs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+134
to
+135
| task = getattr(result, "title", None) or getattr(result, "task_id", None) | ||
| return f"{reason} on task {task!r}" if task is not None else reason |
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.
Closes the two exact acceptance findings on merged PR #29 without expanding scope.
failedruns to materialize a failed trajectory; ordinary empty runs and contradictory statuses remain refusedon_errorfailedin the orchestration result vocabularyEvidence:
No executor, installation, credential, or runtime action was invoked.