Skip to content

AutoSRE production readiness (adapters, auth, durable failures) - #6

Draft
canyang25 wants to merge 5 commits into
mainfrom
cursor/autosre-production-readiness-735f
Draft

canyang25 wants to merge 5 commits into
mainfrom
cursor/autosre-production-readiness-735f

Conversation

@canyang25

Copy link
Copy Markdown
Owner

Summary

Production-readiness follow-up after the hardening merge, grounded in Prometheus / Elasticsearch / Alertmanager / AWX docs (via Exa).

  • Config: dotenv loads before config reads (autosre.bootstrap)
  • Real adapters: AUTOSRE_BACKEND_MODE=mock|real with shared Authorization headers — PromQL query_range, ES index _search, AWX job template launch
  • Durable incidents: persist failed / timeout / denied / partial, not only successes
  • Rollback: scenario healthy_thresholds replace brittle 0.7×max heuristic
  • Webhook: optional Bearer token, catalog-driven mapping (webhook_labels / webhook_keywords), GET /incidents/{id}
  • Scenarios: new oom / cache-service via fixtures; tests read from scenarios.json / fixtures/* (see docs/TEST_SCENARIOS.md)

Plan artifact: /opt/cursor/artifacts/plans/autosre_production_readiness_7f2a.plan.md

Verification

ruff check .                 # passed
pytest --tb=short            # 69 passed
python eval.py --simulate    # db/disk/network/oom PASS

Test plan

  • Fixture-driven tests (T1–T12 in docs/TEST_SCENARIOS.md)
  • ruff check .
  • pytest + eval.py --simulate
Open in Web Open in Cursor 

cursoragent and others added 5 commits July 20, 2026 03:44
Fix dotenv load order; add mock|real backend adapters with shared
Authorization headers (PromQL / ES DSL / AWX); persist failed and
timeout incidents; drive rollback from scenario healthy_thresholds;
secure Alertmanager webhooks with Bearer tokens; add oom scenario via
fixtures; keep tests fixture-driven with no hardcoded catalog values.

Co-authored-by: Preston Zhao <czhao255@wisc.edu>
Spell out Stages 0–5 with replicable exit criteria aligned to PRR
practice, and mark what this branch actually implements next.

Co-authored-by: Preston Zhao <czhao255@wisc.edu>
Move Prometheus, Elasticsearch, and AWX/mock adapters out of tools.py
so dispatch stays thin and adapters can evolve independently.

Co-authored-by: Preston Zhao <czhao255@wisc.edu>
Bound blast radius (max hosts, allowlist, forbidden host patterns)
before approval/execution, and append deny/allow events to an audit log.

Co-authored-by: Preston Zhao <czhao255@wisc.edu>
Add config validation readiness endpoint, in-process counters, and a
sliding-window webhook rate limiter. Document package layout updates.

Co-authored-by: Preston Zhao <czhao255@wisc.edu>

This branch has not been deployed

No deployments
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.

2 participants