Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ docs/
REVIEW_*.md
review_*.md
.planning/
# Dev integration test driver (out-of-repo tool, runs against live UI).
scripts/integration_scenarios.py

# Coverage / CI artefacts
coverage.xml
Expand Down
24 changes: 24 additions & 0 deletions config/code_review.runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ paths:
# When no rule fires the session falls through to ``unreviewed``
# (the v1.0 framework-default failure mode).
orchestrator:
# Phase 11 (FOC-04): declarative HITL gating policy. Framework
# default threshold (0.7) -- code review is less prod-blast-radius
# than incident remediation so the stricter incident threshold
# (0.8) is unwarranted here.
gate_policy:
confidence_threshold: 0.7
gated_environments: [production]
gated_risk_actions: [approve]
# Phase 12 (FOC-05): declarative retry policy. Framework default --
# max_retries=2, transient retries on, confidence floor 0.4.
retry_policy:
max_retries: 2
retry_on_transient: true
retry_low_confidence_threshold: 0.4
entry_agent: intake
default_terminal_status: unreviewed
statuses:
Expand Down Expand Up @@ -85,6 +99,16 @@ orchestrator:
# state_overrides; orchestrator validates start_session's
# state_overrides kwarg against this class.
state_overrides_schema: examples.code_review.state.CodeReviewStateOverrides
# Phase 9 (D-09-02 / FOC-01 / FOC-02): session-derived tool-arg
# injection map. code_review's pr_url / repo live under
# ``Session.extra_fields`` (the framework-default Session has no
# typed fields for them) so the dotted paths reach into the dict.
# The framework's ``_resolve_dotted`` walks dict-valued attrs
# transparently.
injected_args:
session_id: session.id
pr_url: session.extra_fields.pr_url
repo: session.extra_fields.repo
# Cross-cutting framework knobs read directly off AppConfig.framework.
framework:
# Per-app session-id prefix. Threaded through SessionStore into
Expand Down
30 changes: 28 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ llm:
endpoint: ${AZURE_ENDPOINT}
api_version: 2024-08-01-preview
api_key: ${AZURE_OPENAI_KEY}
openrouter:
kind: openai_compat
base_url: https://openrouter.ai/api/v1
api_key: ${OPENROUTER_API_KEY}
models:
workhorse:
provider: ollama_cloud
model: gpt-oss:120b
provider: openrouter
model: openai/gpt-4o-mini
temperature: 0.0
cheap:
provider: ollama_cloud
Expand Down Expand Up @@ -135,6 +139,19 @@ dedup:
# ``incident_management.yaml`` since this is the bundled deployment
# config for the example app.
orchestrator:
# Phase 11 (FOC-04): declarative HITL gating policy. Framework
# default (threshold 0.7) -- mirrors incident_management v1.1
# behaviour with the production-class environment gate.
gate_policy:
confidence_threshold: 0.7
gated_environments: [production]
gated_risk_actions: [approve]
# Phase 12 (FOC-05): declarative retry policy. Framework default --
# max_retries=2, transient retries on, confidence floor 0.4.
retry_policy:
max_retries: 2
retry_on_transient: true
retry_low_confidence_threshold: 0.4
entry_agent: intake
default_terminal_status: needs_review
statuses:
Expand Down Expand Up @@ -186,6 +203,15 @@ orchestrator:
# state_overrides; orchestrator validates the start_session
# kwarg against this class.
state_overrides_schema: examples.incident_management.state.IncidentStateOverrides
# Phase 9 (D-09-02 / FOC-01 / FOC-02): session-derived tool-arg
# injection map. Strips the named args from each tool's LLM-visible
# signature and re-supplies them from the live Session at invocation
# time. Mirrors incident_management.yaml since this file is the
# bundled deployment config for the example app.
injected_args:
environment: session.extra_fields.environment
incident_id: session.id
session_id: session.id
runtime:
# Wires the orchestrator and storage layer to the incident-management
# domain state class (see examples/incident_management/state.py).
Expand Down
27 changes: 27 additions & 0 deletions config/incident_management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ similarity_method: keyword
# ``_TERMINAL_TOOL_RULES`` table in ``orchestrator.py`` (Phase 6 /
# DECOUPLE-02 / DECOUPLE-03 / D-06-01..06).
orchestrator:
# Phase 11 (FOC-04): declarative HITL gating policy. Tighter
# threshold than the framework default -- incident remediation
# pauses on production-class medium-risk tools and on any tool
# call below 80% turn confidence.
gate_policy:
confidence_threshold: 0.8
gated_environments: [production]
gated_risk_actions: [approve]
# Phase 12 (FOC-05): declarative retry policy. Default
# max_retries=2 mirrors the v1.2 ROADMAP. retry_on_transient=true
# keeps current auto-retry-on-network-blip behaviour.
# retry_low_confidence_threshold=0.4 sits below the gate_policy
# confidence_threshold (0.8) so the gate fires HITL approval
# before the retry path even considers a low-confidence give-up.
retry_policy:
max_retries: 2
retry_on_transient: true
retry_low_confidence_threshold: 0.4
entry_agent: intake
default_terminal_status: needs_review
statuses:
Expand Down Expand Up @@ -74,6 +92,15 @@ orchestrator:
# state_overrides; orchestrator validates the start_session
# kwarg against this class.
state_overrides_schema: examples.incident_management.state.IncidentStateOverrides
# Phase 9 (D-09-02 / FOC-01 / FOC-02): session-derived tool-arg
# injection map. Each entry strips the named arg from every tool's
# LLM-visible signature and re-supplies the value from the live
# Session at invocation time. The LLM cannot hallucinate values
# for args it cannot see.
injected_args:
environment: session.environment
incident_id: session.id
session_id: session.id

# Cross-cutting framework knobs the runtime consumes directly.
framework:
Expand Down
Loading
Loading