Skip to content

Fail closed on policy runtime outages#3595

Open
kebanks2 wants to merge 1 commit into
orchestration-agent:mainfrom
kebanks2:fix-3592-policy-fail-closed
Open

Fail closed on policy runtime outages#3595
kebanks2 wants to merge 1 commit into
orchestration-agent:mainfrom
kebanks2:fix-3592-policy-fail-closed

Conversation

@kebanks2
Copy link
Copy Markdown

/claim #3592

Summary

  • adds a dependency-light PolicyRuntime that fails closed when the policy engine is unavailable or the evaluator raises
  • records policy-denied tasks as terminal failed outcomes before hooks, agent status mutation, or dispatch side effects
  • clears in-flight state, preserves the same task id across bounded retries, and skips duplicate terminal executions
  • exports AgentStatus and fixes the existing metrics timer self-deadlock so the full local suite can complete

Validation

  • /tmp/ao-3592-venv/bin/python -m pytest tests -q -> 28 passed
  • /tmp/ao-3592-venv/bin/python -m flake8 src/common/policy.py src/common/metrics.py src/orchestrator/engine.py src/orchestrator/scheduler.py src/agent/__init__.py tests/test_policy_runtime.py
  • /tmp/ao-3592-venv/bin/python -m py_compile src/common/policy.py src/common/metrics.py src/orchestrator/engine.py src/orchestrator/scheduler.py src/agent/__init__.py tests/test_policy_runtime.py
  • git diff --check
  • gh repo view orchestration-agent/AgentOrchestration --json viewerHasStarred --jq '.viewerHasStarred' -> true

No secrets, tokens, hidden context, private runtime data, or payout details are included.

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