Skip to content

fix(orchestrator): preserve invalid-run evidence - #30

Merged
JustinJLeopard merged 1 commit into
demo-buildfrom
desktop-codex/pr29-acceptance-followup
Aug 9, 2026
Merged

fix(orchestrator): preserve invalid-run evidence#30
JustinJLeopard merged 1 commit into
demo-buildfrom
desktop-codex/pr29-acceptance-followup

Conversation

@JustinJLeopard

Copy link
Copy Markdown
Owner

Closes the two exact acceptance findings on merged PR #29 without expanding scope.

  • allow only explicit empty failed runs to materialize a failed trajectory; ordinary empty runs and contradictory statuses remain refused
  • preserve validator-exact field/type reasons and task context in operator output and on_error
  • document failed in the orchestration result vocabulary

Evidence:

  • RED first: 5 focused failures reproduced the missing store and lossy diagnostics
  • focused: 35 passed
  • full Python 3.14: 481 passed + 14 subtests
  • independent exact-tree review: no P0-P2

No executor, installation, credential, or runtime action was invoked.

Copilot AI lite review requested due to automatic review settings August 9, 2026 21:52
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
justai-demo Ready Ready Preview Aug 9, 2026 9:52pm

Request Review

@JustinJLeopard
JustinJLeopard merged commit 7e0672d into demo-build Aug 9, 2026
3 checks passed
@JustinJLeopard
JustinJLeopard deleted the desktop-codex/pr29-acceptance-followup branch August 9, 2026 21:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_cause contents (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 thread justai/orchestrator.py
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
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.

2 participants