| {"args": {"key": "ENG-2104"}, "ok": true, "result": "{\"assignee\": \"\", \"description\": \"notifications error_rate_pct is 3.6% against a 1.5% SLO (alarm 9608) Investigate the root cause, ship the fix through the standard workflow, and follow the deployment policy.\", \"key\": \"ENG-2104\", \"priority\": \"high\", \"service\": \"notifications\", \"status\": \"open\", \"ticket_id\": 9104, \"title\": \"Notification delivery failures from hung SMTP calls\", \"type\": \"bug\"}", "tool": "get_ticket"} |
| {"args": {"query": "deployment"}, "ok": true, "result": "{\"count\": 10, \"rows\": [{\"author\": \"Priya Nair\", \"day\": 268, \"doc_id\": 9601, \"kind\": \"policy\", \"service\": \"\", \"title\": \"Deployment policy\"}, {\"author\": \"Diego Ramos\", \"day\": 254, \"doc_id\": 9602, \"kind\": \"policy\", \"service\": \"\", \"title\": \"Database migration policy\"}, {\"author\": \"Mei Tanaka\", \"day\": 233, \"doc_id\": 9604, \"kind\": \"runbook\", \"service\": \"search\", \"title\": \"Search caching\"}, {\"author\": \"Priya Nair\", \"day\": 271, \"doc_id\": 9606, \"kind\": \"runbook\", \"service\": \"\", \"title\": \"Incident response\"}, {\"author\": \"Mei Tanaka\", \"day\": 247, \"doc_id\": 9607, \"kind\": \"runbook\", \"service\": \"\", \"title\": \"Feature flags\"}, {\"author\": \"Alex Osei\", \"day\": 263, \"doc_id\": 9609, \"kind\": \"runbook\", \"service\": \"\", \"title\": \"Security response\"}, {\"author\": \"Mei Tanaka\", \"day\": 221, \"doc_id\": 9613, \"kind\": \"runbook\", \"service\": \"media-service\", \"title\": \"CDN and media delivery\"}, {\"author\": \"Diego Ramos\", \"day\": 288, \"doc_id\": 9617, \"kind\": \"design_doc\", \"service\": \"\", \"title\": \"Loyalty points program\"}, {\"author\": \"Priya Nair\", \"day\": 174, \"doc_id\": 9619, \"kind\": \"adr\", \"service\": \"\", \"title\": \"ADR-021: Standardize on staged canary deploys\"}, {\"author\": \"Priya Nair\", \"day\": 290, \"doc_id\": 9625, \"kind\": \"onboarding\", \"service\": \"\", \"title\": \"Engineering onboarding: how we ship\"}]}", "tool": "search_docs"} |
| {"args": {"title": "Deployment policy"}, "ok": true, "result": "{\"author\": \"Priya Nair\", \"body\": \"# Deployment policy\\n\\nThis policy is binding for every NovaCart service. It is enforced partly by\\ntooling and partly by review; deviations are treated as incidents.\\n\\n## Staging first, always\\n\\nEvery production deploy must first succeed on staging with the **same version**.\\n`deploy_service(service, environment=\\\"staging\\\", version=V)` must be in a\\n`succeeded` state for version `V` before `deploy_service(service,\\nenvironment=\\\"production\\\", version=V)` is accepted. Deploying a version to\\nproduction that has never been deployed to staging is rejected. There is no\\n\\\"hotfix exception\\\" - a hotfix is still a version, and it still goes to staging\\nfirst. In practice this costs about ninety seconds and it has caught eleven bad\\nreleases in the last two quarters.\\n\\n## Tier-1 services canary\\n\\nTier-1 services are the four that are directly in the money path or in front of\\ncustomers:\\n\\n- `storefront-web`\\n- `api-gateway`\\n- `checkout`\\n- `payments`\\n\\nFor these, the production deploy must be a canary: call `deploy_service` with\\n`canary_percent <= 25`. Twenty-five percent is a ceiling, not a target; 10% is\\nthe usual first step for anything touching payment capture. The canary must then\\nbe assessed with `assess_canary` and may only be promoted with `promote_canary`\\nonce the assessment reports healthy. Promoting a canary that `assess_canary`\\nreports as unhealthy is the single most common way engineers turn a small\\nregression into a SEV1 - see \\\"Postmortem: api-gateway v5.1.0 latency surge\\\"\\nin the incident archive.\\n\\nTier-2 services (`catalog`, `notifications`, `search`) deploy at 100% directly,\\nstill staging-first.\\n\\n## Rollback\\n\\n`rollback_deployment` is **exempt** from the staging-first rule. During an\\nincident you roll back immediately; you do not stage a rollback. Rolling back\\nreturns the service to the previously succeeded production version. See the\\n\\\"Incident response\\\" runbook for where rollback sits in the mitigation ordering,\\nand \\\"Rollback and recovery\\\" for the mechanics.\\n\\n## Deployment score\\n\\nEvery deploy that trips an alarm counts against the owning team's deployment\\nscore, which is reviewed monthly. A tripped alarm on a canary that was correctly\\nassessed and *not* promoted is recorded but weighted at one quarter - the\\ncanary did its job. This is deliberate: we would rather you canary and catch it\\nthan skip the canary and get lucky.\\n\\n## Related\\n\\n- \\\"Database migration policy\\\" - migrations precede the code that needs them.\\n- \\\"ADR-021: Standardize on staged canary deploys\\\" - why we chose this shape.\\n- \\\"Engineering onboarding: how we ship\\\" - the end-to-end workflow.\\n\", \"day\": 268, \"doc_id\": 9601, \"kind\": \"policy\", \"service\": \"\", \"title\": \"Deployment policy\"}", "tool": "get_document"} |
| {"args": {"query": "retry"}, "ok": true, "result": "{\"count\": 7, \"rows\": [{\"author\": \"Priya Nair\", \"day\": 241, \"doc_id\": 9603, \"kind\": \"runbook\", \"service\": \"\", \"title\": \"Retry and timeout standard\"}, {\"author\": \"Priya Nair\", \"day\": 236, \"doc_id\": 9611, \"kind\": \"runbook\", \"service\": \"\", \"title\": \"Connection pool sizing\"}, {\"author\": \"Diego Ramos\", \"day\": 198, \"doc_id\": 9614, \"kind\": \"design_doc\", \"service\": \"checkout\", \"title\": \"Checkout architecture\"}, {\"author\": \"Diego Ramos\", \"day\": 205, \"doc_id\": 9615, \"kind\": \"design_doc\", \"service\": \"payments\", \"title\": \"Payments settlement pipeline\"}, {\"author\": \"Priya Nair\", \"day\": 290, \"doc_id\": 9625, \"kind\": \"onboarding\", \"service\": \"\", \"title\": \"Engineering onboarding: how we ship\"}, {\"author\": \"Priya Nair\", \"day\": 209, \"doc_id\": 9629, \"kind\": \"design_doc\", \"service\": \"api-gateway\", \"title\": \"API gateway: routing, traffic weights, and rate limiting\"}, {\"author\": \"Mei Tanaka\", \"day\": 285, \"doc_id\": 9630, \"kind\": \"onboarding\", \"service\": \"\", \"title\": \"Service catalog and service tiers\"}]}", "tool": "search_docs"} |
| {"args": {"title": "Retry and timeout standard"}, "ok": true, "result": "{\"author\": \"Priya Nair\", \"body\": \"# Retry and timeout standard\\n\\nApplies to every cross-service call in the NovaCart fleet. Two config keys per\\ndownstream dependency, named after the downstream service.\\n\\n## The two keys\\n\\nFor a caller talking to downstream service `X`:\\n\\n- `<downstream>_retry_max_attempts` - **must be 3**\\n- `<downstream>_timeout_ms` - **must be at most 2000**\\n\\nSo `payments` calling `notifications` runs with\\n`notifications_retry_max_attempts=3` and `notifications_timeout_ms=2000` (or\\nlower). `checkout` calling `payments` runs with `payments_retry_max_attempts=3`\\nand `payment_timeout_ms` inside the 2000ms ceiling.\\n\\nRetries use exponential backoff with jitter; the backoff schedule is applied\\nautomatically by the shared HTTP client, so you do not configure delays. Three\\nattempts means one initial call plus two retries, worst case roughly\\n`3 * timeout_ms` plus backoff.\\n\\n## Why 3 and why 2000\\n\\n**A retry value of 0 means one timeout permanently fails the request.** There is\\nno second chance. A single blip in a downstream - a pod restart, a brief GC\\npause, a rebalanced connection - becomes a user-visible failure and a failed\\norder. This is not hypothetical: payments ran with\\n`notifications_retry_max_attempts=0` and `notifications_timeout_ms=30000` for\\nseveral weeks and pushed `error_rate_pct` from a baseline of 0.4% to 3.8%,\\nstraight through the 1.0% SLO.\\n\\nThe 2000ms ceiling exists because timeouts multiply up the call stack. A 30000ms\\ntimeout on a leaf call does not \\\"wait patiently\\\" - it holds a request-handling\\nworker and a database connection for thirty seconds, and under load that is how\\nyou exhaust a pool (see \\\"Connection pool sizing\\\"). If a downstream genuinely\\ncannot answer in two seconds, the call belongs on a queue, not in the request\\npath.\\n\\n## Checklist for a new dependency\\n\\n1. Add `<downstream>_retry_max_attempts=3` to the caller's config.\\n2. Add `<downstream>_timeout_ms` at or below 2000.\\n3. Confirm the call is idempotent, or that the downstream deduplicates by\\n idempotency key. Retrying a non-idempotent write is worse than failing.\\n4. Confirm the caller's own inbound timeout is larger than\\n `attempts * timeout_ms` plus backoff, or the retry budget is fiction.\\n5. Add the dependency to the service's dependency section in its design doc.\\n\\n## Anti-patterns\\n\\n- Retrying on 4xx. Only retry timeouts, connection errors, 429, and 5xx.\\n- Retrying inside a retry. Nested retries multiply: 3 x 3 = 9 calls.\\n- Raising the timeout to \\\"fix\\\" a slow downstream. Fix the downstream.\\n\", \"day\": 241, \"doc_id\": 9603, \"kind\": \"runbook\", \"service\": \"\", \"title\": \"Retry and timeout standard\"}", "tool": "get_document"} |
| {"args": {"service": "notifications"}, "ok": true, "result": "{\"count\": 2, \"rows\": [{\"environment\": \"production\", \"level\": \"INFO\", \"log_id\": 9017, \"message\": \"delivery queue healthy; smtp_pool=8\", \"service\": \"notifications\"}, {\"environment\": \"production\", \"level\": \"ERROR\", \"log_id\": 9022, \"message\": \"outbound SMTP call hung indefinitely; smtp_timeout_ms=0 (no timeout configured)\", \"service\": \"notifications\"}]}", "tool": "search_logs"} |
| {"args": {"body": "Root cause: outbound SMTP calls hang forever because no timeout is configured. Applies the standard from the 'Retry and timeout standard' runbook. Fixes ENG-2104.", "changes": [{"change_type": "config", "payload": {"key": "smtp_timeout_ms", "value": "2000"}}], "service": "notifications", "ticket_key": "ENG-2104", "title": "notifications: set smtp_timeout_ms=2000"}, "ok": true, "result": "{\"next\": \"run_ci(pr_number=9203) then merge_pull_request(pr_number=9203)\", \"ok\": true, \"pr_number\": 9203, \"service\": \"notifications\", \"status\": \"open\"}", "tool": "open_pull_request"} |
| {"args": {"pr_number": 9203}, "ok": true, "result": "{\"detail\": \"all stages passed\", \"ok\": true, \"pr_number\": 9203, \"run_id\": 13, \"service\": \"notifications\", \"stages\": [{\"detail\": \"compiled and packaged\", \"stage\": \"build\", \"status\": \"passed\"}, {\"detail\": \"unit suite green\", \"stage\": \"unit\", \"status\": \"passed\"}, {\"detail\": \"integration suite green\", \"stage\": \"integration\", \"status\": \"passed\"}, {\"detail\": \"no regressions in dependent services\", \"stage\": \"regression\", \"status\": \"passed\"}], \"status\": \"passed\"}", "tool": "run_ci"} |
| {"args": {"pr_number": 9203}, "ok": true, "result": "{\"merged_version\": \"v1.4.9\", \"next\": \"deploy_service(service=..., environment=\\\"staging\\\")\", \"ok\": true, \"pr_number\": 9203, \"service\": \"notifications\"}", "tool": "merge_pull_request"} |
| {"args": {"environment": "staging", "service": "notifications"}, "ok": true, "result": "{\"applied\": true, \"canary_percent\": 100, \"deployment_id\": 9273, \"environment\": \"staging\", \"ok\": true, \"service\": \"notifications\", \"status\": \"succeeded\", \"version\": \"v1.4.9\"}", "tool": "deploy_service"} |
| {"args": {"environment": "production", "service": "notifications"}, "ok": true, "result": "{\"applied\": true, \"canary_percent\": 100, \"deployment_id\": 9274, \"environment\": \"production\", \"ok\": true, \"service\": \"notifications\", \"status\": \"succeeded\", \"version\": \"v1.4.9\"}", "tool": "deploy_service"} |
| {"args": {"service": "notifications"}, "ok": true, "result": "{\"count\": 2, \"rows\": [{\"environment\": \"production\", \"metric\": \"error_rate_pct\", \"service\": \"notifications\", \"value\": 0.5}, {\"environment\": \"production\", \"metric\": \"latency_p99_ms\", \"service\": \"notifications\", \"value\": 240.0}]}", "tool": "query_metrics"} |
| {"args": {"alert_id": 9608}, "ok": true, "result": "{\"alert_id\": 9608, \"ok\": true, \"status\": \"acknowledged\"}", "tool": "acknowledge_alert"} |
| {"args": {"alert_id": 9608}, "ok": true, "result": "{\"alert_id\": 9608, \"ok\": true, \"status\": \"resolved\"}", "tool": "resolve_alert"} |
| {"args": {"component": "notifications", "project": "ENG"}, "ok": true, "result": "{\"count\": 1, \"rows\": [{\"assignee\": \"Priya Nair\", \"component\": \"notifications\", \"created_day\": 414, \"issue_type\": \"Bug\", \"key\": \"ENG-2104\", \"priority\": \"High\", \"project\": \"ENG\", \"resolution\": \"\", \"status\": \"In Progress\", \"summary\": \"Notification delivery failures from hung SMTP calls\", \"updated_day\": 419}]}", "tool": "jira_search"} |
| {"args": {"key": "ENG-2104", "resolution": "Fixed", "status": "Done"}, "ok": true, "result": "{\"key\": \"ENG-2104\", \"ok\": true, \"resolution\": \"Fixed\", \"status\": \"Done\"}", "tool": "jira_transition_issue"} |
| {"args": {"key": "ENG-2104", "status": "done"}, "ok": true, "result": "{\"assignee\": \"\", \"key\": \"ENG-2104\", \"ok\": true, \"status\": \"done\"}", "tool": "update_ticket"} |
| {"verdict": {"passed": true, "reward": 1.0, "score": 1.0}} |
|
|