This repository has been archived on 2026-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
orchestrator/agent-team/tests
Adam Moussa 694161a52c fix(agent-team): builder returns a real unified diff, not tool narration (#60 output contract)
The #60 max_turns/tools fix stopped the build-node crash but exposed the next
gap: with tools enabled the agentic builder reads files and its final text is
NARRATION (observed live: candidate_diff = 'Let me read the key source files to
get exact signatures bef…'), not a unified diff. That non-diff dispatched to CI,
could not be applied, and the task parked at verify.

- builders.py: default_diff_builder now extracts the unified diff from the
  response via _extract_unified_diff — prefers a fenced ```diff block, else
  slices from the first 'diff --git' header, dropping surrounding prose. A reply
  with NO diff header raises BuildError so narration fails closed (the node fails
  the task with a clear reason) instead of dispatching a bogus diff.
- builders.py: _render_build_prompt now instructs the model that its FINAL
  message must be ONLY the unified diff in a single ```diff fenced block, no
  narration before/after.
- tests: extract from fenced/bare diff with narration; reject narration-only
  (BuildError); default_diff_builder returns the clean diff from a narrated
  response and raises on a prose-only reply.

Full suite 1503 passed; ruff clean.
2026-06-24 14:39:50 -04:00
..
sim Prove P1 exit criteria against the real LangGraph graph; fix question_id stability 2026-06-17 15:16:12 -04:00
__init__.py Plane 2 foundation: interfaces, SQLite schemas, state-store, billing seam 2026-06-17 15:16:12 -04:00
conftest.py test(agent-team): cover transitions, topology, dashboard API + rework status_page tests 2026-06-23 17:15:31 -04:00
test_apply_verify_workflow_hardening.py fix(ws3): keep agent-apply environment gate; drop fail-open Slack step 2026-06-23 12:17:19 -04:00
test_billing.py Plane 2 foundation: interfaces, SQLite schemas, state-store, billing seam 2026-06-17 15:16:12 -04:00
test_build_verify_subgraph.py fix(agent-team): remediate C1 security-review BLOCK (2 HIGH + MED/LOW) 2026-06-23 19:52:04 -04:00
test_builders.py fix(agent-team): builder returns a real unified diff, not tool narration (#60 output contract) 2026-06-24 14:39:50 -04:00
test_builders_llm.py fix(ws1): skip fastapi TestClient tests when fastapi absent + ruff format 2026-06-23 11:40:46 -04:00
test_checker_intake.py feat(agent-team): P5 cross-plane loop — checker finding -> pipeline task (opt-in) (#18) 2026-06-18 15:56:52 -04:00
test_ci_fetcher.py fix(agent-team): remediate C1 security-review BLOCK (2 HIGH + MED/LOW) 2026-06-23 19:52:04 -04:00
test_ci_gate.py feat(agent-team): P3 Phase-0 box-side build->dispatch->verify (WIP) 2026-06-23 19:52:04 -04:00
test_ci_gate_workflow.py feat(agent-team): wire apply/verify into .github/workflows (make it a live GitHub Actions workflow) (#37) 2026-06-22 19:12:17 -04:00
test_ci_watcher.py feat(agent-team): P3 Phase-0 box-side build->dispatch->verify (WIP) 2026-06-23 19:52:04 -04:00
test_clarifier.py Add Plane-2 leaf scaffold (pipeline graph, nodes, HITL, transports, CI) 2026-06-17 15:16:12 -04:00
test_clarifier_llm.py feat(agent-team): bind P1 clarifier to real Claude via subscription-OAuth invoker 2026-06-18 12:56:42 -04:00
test_claude_code_adapter.py Add Plane-2 leaf scaffold (pipeline graph, nodes, HITL, transports, CI) 2026-06-17 15:16:12 -04:00
test_claude_code_live.py feat(agent-team): P4 live github/claude_code transports + GitHub-issue intake 2026-06-18 13:23:02 -04:00
test_coordinator.py fix(agent-team): accurate Slack status for build/verify states (no false 'plan could not be auto-approved') 2026-06-24 14:36:00 -04:00
test_dashboard.py test(agent-team): cover transitions, topology, dashboard API + rework status_page tests 2026-06-23 17:15:31 -04:00
test_deadline_timer.py Add Plane-2 leaf scaffold (pipeline graph, nodes, HITL, transports, CI) 2026-06-17 15:16:12 -04:00
test_dispatcher.py fix(agent-team): close P3 async-resume BLOCKs (durable CI-watcher wiring) 2026-06-23 19:52:04 -04:00
test_fixer.py feat(agent-team): Plane-1 fixer — finding→patch→CI draft-PR (dep-bumps, opt-in/inert) (#21) 2026-06-18 16:17:33 -04:00
test_github_adapter.py Add Plane-2 leaf scaffold (pipeline graph, nodes, HITL, transports, CI) 2026-06-17 15:16:12 -04:00
test_github_intake.py feat(agent-team): durable GitHub-issue intake de-dup + intake hardening (#32) 2026-06-22 17:20:43 -04:00
test_github_live.py feat(agent-team): P4 live github/claude_code transports + GitHub-issue intake 2026-06-18 13:23:02 -04:00
test_graph.py fix(agent-team): plan-gate approve routes into the build subgraph (not END) 2026-06-24 14:13:11 -04:00
test_invoker.py fix(agent-team): builder uses agentic invoker config (read-only tools + turn headroom) 2026-06-24 13:13:28 -04:00
test_ledger.py feat(agent-team): add pending_questions.kind discriminator + migration (Phase B1) 2026-06-23 21:03:53 -04:00
test_no_write_token.py test(agent-team): assemble PEM test data at runtime (avoid gitleaks FP) 2026-06-23 19:52:04 -04:00
test_operator_cli.py fix(agent-team): harden listener respawn/close, broaden handle_event guard, channel_ref partial-unique (#29) 2026-06-22 16:14:22 -04:00
test_p3_async_resume.py fix(agent-team): close P3 async-resume BLOCKs (durable CI-watcher wiring) 2026-06-23 19:52:04 -04:00
test_p3_failsafe_serve_default.py feat(agent-team): P3 Phase-0 box-side build->dispatch->verify (WIP) 2026-06-23 19:52:04 -04:00
test_plan_gate_e2e.py test(agent-team): end-to-end plan-review gate composition (Phase C) 2026-06-23 21:03:54 -04:00
test_planner.py fix(agent-team): make planner convergence cap count correctly (LOGIC-03) 2026-06-24 11:53:12 -04:00
test_recovery.py Add Plane-2 leaf scaffold (pipeline graph, nodes, HITL, transports, CI) 2026-06-17 15:16:12 -04:00
test_responder.py feat(agent-team): one Slack thread per task — root "Task received" message + threaded questions/milestones 2026-06-23 15:49:40 -04:00
test_resume_worker.py fix(agent-team): close P3 async-resume BLOCKs (durable CI-watcher wiring) 2026-06-23 19:52:04 -04:00
test_review_loop.py fix(agent-team): review-round cap counts only reviewer verdicts (LOGIC-04) 2026-06-24 11:57:03 -04:00
test_review_loop_llm.py feat(agent-team): bind planner/review/builder/verifier nodes to their models 2026-06-18 12:56:42 -04:00
test_rollback.py fix(agent-team): remediate C1 security-review BLOCK (2 HIGH + MED/LOW) 2026-06-23 19:52:04 -04:00
test_run_team.py feat(agent-team): operator dispatch command + runbook fixes 2026-06-23 20:49:09 -04:00
test_runaway_monitor.py feat(agent-team): P3 Phases A/B/E — safety tooling, wiring, docs 2026-06-23 19:52:04 -04:00
test_schema.py fix(agent-team): init_db drives migrate() so the version stamp actually advances 2026-06-24 12:18:22 -04:00
test_slack_adapter.py fix(agent-team): centralize safe decision mapping + remove free-text abandon hair-trigger 2026-06-24 11:48:04 -04:00
test_slack_listener.py fix(agent-team): centralize safe decision mapping + remove free-text abandon hair-trigger 2026-06-24 11:48:04 -04:00
test_slack_live.py feat(agent-team): 👍-acknowledge received Slack answers (reactions:write) 2026-06-23 15:49:40 -04:00
test_state_store.py Plane 2 foundation: interfaces, SQLite schemas, state-store, billing seam 2026-06-17 15:16:12 -04:00
test_status_page.py test(agent-team): cover transitions, topology, dashboard API + rework status_page tests 2026-06-23 17:15:31 -04:00
test_task_model.py fix(agent-team): remediate C1 security-review BLOCK (2 HIGH + MED/LOW) 2026-06-23 19:52:04 -04:00
test_topology.py test(agent-team): cover transitions, topology, dashboard API + rework status_page tests 2026-06-23 17:15:31 -04:00
test_transitions.py test(agent-team): cover transitions, topology, dashboard API + rework status_page tests 2026-06-23 17:15:31 -04:00
test_transport_base.py Plane 2 foundation: interfaces, SQLite schemas, state-store, billing seam 2026-06-17 15:16:12 -04:00
test_verifier.py fix(agent-team): remediate C1 security-review BLOCK (2 HIGH + MED/LOW) 2026-06-23 19:52:04 -04:00
test_verifier_llm.py feat(agent-team): bind planner/review/builder/verifier nodes to their models 2026-06-18 12:56:42 -04:00
test_ws0_ws2_ws4_plugin_slack_hook.py feat(agent-team): one Slack thread per task — root "Task received" message + threaded questions/milestones 2026-06-23 15:49:40 -04:00
test_ws1_invoker_multi_api.py fix(ws1): harden HTTP API + declare fastapi/uvicorn deps 2026-06-23 12:27:23 -04:00
test_ws3_dispatch_invoker.py fix(agent-team): close P3 async-resume BLOCKs (durable CI-watcher wiring) 2026-06-23 19:52:04 -04:00
test_ws5_memory_handbook.py fix(ws5): allowlist save_memory names + symlink-safe write 2026-06-23 12:29:25 -04:00
test_ws_activation_wiring.py feat(agent-team): one Slack thread per task — root "Task received" message + threaded questions/milestones 2026-06-23 15:49:40 -04:00