Skip to content

Commit f7228e9

Browse files
authored
fix(planner): rich incident pastes stay assistant_handoff, never investigation_start (#4868)
1 parent 49fc122 commit f7228e9

4 files changed

Lines changed: 14 additions & 18 deletions

File tree

DEPLOYMENT.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,6 @@ make destroy-gateway-on-new-server
7979

8080
---
8181

82-
## Fargate multi-tenant deployment (Terraform)
83-
84-
The shared ECS Fargate foundation, the IAM lifecycle API and the public-run API
85-
are no longer part of this repository. They live with the web application, in
86-
`opensre-webapp/opensre-infra-aws/`, and are deployed from there.
87-
88-
This repository keeps only what the gateway itself needs at runtime: the
89-
`SizeProfile` contract in `platform/deployment_contracts/`, and credential
90-
hydration from the control-plane bootstrap / integrations secrets
91-
(`gateway/core/runtime/credential_hydration.py`). Remote agent-run polling and its
92-
Postgres store are owned by the webapp stack, not the gateway process.
93-
9482
## Runtime Environment (Hosted / General)
9583

9684
Deploy OpenSRE as a standard Python/FastAPI app using the repo `Dockerfile`, Railway,

core/agent_harness/prompts/action/text.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@
242242
has elevated 500s and latency after deploy" — states a fact but does not ask
243243
you to find a cause. Emit assistant_handoff, even when integrations are
244244
connected and even when it reads urgent or "critical". Do NOT start an
245-
investigation for it.
245+
investigation for it. A multi-line dashboard paste with Service / Region /
246+
Recent deploy / Logs lines and no investigate/analyze/diagnose/RCA verb is
247+
still a bare incident → assistant_handoff (set evidence_kind=incident), never
248+
investigation_start. Rich context does not upgrade a symptom paste into an
249+
explicit investigate instruction.
246250
- A diagnostic question that is a FOLLOW-UP about a result you already produced
247251
(see RECENT CONVERSATION) — e.g. "why did it fail?" / "what caused the spike?"
248252
/ "what happened?" after a completed investigation — is answered from that
@@ -350,7 +354,8 @@
350354
the assistant's previous reply — synthesize alert_text from that prior
351355
conversation (the original question plus the key evidence it reported). An
352356
implicit diagnostic cause question and a bare pasted alert blob remain
353-
assistant_handoff.
357+
assistant_handoff — including multi-line Service/Region/deploy/logs pastes
358+
with no investigate verb.
354359
- synthetic_run — run synthetic benchmark scenario by id. Use the exact scenario
355360
number the user supplied. If the user gives only a three-digit prefix, choose
356361
the enum value beginning with that prefix.

tests/core/agent/prompts/prompt_characterization_snapshot.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

tests/core/agent/scenarios/investigations/311-freeform-checkout-500-rich-context.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ notes:
2323
rather than blindly executing opensre investigate --input-json with potentially malformed JSON.'
2424
- Complements 307-new-alert-checkout-502 (single-line) by covering the structured multi-line format users
2525
naturally paste from incident dashboards.
26+
- 'Planner contract: NO investigate/analyze/diagnose/RCA verb → assistant_handoff (evidence_kind=incident),
27+
never investigation_start. Rich Service/Region/deploy/logs context must not upgrade a symptom paste.'
2628
turn:
2729
expected_kind: agent
2830
policy:
2931
executes_terminal_action: false
3032
planned_actions:
3133
- kind: assistant_handoff
3234
content: incident_description:checkout_api_500_db_timeout
35+
evidence_kind: incident
3336
source: llm
3437
response_contract:
3538
must_contain_any: []

0 commit comments

Comments
 (0)