Skip to content

Temporal + MAF agents POC: Phase 1 baseline + Phase 2 live Azure OpenAI & GitHub - #7

Open
roy2392 wants to merge 17 commits into
ZaltaClaw:mainfrom
roy2392:phase2-live-design
Open

Temporal + MAF agents POC: Phase 1 baseline + Phase 2 live Azure OpenAI & GitHub#7
roy2392 wants to merge 17 commits into
ZaltaClaw:mainfrom
roy2392:phase2-live-design

Conversation

@roy2392

@roy2392 roy2392 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

Adds a self-contained temporal-maf-agents-poc/ subproject: a production-style POC where Temporal is the durable orchestration authority and Microsoft Agent Framework (MAF) is the agent runtime (used only inside Temporal activities), with one AKS worker Deployment per task queue and KEDA scaling from task-queue backlog.

This branch lands two layers:

Phase 1 — topology baseline (mock agents, no credentials)

  • Parent AgentOrchestratorWorkflow → 4 child workflows (planner → github → aks → approval), one per task queue.
  • Two-layer retry policy, durable human-in-the-loop approval gate (signal + auto-approve timer).
  • docker-compose (Temporal + UI + namespace bootstrap + 5 workers), k8s Deployments + KEDA ScaledObjects.
  • End-to-end test on Temporal's time-skipping server (happy path + approval rejection).

Phase 2 — live Azure OpenAI + GitHub (this effort)

  • Planner / GitHub / Approval agents go live via Azure OpenAI (MAF response_format structured output); AKS stays mock.
  • LLM plans, the activity executes: the GitHub agent does real, idempotent branch + plan-file + PR writes (shared/github.py), fail-closed behind an owner allowlist guard.
  • Env-selected Azure auth (API key or DefaultAzureCredential / workload identity); GitHub PAT.
  • Error classification split across the seam: transient (5xx / rate-limit / timeout / schema-invalid) → raise so Temporal retries; permanent (auth / 404 / 422 / guard) → fail fast.
  • AGENT_MODE=mock stays the default; live wiring is opt-in. Determinism boundary preserved — no LLM/Azure/GitHub/MAF imports in workflow code.

Design spec and implementation plan: temporal-maf-agents-poc/docs/superpowers/.

How it was built

Phase 2 was implemented via spec → plan → subagent-driven TDD (9 tasks), each with a per-task spec+quality review, plus a final whole-branch review. One review finding fixed: GitHub 403/429 rate-limiting is now treated as transient (was failing fast).

Tests

PYTHONPATH=src pytest44 passed, 1 skipped (the skip is the creds-gated live smoke test). Includes the full time-skipping integration test in mock mode. Live paths are creds-gated and exercised only by the opt-in smoke test.

🤖 Generated with Claude Code

Roey Zalta and others added 17 commits June 25, 2026 07:21
Approved brainstorming design: planner/github/approval go live via Azure
OpenAI (MAF) with real GitHub branch+plan-file+PR writes; AKS stays mock.
LLM-plans/activity-executes, response_format schemas, env-selected Azure
auth, PAT + owner-guard for GitHub, mocked-client tests + opt-in live smoke.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U8d6DuACgKfMFiFbaQ2AFQ
9 TDD tasks: config, MAF live seam, idempotent GitHub client, planner/
github/approval live wiring, AKS-stays-mock regression, Docker/k8s, docs +
opt-in live smoke. Workflows/contracts/KEDA untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U8d6DuACgKfMFiFbaQ2AFQ
The Phase-1 implementation (parent + 4 child workflows, mock agents, k8s +
KEDA manifests, docker-compose, tests) was authored but never committed.
Track it as the baseline before Phase-2 live wiring lands on top.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U8d6DuACgKfMFiFbaQ2AFQ
Remove agent-framework from [project].dependencies so mock-mode installs
and runs without it. It remains in the [project.optional-dependencies] live
extra. Also adds AZURE_OPENAI_API_VERSION to the monkeypatch.delenv loop in
test_phase2_defaults to guard against a pre-set empty env var breaking the
non-empty default assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U8d6DuACgKfMFiFbaQ2AFQ
…sed import

RateLimitExceededException (PyGithub's 403/429 rate-limit type) is a subclass
of GithubException. Catching it explicitly before the generic GithubException
handler ensures rate-limit errors propagate as transient so Temporal retries
them, rather than being wrapped as PermanentGitHubError and aborting the workflow.
Also removes the unused STATUS_SUCCESS import in test_aks_stays_mock.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U8d6DuACgKfMFiFbaQ2AFQ
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